From 506e43eb1b1c0bb4571cd7f3ce00ee74613cb920 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期三, 20 八月 2025 15:57:19 +0800 Subject: [PATCH] bug修复 --- utils/buy_condition_util.py | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/utils/buy_condition_util.py b/utils/buy_condition_util.py index 69bab52..56998e8 100644 --- a/utils/buy_condition_util.py +++ b/utils/buy_condition_util.py @@ -3,18 +3,25 @@ """ # 鑾峰彇鑷敱娴侀�氬競鍊奸檺鍒� # 杩斿洖:锛堟渶澶т拱鍏�,鏈�浼樿嚜鐢辨祦閫氭渶灏�,鏈�浼樿嚜鐢辨祦閫氭渶澶э級 -from trade.trade_manager import MarketSituationManager - +from settings.trade_setting import MarketSituationManager # 鑾峰彇鑷敱娴侀�氬競鍊肩殑闃堝�艰寖鍥� -# 锛堟渶灏忔祦閫�,鏈�澶ф祦閫�,浼樼寮�濮�,浼樼缁撴潫,鏈�浼樺紑濮�,鏈�浼樼粨鏉燂級 +# 锛堟渶灏忔祦閫�,鏈�澶ф祦閫�,浼樼寮�濮�,浼樼缁撴潫,鏈�浼樺紑濮�,鏈�浼樼粨鏉�,鏈�澶у彲涔帮級 +from utils import tool + + def get_zyltgb_threshold(market_sitation: int): if market_sitation == MarketSituationManager.SITUATION_GOOD: - return 8.9, 100, 8.9, 50, 8.9, 19 - return 8.9, 31, 8.9, 25, 8.9, 19 + return 31, 100, 40, 100, 40, 80, 100 + # return 5.9, 41, 8.9, 25, 8.9, 19, 80 + return 5.9, 10000, 8.9, 25, 8.9, 19, 10000 # 鑾峰彇閲忔瘮鐨勭瓑绾ц幏鍙栭噺 def get_volume_rate_by_level(level: int): volume_rates = [0, 0.19, 0.49, 0.89] return volume_rates[level] + + +def get_cancel_and_buy_space_time(code): + return 50 if tool.is_sz_code(code) else 250 -- Gitblit v1.8.0