Administrator
2024-04-23 fe8a45ff35826379e0d8d9d4462766680affa4c5
bug修复
3个文件已修改
20 ■■■■■ 已修改文件
constant.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/cancel_buy_strategy.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/l2_data_manager_new.py 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
constant.py
@@ -168,6 +168,7 @@
# 最大的代码价格
MAX_CODE_PRICE = 10 if ALL_ACTIVE_BUY else 30
MIN_CODE_PRICE = 1
MAX_SUBSCRIPT_CODE_PRICE = 30 if ALL_ACTIVE_BUY else 30
# L2数据是否载入完成
l2/cancel_buy_strategy.py
@@ -243,12 +243,12 @@
                if val['orderNo'] == watch_info[1]:
                    total_num -= watch_info[2]
        min_index = min(watch_info[0])
        sell_orders = HuaXinSellOrderStatisticManager.get_latest_transaction_datas(code, total_datas[min_index]['val'][
        sell_orders = HuaXinSellOrderStatisticManager.get_latest_transaction_datas(code, total_datas[real_place_order_info[0]]['val'][
            'orderNo'])
        sell_order_num = sum([x[1] for x in sell_orders]) // 100
        rate = round(sell_order_num / total_num, 2)
        if rate > 0.49:
            return True, f"慢砸成交比例:{rate}/0.49"
            return True, f"慢砸成交比例:{rate}/0.49  成交:{sell_order_num}/{total_num}"
        else:
            return False, f"尚未触发撤单比例:{rate}"
l2/l2_data_manager_new.py
@@ -310,7 +310,7 @@
            if cancel_result[0]:
                L2TradeDataProcessor.cancel_buy(code, f"F撤:{cancel_result[1]}")
            else:
                l2_log.f_cancel_debug(code,f"获取真实成交位的F撤未生效:{cancel_result[1]}")
                l2_log.f_cancel_debug(code, f"获取真实成交位的F撤未生效:{cancel_result[1]}")
        except Exception as e:
            logger_debug.exception(e)
@@ -916,9 +916,12 @@
        limit_up_price = gpcode_manager.get_limit_up_price(code)
        if float(limit_up_price) >= constant.MAX_CODE_PRICE:
        if constant.MIN_CODE_PRICE < float(limit_up_price) < constant.MAX_CODE_PRICE:
            # 满足条件的单价
            pass
        else:
            # HighIncreaseCodeManager().add_code(code)
            return False, True, f"股价大于{constant.MAX_CODE_PRICE}块"
            return False, True, f"股价大于{constant.MAX_CODE_PRICE}块/小于{constant.MIN_CODE_PRICE}块"
        # place_order_count = cls.__PlaceOrderCountManager.get_place_order_count(code)
        # if place_order_count and place_order_count >= 10:
@@ -1279,7 +1282,8 @@
            cancel_result = cls.__cancel_buy(code)
            if cancel_result:
                trade_result_manager.real_cancel_success(code, order_begin_pos.buy_single_index,
                                                         order_begin_pos.buy_exec_index, total_datas,from_real_cancel = True)
                                                         order_begin_pos.buy_exec_index, total_datas,
                                                         from_real_cancel=True)
        l2_log.debug(code, "执行撤单结束,原因:{}", msg)
        return True
@@ -2179,10 +2183,9 @@
        is_at_limit_up = False
        current_sell_data = cls.__L2MarketSellManager.get_current_total_sell_data(code)
        if current_sell_data and current_sell_data[1] ==0:
        if current_sell_data and current_sell_data[1] == 0:
            # 板上放量买
            is_at_limit_up = True
        threshold_money = threshold_money_origin
        # 目标手数