From 231df152a3e4dab518d48395df67771c2c7c88d8 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期四, 24 四月 2025 16:24:56 +0800
Subject: [PATCH] 去除部分日志/累计大单够了以后每次上板大单要求改为原有数值

---
 code_attribute/code_nature_analyse.py |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/code_attribute/code_nature_analyse.py b/code_attribute/code_nature_analyse.py
index f68509a..bd1cf8b 100644
--- a/code_attribute/code_nature_analyse.py
+++ b/code_attribute/code_nature_analyse.py
@@ -404,7 +404,7 @@
     # if max_price > float(limit_up_price):
     #     return False
     rate = (float(limit_up_price) - min_price_info[1]["close"]) / min_price_info[1]["close"]
-    THRESHOLD_RATE = 0.319*2 if tool.is_ge_code(code) else 0.319
+    THRESHOLD_RATE = 0.319 * 2 if tool.is_ge_code(code) else 0.319
     if rate >= THRESHOLD_RATE:
         return True, rate
     return False, rate
@@ -560,8 +560,9 @@
     items = datas[0 - day_count:]
     for item in items:
         limit_up_price = float(gpcode_manager.get_limit_up_price_by_preprice(code, item["pre_close"]))
-        if abs(limit_up_price - item["high"]) < 0.001:
-            # 鐐告澘 # 鎴栨定鍋�
+        limit_down_price = float(gpcode_manager.get_limit_down_price_by_preprice(code, item["pre_close"]))
+        if abs(limit_up_price - item["high"]) < 0.001 or abs(limit_down_price - item["close"]):
+            # 鐐告澘 # 鎴栨定鍋� # 鎴栬�呰穼鍋�
             return True
     return False
 
@@ -592,8 +593,8 @@
     for item in items:
         # 鏄惁鏈夎穼鍋�
         # 鑾峰彇褰撴棩娑ㄥ箙
-        rate = (item["close"] - item["pre_close"])/item["pre_close"]
-        threshold_rate_ = round(0 - ((1 - tool.get_limit_down_rate(code))*0.9), 2)
+        rate = (item["close"] - item["pre_close"]) / item["pre_close"]
+        threshold_rate_ = round(0 - ((1 - tool.get_limit_down_rate(code)) * 0.9), 2)
         if rate < threshold_rate_:
             return True
     return False

--
Gitblit v1.8.0