From f08cb61eb22a7c006c84fe57a2e857e2b23b061c Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期四, 27 六月 2024 14:35:48 +0800 Subject: [PATCH] 相同价格判断机制bug修复 --- code_attribute/code_nature_analyse.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code_attribute/code_nature_analyse.py b/code_attribute/code_nature_analyse.py index d85b42b..133e84a 100644 --- a/code_attribute/code_nature_analyse.py +++ b/code_attribute/code_nature_analyse.py @@ -253,7 +253,7 @@ datas = datas[-10:] for data in datas: limit_up_price = float(gpcode_manager.get_limit_up_price_by_preprice(code, data["pre_close"])) - if abs(limit_up_price - data["high"]) < 0.01: + if abs(limit_up_price - data["high"]) < 0.001: date = data['bob'].strftime("%Y-%m-%d") return round((datas[-1]["close"] - data["close"]) / data["close"], 4), date return 0, '' @@ -272,7 +272,7 @@ date = data['bob'].strftime("%Y-%m-%d") if data["high"] > max_price: max_price = data["high"] - if abs(limit_up_price - data["high"]) < 0.01: + if abs(limit_up_price - data["high"]) < 0.001: limit_ups.append((date, True)) limit_up_count += 1 else: -- Gitblit v1.8.0