From 0e642d0c27e40df326733401be6f8c8115e54911 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期三, 23 七月 2025 17:01:25 +0800 Subject: [PATCH] L后默认撤单率修改/启用F撤 --- cancel_strategy/s_l_h_cancel_strategy.py | 41 +++++++++++++++++++++-------------------- 1 files changed, 21 insertions(+), 20 deletions(-) diff --git a/cancel_strategy/s_l_h_cancel_strategy.py b/cancel_strategy/s_l_h_cancel_strategy.py index 92492ff..6c4c078 100644 --- a/cancel_strategy/s_l_h_cancel_strategy.py +++ b/cancel_strategy/s_l_h_cancel_strategy.py @@ -590,26 +590,27 @@ return max(constant.L_CANCEL_RATE_WITH_MUST_BUY_FOR_REDICAL_BUY, human_rate), True, ( constant.L_CANCEL_RATE_WITH_MUST_BUY_FOR_REDICAL_BUY, human_rate) else: - deal_big_order_info = radical_buy_data_manager.get_total_deal_big_order_info(code, - gpcode_manager.get_limit_up_price_as_num( - code)) - # 鏍规嵁鎴愪氦棰濈殑澶у崟鎴愪氦鍗犳瘮鏉ヨ绠楁挙鍗曟瘮渚� - big_money_rate = radical_buy_data_manager.TotalDealBigOrderInfoManager.get_big_order_rate(code) - if big_money_rate is not None: - threshold_rate = min(big_money_rate * 3, 0.8) - if deal_big_order_info[0] <= 0: - # 澶у崟瓒冲锛屽皢鍩虹姣斾緥璋冩暣鑷�79% - threshold_rate = max(threshold_rate, 0.79) - return human_rate if human_rate > 0 else threshold_rate, False, (threshold_rate, human_rate) - else: - deal_rate = round(deal_big_order_info[1] / deal_big_order_info[2], 2) - threshold_rate = 0.5 * deal_rate + 0.35 - threshold_rate = max(threshold_rate, 0.375) - threshold_rate = min(threshold_rate, 0.8) - if deal_big_order_info[0] <= 0: - # 澶у崟瓒冲锛屽皢鍩虹姣斾緥璋冩暣鑷�79% - threshold_rate = max(threshold_rate, 0.79) - return human_rate if human_rate > 0 else threshold_rate, False, (threshold_rate, human_rate) + # deal_big_order_info = radical_buy_data_manager.get_total_deal_big_order_info(code, + # gpcode_manager.get_limit_up_price_as_num( + # code)) + # # 鏍规嵁鎴愪氦棰濈殑澶у崟鎴愪氦鍗犳瘮鏉ヨ绠楁挙鍗曟瘮渚� + # big_money_rate = radical_buy_data_manager.TotalDealBigOrderInfoManager.get_big_order_rate(code) + # if big_money_rate is not None: + # threshold_rate = min(big_money_rate * 3, 0.8) + # if deal_big_order_info[0] <= 0: + # # 澶у崟瓒冲锛屽皢鍩虹姣斾緥璋冩暣鑷�79% + # threshold_rate = max(threshold_rate, 0.79) + # return human_rate if human_rate > 0 else threshold_rate, False, (threshold_rate, human_rate) + # else: + # deal_rate = round(deal_big_order_info[1] / deal_big_order_info[2], 2) + # threshold_rate = 0.5 * deal_rate + 0.35 + # threshold_rate = max(threshold_rate, 0.375) + # threshold_rate = min(threshold_rate, 0.8) + # if deal_big_order_info[0] <= 0: + # # 澶у崟瓒冲锛屽皢鍩虹姣斾緥璋冩暣鑷�79% + # threshold_rate = max(threshold_rate, 0.79) + threshold_rate = constant.L_CANCEL_RATE + return human_rate if human_rate > 0 else threshold_rate, False, (threshold_rate, human_rate) if must_buy: if is_up: return constant.L_CANCEL_RATE_UP_WITH_MUST_BUY, True, None -- Gitblit v1.8.0