| | |
| | | from db.redis_manager_delegate import RedisUtils |
| | | from l2 import l2_data_util, l2_data_manager, transaction_progress, l2_data_source_util |
| | | from l2.cancel_buy_strategy import LCancelRateManager, LCancelBigNumComputer, \ |
| | | SecondCancelBigNumComputer, HourCancelBigNumComputer, FastCancelBigNumComputer, UCancelBigNumComputer, \ |
| | | GCancelBigNumComputer |
| | | SecondCancelBigNumComputer, HourCancelBigNumComputer, \ |
| | | GCancelBigNumComputer, FCancelBigNumComputer |
| | | from l2.l2_data_manager_new import L2TradeDataProcessor |
| | | from l2.l2_data_util import L2DataUtil, local_today_canceled_buyno_map |
| | | from log_module import async_log_util |
| | |
| | | |
| | | order_begin_pos = l2_data_manager.TradePointManager().get_buy_compute_start_data_cache(code) |
| | | |
| | | if order_begin_pos and order_begin_pos.buy_exec_index and order_begin_pos.buy_exec_index > -1: |
| | | # 已经下单的需要统计F撤 |
| | | try: |
| | | for d in datas: |
| | | if FCancelBigNumComputer().need_cancel(d)[0]: |
| | | L2TradeDataProcessor.cancel_buy(code, f"F撤撤单:{d}") |
| | | order_begin_pos = None |
| | | break |
| | | except Exception as e: |
| | | async_log_util.error(hx_logger_l2_debug, str(e)) |
| | | try: |
| | | for d in datas: |
| | | if LCancelBigNumComputer().add_transaction_data(d)[0]: |
| | | L2TradeDataProcessor.cancel_buy(code, f"L后成交太快撤单:{d}") |
| | | order_begin_pos = None |
| | | break |
| | | except Exception as e: |
| | | async_log_util.error(hx_logger_l2_debug, str(e)) |
| | | |
| | | |
| | | # 计算已经成交的大单 |
| | | big_money_count = 0 |
| | | for d in datas: |
| | |
| | | |
| | | LCancelBigNumComputer().set_trade_progress(code, order_begin_pos.buy_single_index, buy_progress_index, |
| | | total_datas) |
| | | |
| | | FastCancelBigNumComputer().set_trade_progress(code, buy_progress_index) |
| | | SecondCancelBigNumComputer().set_transaction_index( |
| | | code, |
| | | buy_progress_index) |