From dccc78fa41e49a17d95d89008a019bba31d82b15 Mon Sep 17 00:00:00 2001 From: admin <admin@example.com> Date: 星期三, 14 五月 2025 13:24:55 +0800 Subject: [PATCH] 有强度有强拉策略分支 统一 数据加入100亿市值以上无大单,瞬时量幅比>1,加入领涨次数限制。 K线熟悉指标中的二次近前高风险赋值条件参数调整至更小范围。 --- strategy/buying_strategy.py | 22 ++++++++++++++-------- 1 files changed, 14 insertions(+), 8 deletions(-) diff --git a/strategy/buying_strategy.py b/strategy/buying_strategy.py index 736c9c5..8b1fe97 100644 --- a/strategy/buying_strategy.py +++ b/strategy/buying_strategy.py @@ -221,7 +221,8 @@ '涓撶敤璁惧'} # 鏌ヨ褰撳墠涓偂鐨勪唬鐮佹槸鍚﹀湪鏉垮潡寮哄害涓偂鍒楄〃涓紙浣庡惛浼橀�夌洰鏍囷級 - strength_list_have_it = False # 涓烘煡璇㈢粨鏋滆祴鍒濆�� + strength_list_have_it = False # 鏄惁鏈夊己搴﹁祴鍒濆�� + have_leading_increase = False # 鏄惁鏈夐娑ㄦ鏁拌祴鍒濆�� strength_plate = [] market_sift_plate_stock_dict = data_cache.market_sift_plate_stock_dict if market_sift_plate_stock_dict is not None: @@ -244,6 +245,9 @@ # 濡傛灉瀛愬垪琛ㄩ暱搴﹀ぇ浜�1涓旂浜屼釜鍏冪礌鍖呭惈 褰撳墠杩涘叆娑ㄥ箙瑙嗙晫鐨剆ymbol_code strength_list_have_it = True strength_plate = correlation_plate_list + if stock_list[6] >= 1: + async_log_util.info(logger, f"鍖呭惈鏈夊己搴︾殑鏉垮潡涓紝浠绘剰涓�娆¢娑ㄦ鏁�>=1") + have_leading_increase = True ''' 鍒濆鍖朘绾胯繎鏈熸樉钁楁寚鏍囩殑搴忓彿 骞舵壘鍑烘潵锛屽鏋滄病鏈夛紝鍒欒繑鍥炵┖鍊� ''' @@ -354,7 +358,7 @@ logger_info( f"銆愪笉鍒┿�戣嚜鐢卞競鍊煎皬浜�6浜匡紒涓嶄拱锛侊紒 鍏徃鍚嶇О锛歿k_line_data[0]['sec_name']}锛屾渶鏂颁环: {current_price}") elif ( - free_market_value == 0 or free_market_value == 0.0) and free_market_value > 100 and L2_found_big_order: + free_market_value == 0 or free_market_value == 0.0) and free_market_value > 100 and L2_found_big_order is False: logger_info( f"銆愪笉鍒┿�戣嚜鐢卞競鍊煎ぇ浜�100浜匡紝涓旀湭鍙戠幇澶у崟锛佷笉涔帮紒锛� 鍏徃鍚嶇О锛歿k_line_data[0]['sec_name']}锛屾渶鏂颁环: {current_price}") elif len(intersection_plate) > 0: @@ -505,9 +509,9 @@ intersection_plate = bought_plate_set.intersection(strength_plate_set) if len(intersection_plate) > 0: logger_info(f"閲嶅鐩镐氦寮哄害==={intersection_plate}") - if last_volume_to_growth_ratio < 0.8: + if last_volume_to_growth_ratio < 1: logger_info( - f"銆愭湁寮哄害 鏈夊皬閲忔崲澶ф定骞呫�戠灛鏃堕噺骞呮瘮< 0.8 锛佺灛鏃堕噺骞呮瘮锛歿round(last_volume_to_growth_ratio, 2)}%锛屾渶鏂颁环: {current_price}锛岀灛鏃舵定骞咃細{round(tick_growth, 2)}%锛屽綋鏃ュ綋鏃舵定骞咃細{today_growth}%,褰撳墠鏃堕棿锛歿current_created_at}銆�") + f"銆愭湁寮哄害 鏈夊皬閲忔崲澶ф定骞呫�戠灛鏃堕噺骞呮瘮< 1 锛佺灛鏃堕噺骞呮瘮锛歿round(last_volume_to_growth_ratio, 2)}%锛屾渶鏂颁环: {current_price}锛岀灛鏃舵定骞咃細{round(tick_growth, 2)}%锛屽綋鏃ュ綋鏃舵定骞咃細{today_growth}%,褰撳墠鏃堕棿锛歿current_created_at}銆�") if tick_growth >= 1: logger_info( f"銆愭湁寮哄害 鏈夊皬閲忔崲澶ф定骞� 鏈夊己鎷夈�戠灛鏃舵定骞� > 1% 锛佺灛鏃舵定骞咃細{round(tick_growth, 2)}%") @@ -530,8 +534,7 @@ # elif k_line_data[0]['attribute'] == 'up_down' and k_line_data[0]['today_volume_shape'] == 'increases_down': # logger_info( # f"銆愪笉鍒┿�戞槰鏃ラ珮寮�浣庤蛋 涓� 鏀鹃噺涓嬭穼锛屼笉涔帮紒锛�") - elif k_line_data[0]['attribute'] == 'down_down' and k_line_data[0][ - 'today_volume_shape'] == 'increases_down': + elif k_line_data[0]['attribute'] == 'down_down' and k_line_data[0]['today_volume_shape'] == 'increases_down': logger_info( f"銆愪笉鍒┿�戞槰鏃ヤ綆寮�浣庤蛋 涓� 鏀鹃噺涓嬭穼锛屼笉涔帮紒锛�") elif throwing_pressure_position[0] is True: @@ -550,9 +553,12 @@ free_market_value == 0 or free_market_value == 0.0) and free_market_value < 6: logger_info( f"銆愪笉鍒┿�戣嚜鐢卞競鍊煎皬浜�6浜匡紒涓嶄拱锛侊紒 鍏徃鍚嶇О锛歿k_line_data[0]['sec_name']}锛屾渶鏂颁环: {current_price}") - elif L2_found_big_order is False: + elif have_leading_increase is False: logger_info( - f"銆愪笉鍒┿�慙2璁板綍涓湭鍙戠幇澶у崟锛佷笉涔帮紒锛� 鍏徃鍚嶇О锛歿k_line_data[0]['sec_name']}锛屾渶鏂颁环: {current_price}") + f"銆愪笉鍒┿�戞湁寮哄害鐨勬澘鍧椾腑娌℃湁鍙戠幇棰嗘定娆℃暟锛佷笉涔帮紒锛� 鍏徃鍚嶇О锛歿k_line_data[0]['sec_name']}锛屾渶鏂颁环: {current_price}") + elif (free_market_value == 0 or free_market_value == 0.0) and free_market_value > 100 and L2_found_big_order is False: + logger_info( + f"銆愪笉鍒┿�戣嚜鐢卞競鍊煎ぇ浜�100浜匡紝涓旀湭鍙戠幇澶у崟锛佷笉涔帮紒锛� 鍏徃鍚嶇О锛歿k_line_data[0]['sec_name']}锛屾渶鏂颁环: {current_price}") elif data_cache.have_strength_buy_times >= 1: logger_info(f"銆愪笉鍒┿�戞湁寮哄害涔板叆 1 娆′簡锛佷笉涔颁簡锛侊紒鍏徃鍚嶇О锛歿k_line_data[0]['sec_name']}锛�") L2_data_analysis.find_L2_big_order_of_code(symbol_code) -- Gitblit v1.8.0