From 81f328532e366eef171b71810b221a9294dda78f Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期四, 21 十二月 2023 14:31:58 +0800 Subject: [PATCH] 买入条件调整/L撤调整 --- code_attribute/first_target_code_data_processor.py | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/code_attribute/first_target_code_data_processor.py b/code_attribute/first_target_code_data_processor.py index fddeab8..b7db9e6 100644 --- a/code_attribute/first_target_code_data_processor.py +++ b/code_attribute/first_target_code_data_processor.py @@ -22,6 +22,8 @@ def process_first_codes_datas(dataList, request_id=None): logger_l2_codes_subscript.info(f"{request_id}鍔犺浇l2浠g爜鐩稿叧鏁版嵁") print("棣栨澘浠g爜鏁伴噺锛�", len(dataList)) + # 鑾峰彇鏈�杩�5澶╃殑浜ゆ槗鏃ユ湡锛屼负鍚庨潰鐨勬暟鎹绠楀仛鍑嗗 + HistoryKDatasUtils.get_latest_trading_date_cache(5) limit_up_price_dict = {} temp_codes = [] codes = [] @@ -115,6 +117,8 @@ volumes = init_data_util.parse_max_volume(volumes_data[:90], code_nature_analyse.is_new_top( limit_up_price, + volumes_data[:90]) or code_nature_analyse.is_near_top( + limit_up_price, volumes_data[:90])) logger_first_code_record.info("{} 鑾峰彇鍒伴鏉�60澶╂渶澶ч噺锛歿}", code, volumes) code_volumn_manager.set_histry_volumn(code, volumes[0], volumes[1], volumes[2]) @@ -123,15 +127,21 @@ k_format = code_nature_analyse.get_k_format(limit_up_price, volumes_data) code_nature_analyse.CodeNatureRecordManager().save_k_format(code, k_format) - if code_nature_analyse.is_up_too_high_in_10d(volumes_data): + if code_nature_analyse.is_up_too_high_in_10d_with_limit_up(volumes_data): # 鍒ゆ柇鏄惁澶珮 - l2_trade_util.forbidden_trade(code, "鑲′环闀垮緱澶珮") + # l2_trade_util.forbidden_trade(code, "鑲′环闀垮緱澶珮锛�5澶╁唴鏈�3涓定鍋滐級") HighIncreaseCodeManager().add_code(code) if code_nature_analyse.is_up_too_high_in_120d(volumes_data): # 鍒ゆ柇鏄惁澶珮 - l2_trade_util.forbidden_trade(code, "120澶╁唴鑲′环闀垮緱澶珮") - HighIncreaseCodeManager().add_code(code) + # l2_trade_util.forbidden_trade(code, "120澶╁唴鑲′环闀垮緱澶珮") + # HighIncreaseCodeManager().add_code(code) + pass + + if code_nature_analyse.is_price_too_high_in_days(volumes_data, limit_up_price): + # 鍒ゆ柇鏄惁澶珮 + l2_trade_util.forbidden_trade(code, "6澶╁唴鑲′环闀垮緱澶珮") + # HighIncreaseCodeManager().add_code(code) if code_nature_analyse.is_have_latest_max_volume(volumes_data, 2): # 鏈�杩�2澶╂槸鍚︽槸鏈�楂橀噺 -- Gitblit v1.8.0