Administrator
2024-01-18 2e10717c6cfec6ab2d00b61644af6b8f26c0ca4f
l2/cancel_buy_strategy.py
@@ -493,6 +493,10 @@
            start_compute_index = transaction_index + 1  # max(transaction_index + 1, start_compute_index)
        total_datas = local_today_datas.get(code)
        # h撤计算必须超过5s
        if tool.trade_time_sub(total_datas[-1]["val"]["time"], total_datas[buy_single_index]["val"]) < 5:
            l2_log.h_cancel_debug(code, "5s内囊括计算H撤")
            return
        # -----------------计算H上-------------------
        watch_indexes_up = set()
        for i in range(real_place_order_index - 1, start_compute_index + 1, -1):
@@ -1682,7 +1686,7 @@
                # 真实下单位改变后才会更新
                final_watch_indexes = origin_watch_index | watch_indexes
                self.__watch_indexes_dict[code] = final_watch_indexes
                l2_log.g_cancel_debug(code,f"大单监听:{final_watch_indexes}")
                l2_log.g_cancel_debug(code, f"大单监听:{final_watch_indexes}")
        else:
            l2_log.g_cancel_debug(code, f"没有大单监听,开始计算小单:{start_index}-{real_order_index}")
            # 没有300万以上的大单了,计算备用