| | |
| | | from code_attribute import gpcode_manager |
| | | from l2 import l2_data_util, l2_data_manager, l2_data_source_util, transaction_progress |
| | | from l2.cancel_buy_strategy import FCancelBigNumComputer, LCancelBigNumComputer, LCancelRateManager, \ |
| | | GCancelBigNumComputer, SecondCancelBigNumComputer, HourCancelBigNumComputer |
| | | GCancelBigNumComputer, SecondCancelBigNumComputer, HourCancelBigNumComputer, DCancelBigNumComputer |
| | | from l2.l2_data_manager_new import L2TradeDataProcessor |
| | | from l2.l2_data_util import L2DataUtil, local_today_canceled_buyno_map |
| | | from l2.l2_transaction_data_manager import HuaXinTransactionDataManager |
| | |
| | | # 已经下单的需要统计F撤 |
| | | try: |
| | | for d in datas: |
| | | if FCancelBigNumComputer().need_cancel(d)[0]: |
| | | if FCancelBigNumComputer().need_cancel(d)[0] and not DCancelBigNumComputer().has_auto_cancel_rules(code): |
| | | L2TradeDataProcessor.cancel_buy(code, f"F撤撤单:{d}") |
| | | order_begin_pos = None |
| | | break |
| | |
| | | try: |
| | | # 下单2s后才开始生效 |
| | | cresult = LCancelBigNumComputer().add_transaction_datas(code, datas) |
| | | if cresult[0]: |
| | | if cresult[0] and not DCancelBigNumComputer().has_auto_cancel_rules(code): |
| | | L2TradeDataProcessor.cancel_buy(code, f"L后成交太快撤单:{cresult[1]}") |
| | | order_begin_pos = None |
| | | except Exception as e: |
| | |
| | | HourCancelBigNumComputer().set_transaction_index(code, order_begin_pos.buy_single_index, |
| | | buy_progress_index) |
| | | cresult = FCancelBigNumComputer().need_cancel_for_deal_fast(code,buy_progress_index) |
| | | if cresult[0]: |
| | | if cresult[0] and not DCancelBigNumComputer().has_auto_cancel_rules(code): |
| | | L2TradeDataProcessor.cancel_buy(code, f"下单5分钟内排单不足:{cresult[1]}") |
| | | # ---------------------------------判断板块是否跟上来了------------------------------- |
| | | try: |
| | |
| | | if real_order_index and real_order_index >= buy_progress_index: |
| | | # 发送下单消息 |
| | | try: |
| | | buy_order_msg_manager.almost_deal(code, real_order_index, buy_progress_index, |
| | | total_datas) |
| | | buy_order_msg_manager.almost_deal(code, real_order_index, buy_progress_index) |
| | | buy_order_msg_manager.follow_not_enough(code, order_begin_pos.buy_exec_index, |
| | | real_order_index, total_datas) |
| | | real_order_index) |
| | | except Exception as e: |
| | | logger_debug.exception(e) |
| | | else: |