Administrator
2024-12-10 4231dc5dba02568b70e2caa4a0fe7c6455223c5c
l2/cancel_buy_strategy.py
@@ -261,8 +261,9 @@
        """
        watch_indexes = self.__watch_indexes_cache.get(code)
        if not watch_indexes:
            return False,None,  "无大单监听"
            return False, None, "无大单监听"
        total_datas = local_today_datas.get(code)
        need_compute = False
        for i in range(start_index, end_index + 1):
            data = total_datas[i]
            val = data["val"]
@@ -276,9 +277,22 @@
            if buy_index is None:
                continue
            if buy_index in watch_indexes:
                return True, data, f"大单撤单({buy_index})"
        return False,None, "无大单撤单"
                need_compute = True
                break
        if need_compute:
            cancel_count = 0
            cancel_data = None
            for index in watch_indexes:
                cancel_data = l2_data_source_util.L2DataSourceUtils.get_limit_up_buy_canceled_data_v2(code, index,
                                                                                                      total_datas,
                                                                                                      local_today_canceled_buyno_map.get(
                                                                                                          code))
                if cancel_data:
                    cancel_count += 1
            if cancel_count >= len(watch_indexes):
                return True, cancel_data, f"大单撤单({watch_indexes})"
        return False, None, "无大单撤单"
    def __clear_data(self, code):
        if code in self.__watch_indexes_cache: