From 1dfeb70d7ed4caf0b67ef8897726646a6809ab8d Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期五, 18 七月 2025 16:28:16 +0800
Subject: [PATCH] 测试

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

diff --git a/cancel_strategy/s_l_h_cancel_strategy.py b/cancel_strategy/s_l_h_cancel_strategy.py
index 86d2746..93ff9b2 100644
--- a/cancel_strategy/s_l_h_cancel_strategy.py
+++ b/cancel_strategy/s_l_h_cancel_strategy.py
@@ -2105,23 +2105,20 @@
                 start_money, end_money = ts[i] * 100, ts[i + 1] * 100
                 tss.append((start_money, end_money))
 
-            watch_index_info_less_of_200 = [0, 0]
-            watch_index_info_200_to_300 = [0, 0]
-            watch_index_info_more_than_300 = [0, 0]
-
             rate_info_dict = {}
+            for t in tss:
+                rate_info_dict[t[0]] = [0,0]
+
             for x in before_watch_indexed_info:
                 money = limit_up_price * x[1]
                 for t in tss:
                     if t[0] <= money < t[1]:
-                        if t[0] not in rate_info_dict:
-                            rate_info_dict[t[0]] = [0,0]
                         rate_info_dict[t[0]][0] += x[1]
                         if x[0] in canceled_indexes:
                             rate_info_dict[t[0]][1] += x[1]
                         break
-            watch_index_info = [(k,v) for k,v in rate_info_dict.items()]
-            watch_index_info.sort(key= lambda x:x[0])
+            watch_index_info = [(k, v) for k, v in rate_info_dict.items()]
+            watch_index_info.sort(key=lambda x: x[0])
             watch_index_info = [x[1] for x in watch_index_info]
             watch_index_info_details = []
             for x in watch_index_info:

--
Gitblit v1.8.0