From 6e7af1a80f8aadfdf71d8f0683facb152d7d2de7 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期三, 12 三月 2025 09:54:34 +0800 Subject: [PATCH] 修改自动撤逻辑 --- code_atrribute/position_code_data_manager.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/code_atrribute/position_code_data_manager.py b/code_atrribute/position_code_data_manager.py index 9aa42fd..b3fd592 100644 --- a/code_atrribute/position_code_data_manager.py +++ b/code_atrribute/position_code_data_manager.py @@ -25,7 +25,10 @@ for d in datas: code = d[0] price = d[1] + buy1_price = d[5] volume = d[3] + if not price or price <= 0.0: + price = buy1_price cls.__current_price_dict[code] = price cls.__current_buy1_data_dict[code] = (d[5], d[6]) cls.__current_volume_dict[code] = volume @@ -56,4 +59,4 @@ if bars: code = bars[0]['symbol'].split(".")[1] volume = bars[0]['volume'] - cls.__pre_day_volume_dict[code] = volume \ No newline at end of file + cls.__pre_day_volume_dict[code] = volume -- Gitblit v1.8.0