From 8c5353ae5579b0d2cbee3ce0b6e275344df42cc2 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期四, 23 一月 2025 01:04:18 +0800
Subject: [PATCH] L撤比例修改

---
 cancel_strategy/s_l_h_cancel_strategy.py |   22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/cancel_strategy/s_l_h_cancel_strategy.py b/cancel_strategy/s_l_h_cancel_strategy.py
index b73982b..a76aa24 100644
--- a/cancel_strategy/s_l_h_cancel_strategy.py
+++ b/cancel_strategy/s_l_h_cancel_strategy.py
@@ -574,14 +574,20 @@
                     # 鎵叆鍔犵孩
                     return constant.L_CANCEL_RATE_WITH_MUST_BUY_FOR_REDICAL_BUY, True
                 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))
-                    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.95)
-                    return threshold_rate, False
+                    # 鏍规嵁鎴愪氦棰濈殑澶у崟鎴愪氦鍗犳瘮鏉ヨ绠楁挙鍗曟瘮渚�
+                    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.95)
+                        return threshold_rate, False
+                    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))
+                        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.95)
+                        return threshold_rate, False
             if must_buy:
                 if is_up:
                     return constant.L_CANCEL_RATE_UP_WITH_MUST_BUY, True

--
Gitblit v1.8.0