From c7c24c39ea646b612676c4b0afaa37f45cfae926 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期一, 31 三月 2025 13:38:15 +0800
Subject: [PATCH] 新题材修改

---
 l2/cancel_buy_strategy.py |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/l2/cancel_buy_strategy.py b/l2/cancel_buy_strategy.py
index ac9e92a..cbd659f 100644
--- a/l2/cancel_buy_strategy.py
+++ b/l2/cancel_buy_strategy.py
@@ -570,9 +570,9 @@
         #     if buy1_money:
         #         if total_num_ * limit_up_price * 100 > buy1_money * 0.65:
         #             return True, f"P鎾わ細鎴愪氦浣嶇疆璺濈涓嬪崟浣嶇疆澶繙 鎴愪氦浣�-{trade_index} 涓嬪崟浣�-{real_order_index} 涔�1-{buy1_money}"
-        min_time_s, max_time_s = 2, 30
-        if total_num * limit_up_price >= 299 * 100:
-            min_time_s, max_time_s = 30, 60
+        min_time_s, max_time_s = 2, 60
+        # if total_num * limit_up_price >= 299 * 100:
+        #     min_time_s, max_time_s = 30, 60
 
         if sub_time <= min_time_s:
             return False, f"涓嬪崟鍦▄min_time_s}s鍐�"
@@ -583,6 +583,7 @@
         # 璁$畻鎴戜滑鍚庨潰鐨勫ぇ鍗曚笌娑ㄥ仠绾拱棰�
         total_left_num = 0
         total_big_num_count = 0
+        canceled_buyno_map =  local_today_canceled_buyno_map.get(code)
         for i in range(real_order_index + 1, len(total_datas)):
             data = total_datas[i]
             val = data["val"]
@@ -594,16 +595,15 @@
             left_count = l2_data_source_util.L2DataSourceUtils.get_limit_up_buy_no_canceled_count_v2(code,
                                                                                                      i,
                                                                                                      total_datas,
-                                                                                                     local_today_canceled_buyno_map.get(
-                                                                                                         code))
+                                                                                                     canceled_buyno_map)
             if left_count > 0:
-                if money > 299 * 100:
+                if money >= min_money:
                     total_big_num_count += 1
                 total_left_num += val["num"]
         left_money = total_left_num * float(limit_up_price)
-        if left_money < 1000 * 100:
+        if left_money < 1000 * 100 or total_big_num_count < 2:
             # 瀹為檯涓嬪崟浣嶅悗鏂规墍鏈夋定鍋滅函涔伴鈮�1000涓�
-            return True, f"P鎾わ細灏佸崟绾拱棰�-{round(left_money / 100, 1)}涓� 澶у崟鏁伴噺-{total_big_num_count} 涓嬪崟浣�-{real_order_index}"
+            return True, f"P鎾わ細灏佸崟绾拱棰�-{round(left_money / 100, 1)}涓� 鍓╀綑澶у崟鏁伴噺-{total_big_num_count} 涓嬪崟浣�-{real_order_index}"
         return False, "涓嶆弧瓒虫挙鍗曟潯浠�"
 
     # w鎾�

--
Gitblit v1.8.0