| | |
| | | total_data, |
| | | _local_today_num_operate_map) |
| | | canceled_count += total_data[wi]["re"] - left_count |
| | | if wi == watch_indexes_list[-1] and left_count == 0: |
| | | # 离下单位置最近的一个撤单,必须触发撤单 |
| | | l2_log.l_cancel_debug(code, f"计算范围:{start_index}-{end_index},临近撤单:{wi}") |
| | | return True, total_data[-1] |
| | | # if wi == watch_indexes_list[-1] and left_count == 0: |
| | | # # 离下单位置最近的一个撤单,必须触发撤单 |
| | | # l2_log.l_cancel_debug(code, f"计算范围:{start_index}-{end_index},临近撤单:{wi}") |
| | | # return True, total_data[-1] |
| | | |
| | | rate = round(canceled_count / total_count, 3) |
| | | l2_log.l_cancel_debug(code, f"计算范围:{start_index}-{end_index},已撤单比例:{rate}") |
| | |
| | | if need_cancel: |
| | | L2TradeDataProcessor.cancel_buy(code, f"D撤:{msg}", source="d_cancel") |
| | | |
| | | f2 = dask.delayed(LCancelBigNumComputer().set_trade_progress)(code, |
| | | buy_progress_index, |
| | | total_datas) |
| | | # f3 = dask.delayed( |
| | | # deal_big_money_manager.DealComputeProgressManager().set_trade_progress)( |
| | | # code, |
| | | # buy_progress_index, |
| | | # total_datas, |
| | | # num_operate_map) |
| | | |
| | | f4 = dask.delayed( |
| | | SecondCancelBigNumComputer().set_transaction_index)( |
| | | LCancelBigNumComputer().set_trade_progress(code, buy_progress_index, total_datas) |
| | | SecondCancelBigNumComputer().set_transaction_index( |
| | | code, |
| | | buy_progress_index) |
| | | |
| | | dask.compute(f2, f4) |
| | | else: |
| | | pass |
| | | except Exception as e: |