Administrator
2024-06-12 4a49d02e136249e2178e0d8372da2e6064ac6176
bug修复
3个文件已修改
25 ■■■■■ 已修改文件
cancel_strategy/s_l_h_cancel_strategy.py 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/l2_data_manager_new.py 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/l2_transaction_data_manager.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cancel_strategy/s_l_h_cancel_strategy.py
@@ -35,7 +35,7 @@
        half_must_buy = False
        if not must_buy:
            try:
                can_buy_result =code_plate_key_manager.CodePlateKeyBuyManager.can_buy(code)
                can_buy_result = code_plate_key_manager.CodePlateKeyBuyManager.can_buy(code)
                if can_buy_result and can_buy_result[0]:
                    if can_buy_result[0][1] <= 1 and can_buy_result[0][2] >= 3:
                        # 炸板率>60%以上就不加半红
@@ -1014,16 +1014,17 @@
                    break
        changed = True
        __last_l_up_compute_info = self.__last_l_up_compute_info.get(code)
        if __last_l_up_compute_info:
            if __last_l_up_compute_info == watch_indexes:
        l_up_compute_info = self.__last_l_up_compute_info.get(code)
        if l_up_compute_info:
            if l_up_compute_info[1] == watch_indexes:
                changed = False
        # 保存数据
        if changed:
            threshold_time = 1 if tool.is_sz_code(code) else 2
            if  time.time() - __last_l_up_compute_info[0] < threshold_time:
                l2_log.l_cancel_debug(code, f"L前监控更新太频繁:{threshold_time}")
                return
            if l_up_compute_info:
                if time.time() - l_up_compute_info[0] < threshold_time:
                    l2_log.l_cancel_debug(code, f"L前监控更新太频繁:{threshold_time}")
                    return
            l2_log.l_cancel_debug(code, f"L前监控范围:{watch_indexes} 计算范围:{start_index}-{end_index}")
            self.__set_near_by_trade_progress_indexes(code, buy_single_index, watch_indexes)
        self.__last_l_up_compute_info[code] = (time.time(), watch_indexes)
@@ -1227,7 +1228,7 @@
                    if str(wi) in after_place_order_index_dict:
                        # 真实下单位置之后的按照权重比例来计算
                        canceled_num += total_data[wi]["val"]["num"] * (
                                    10 - after_place_order_index_dict[str(wi)]) // 10
                                10 - after_place_order_index_dict[str(wi)]) // 10
                    else:
                        canceled_num += total_data[wi]["val"]["num"]
l2/l2_data_manager_new.py
@@ -978,12 +978,14 @@
        if constant.MIN_CODE_PRICE < float(limit_up_price) < constant.MAX_CODE_PRICE:
            # 满足条件的单价
            pass
        else:
        elif float(limit_up_price) > constant.MAX_CODE_PRICE:
            # HighIncreaseCodeManager().add_code(code)
            # 小市值高股价可买
            zyltgb = global_util.zyltgb_map.get(code)
            if zyltgb > 25e8 or float(limit_up_price) > constant.MAX_SUBSCRIPT_CODE_PRICE:
                return False, True, f"股价大于{constant.MAX_CODE_PRICE}块/小于{constant.MIN_CODE_PRICE}块"
        else:
            return False, True, f"股价小于{constant.MIN_CODE_PRICE}块"
        # place_order_count = cls.__PlaceOrderCountManager.get_place_order_count(code)
        # if place_order_count and place_order_count >= 10:
l2/l2_transaction_data_manager.py
@@ -307,7 +307,7 @@
        """
        deal_list = cls.__deal_volume_list_dict.get(code)
        if not deal_list:
            return 0, None
            return []
        fdatas = [deal_list[-1]]
        # 从倒数第二个数据计算
        for i in range(len(deal_list) - 2, -1, -1):
@@ -324,7 +324,7 @@
        """
        deal_list = cls.__deal_volume_list_dict.get(code)
        if not deal_list:
            return 0, None
            return []
        fdatas = [deal_list[-1]]
        # 从倒数第二个数据计算
        for i in range(len(deal_list) - 1, -1, -1):