From b855b811e3753ffcb35f145c985bb32f4b550038 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期四, 31 十月 2024 18:11:40 +0800 Subject: [PATCH] 排1之前的数据准备 --- third_data/code_plate_key_manager.py | 29 ++++++++++++++++++----------- 1 files changed, 18 insertions(+), 11 deletions(-) diff --git a/third_data/code_plate_key_manager.py b/third_data/code_plate_key_manager.py index 7735ff8..6ae77f8 100644 --- a/third_data/code_plate_key_manager.py +++ b/third_data/code_plate_key_manager.py @@ -378,7 +378,8 @@ """ blocks = set() for i in range(0, len(datas)): - if i >= 10: + if i >= 10 and int(tool.get_now_time_str().replace(":", "")) < int("100000"): + # 10鐐瑰墠鐪嬪墠10锛屽崄鐐瑰悗涓嶇湅鍓�10 break data = datas[i] if data[3] > 0 - 5e7: @@ -926,7 +927,8 @@ current_limit_up_datas = [] # 鑾峰彇鐩爣浠g爜鏉垮潡 - keys, k1, k11, k2, k3, k4 = cls.__TargetCodePlateKeyManager.get_plate_keys(code) + # keys, k1, k11, k2, k3, k4 = cls.__TargetCodePlateKeyManager.get_plate_keys(code) + keys, k1 = RadicalBuyBlockManager.get_code_blocks(code) # log.logger_kpl_debug.info("{}鏈�缁堝叧閿瘝锛歿}", code, keys) @@ -935,10 +937,6 @@ fresults = [] if not keys: return fresults, set() - # 鑾峰彇绮鹃�夋祦鍑烘澘鍧� - jx_out_blocks = RealTimeKplMarketData.get_top_market_jingxuan_out_blocks() - if jx_out_blocks: - keys -= jx_out_blocks code_limit_up_reasons_dict = {} load_code_block() @@ -1205,6 +1203,10 @@ limit_up_time = time.time() for k in LimitUpDataConstant.current_limit_up_datas: _code = k[0] + # 鍓旈櫎4鏉夸互涓婄殑鏉� + if kpl_util.get_high_level_count(k[4]) >= 4: + continue + if _code in exclude_codes: continue blocks = LimitUpDataConstant.get_blocks_with_history(_code) @@ -1260,6 +1262,11 @@ limit_up_space_ge_60s_codes = set() for k in LimitUpDataConstant.history_limit_up_datas: _code = k[3] + + # 鍓旈櫎4鏉夸互涓婄殑鏉� + if kpl_util.get_high_level_count(k[12]) >= 4: + continue + if _code in exclude_codes: continue blocks = LimitUpDataConstant.get_blocks_with_history(_code) @@ -1446,12 +1453,12 @@ else: # 璺濈涓婁釜浠g爜娑ㄥ仠5鍒嗛挓浠ュ唴 if tool.trade_time_sub(tool.timestamp_format(limit_up_timestamp, '%H:%M:%S'), - tool.timestamp_format(current_before_codes_info[-1][1], '%H:%M:%S')) >= 5 * 60: - return False, f"璺濈涓婁釜浠g爜娑ㄥ仠宸茶繃鍘�5鍒嗛挓锛坽current_before_codes_info[-1]}锛�" + tool.timestamp_format(current_before_codes_info[-1][1], '%H:%M:%S')) >= 10 * 60: + return False, f"璺濈涓婁釜浠g爜娑ㄥ仠宸茶繃鍘�10鍒嗛挓锛坽current_before_codes_info[-1]}锛�" else: if tool.trade_time_sub(tool.timestamp_format(limit_up_timestamp, '%H:%M:%S'), - tool.timestamp_format(current_before_codes_info[-1][1], '%H:%M:%S')) >= 5 * 60: - return False, f"璺濈涓婁釜浠g爜娑ㄥ仠宸茶繃鍘�5鍒嗛挓锛坽current_before_codes_info[-1]}锛�" + tool.timestamp_format(current_before_codes_info[-1][1], '%H:%M:%S')) >= 10 * 60: + return False, f"璺濈涓婁釜浠g爜娑ㄥ仠宸茶繃鍘�10鍒嗛挓锛坽current_before_codes_info[-1]}锛�" return True, f"婊¤冻涔板叆闇�姹�: 鍓嶆帓浠g爜-{current_before_codes_info}" @@ -1546,7 +1553,7 @@ fblocks |= BlockMapManager().filter_blocks(kpl_history_blocks) jx_out_blocks = RealTimeKplMarketData.get_top_market_jingxuan_out_blocks() if jx_out_blocks: - fblocks-=jx_out_blocks + fblocks -= jx_out_blocks return fblocks, match_blocks -- Gitblit v1.8.0