From e59b4e4ae8e4861d850b208ffac75c0b967c6500 Mon Sep 17 00:00:00 2001 From: admin <admin@example.com> Date: 星期一, 26 五月 2025 14:33:27 +0800 Subject: [PATCH] 1.修改有概念的强拉参数 2.修改充分交易量函数基础条件 3.GUI新增及修改 行情板块强度模块,服务端解析日志数据及应答 4. --- strategy/basic_methods.py | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/strategy/basic_methods.py b/strategy/basic_methods.py index f3b50d3..b9defd5 100644 --- a/strategy/basic_methods.py +++ b/strategy/basic_methods.py @@ -88,6 +88,7 @@ if last_price != 0: growth = (price - last_price) / last_price * 100 # 璁$畻娑ㄥ箙鐧惧垎姣� return growth + finally: history_price[symbol] = price # print(f"price======={price}") @@ -148,6 +149,7 @@ frying_plate_day_min_index = next((i for i, d in enumerate(k_line_data[0:7]) if 'attribute' in d and d['attribute'] in data_cache.frying_plate_type), None) # 濡傛灉娌℃湁鎵惧埌锛岃繑鍥濶one # 鎵惧埌鏈�杩�7鏃ュ唴鐨勬湁璺屽仠鐨勫簭鍙� limit_down_day_min_index = next((i for i, d in enumerate(k_line_data[0:7]) if 'attribute' in d and d['attribute'] in data_cache.limit_down_type), None) # 濡傛灉娌℃湁鎵惧埌锛岃繑鍥濶one + # 鏈�杩戠殑娑ㄥ仠搴忓彿瀛樺湪 涓� 闈炴槰鏃� if limit_up_day_min_index is not None and limit_up_day_min_index > 0: # 寮�鐩樹环 < 娑ㄥ仠褰撴棩鏈�楂樹环 <= 浠婃棩娑ㄥ仠浠� @@ -183,7 +185,7 @@ def secure_volume(now_date_time): # 瀹氫箟鏃堕棿娈电殑寮�濮嬪拰缁撴潫鏃堕棿锛堜娇鐢ㄥ瓧绗︿覆鏍煎紡锛� time_slots = [ - (("09:30:00", "09:30:30"), 0.05), + (("09:30:00", "09:30:30"), 0.04), (("09:30:30", "09:31:00"), 0.08), (("09:31:00", "09:31:30"), 0.1), (("09:31:30", "09:32:00"), 0.15), @@ -206,9 +208,14 @@ return 0 -# 绀轰緥浣跨敤 -# now = datetime.now() -# print(f"secure_volume(now)=={secure_volume(now)}") +# 鍏呭垎浜ゆ槗閲忓叕寮� 鐢ㄤ簬璁$畻鏃ュ唴娑ㄥ箙娈电悊璁虹殑瀹夊叏浜ゆ槗閲忓�� +def sufficient_volume(current_volume, yesterday_volume, today_growth): + if today_growth > 0: + if current_volume < yesterday_volume * today_growth: + return False + else: + return True + # 璁$畻 濮斾拱鍜屽鍗栫殑姣斾緥鍑芥暟(鑾峰彇涔扮洏寮哄害鏁版嵁)銆愭帢閲戞暟鎹粨鏋勩�� def buying_and_selling_ratio(current_quotes): -- Gitblit v1.8.0