From f0248f54f90a12f491245f0ee3ccfbe8f477a76b Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期五, 22 十二月 2023 14:24:20 +0800 Subject: [PATCH] bug修复 --- code_attribute/first_target_code_data_processor.py | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/code_attribute/first_target_code_data_processor.py b/code_attribute/first_target_code_data_processor.py index 6804624..f6665dc 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 = [] @@ -101,7 +103,7 @@ # 鑾峰彇60澶╂渶澶ц褰� for code in codes: need_get_volumn = False - if code not in global_util.max60_volumn or global_util.max60_volumn.get(code) is None: + if code not in global_util.max60_volumn or global_util.max60_volumn.get(code) is None or code_nature_analyse.CodeNatureRecordManager().get_k_format_cache(code) is None: need_get_volumn = True # if not need_get_volumn and code_nature_analyse.CodeNatureRecordManager.get_nature_cache( # code) is None: @@ -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]) @@ -125,18 +129,19 @@ 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) + # HighIncreaseCodeManager().add_code(code) if code_nature_analyse.is_have_latest_max_volume(volumes_data, 2): # 鏈�杩�2澶╂槸鍚︽槸鏈�楂橀噺 @@ -157,6 +162,7 @@ # volumes_data) except Exception as e: logger_first_code_record.error(f"{code}:{str(e)}") + logger_first_code_record.exception(e) gpcode_manager.FirstCodeManager().add_record(codes) # 鍒濆鍖栨澘鍧椾俊鎭紝鏆傛椂鍒犻櫎 # for code in codes: -- Gitblit v1.8.0