From 580eadb1623253c28b3dc20f37652be340b2ee0c Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期一, 24 二月 2025 17:52:31 +0800 Subject: [PATCH] 只买辨识度 --- trade/buy_radical/radical_buy_data_manager.py | 35 +++++++++++++++++++++++++++++++---- 1 files changed, 31 insertions(+), 4 deletions(-) diff --git a/trade/buy_radical/radical_buy_data_manager.py b/trade/buy_radical/radical_buy_data_manager.py index 67017dc..9b0ecd3 100644 --- a/trade/buy_radical/radical_buy_data_manager.py +++ b/trade/buy_radical/radical_buy_data_manager.py @@ -803,6 +803,11 @@ @param yesterday_limit_up_codes 鏄ㄦ棩娑ㄥ仠浠g爜 @return: """ + + new_blocks = LimitUpCodesBlockRecordManager().get_new_blocks() + if not new_blocks or block not in new_blocks: + return False, "闈炴柊棰樻潗" + # 9:45鐐逛箣鍓嶆定鍋滅殑鎵嶈兘涔板叆 # 鑾峰彇褰撳墠浠g爜鐨勬定鍋滄椂闂� limit_up_timestamp = cls.__get_limit_up_timestamp(code) @@ -985,6 +990,11 @@ @param yesterday_limit_up_codes: @return: """ + + new_blocks = LimitUpCodesBlockRecordManager().get_new_blocks() + if not new_blocks or block not in new_blocks: + return False, "闈炴柊棰樻潗" + # 寮�濮嬩拱鐨勮韩浣� 2锛氫粠鑰佷笁寮�濮嬩拱 1: 浠庤�佷簩寮�濮嬩拱 START_BUY_RANK = 1 @@ -1112,6 +1122,10 @@ @param block: @return: """ + new_blocks = LimitUpCodesBlockRecordManager().get_new_blocks() + if not new_blocks or block not in new_blocks: + return False, "闈炴柊棰樻潗" + # 鑾峰彇韬綅 current_index, current_before_codes_info = cls.__get_current_index(code, block, set(), limit_up_time=cls.__get_limit_up_timestamp( @@ -1175,7 +1189,7 @@ # 鍒ゆ柇鏄噣娴佸叆鍓嶆帓 in_blocks = RealTimeKplMarketData.get_top_market_jingxuan_blocks() - if block not in in_blocks or in_blocks.index(block) >= constant.RADICAL_BUY_TOP_IN_INDEX_WITH_SPECIAL: + if block not in in_blocks: # or in_blocks.index(block) >= constant.RADICAL_BUY_TOP_IN_INDEX_WITH_SPECIAL: return False, f"娌℃湁鍦ㄧ簿閫夊噣娴佸叆鍓峽constant.RADICAL_BUY_TOP_IN_INDEX_WITH_SPECIAL}" # if history_index >= 4: @@ -1604,6 +1618,14 @@ current_threshold_money = current_threshold_count * THRESHOLD_MONEY else: current_threshold_money = current_threshold_count * 2990000 + if is_almost_open_limit_up: + THRESHOLD_MONEY, is_default = BeforeSubDealBigOrderManager().get_big_order_threshold(code) + if is_default: + # 濡傛灉鍥炲皝鍧囧ぇ鍗曟槸榛樿鍊煎氨鍙栭灏佸潎澶у崟 + temp_info = BeforeSubDealBigOrderManager().get_temp_deal_big_order_threshold_info(code) + if temp_info: + THRESHOLD_MONEY = temp_info[0] + current_threshold_money = current_threshold_count * THRESHOLD_MONEY # ==========鍒ゆ柇鎬诲ぇ鍗曟垚浜�================ total_lack_money_info = get_total_deal_big_order_info(code, limit_up_price, is_for_buy=for_buy) @@ -1901,14 +1923,19 @@ if code not in special_codes: # 褰撳墠绁ㄦ棤杈ㄨ瘑搴� return False - # 鏄笉鏄鏉跨涓�涓鲸璇嗗害鐨勭エ + # 涔拌鲸璇嗗害鑰佸ぇ+娴佸叆鍓�5鐨勮鲸璇嗗害鑰�2 data = RadicalBuyBlockManager().get_history_index(code, block, yesterday_limit_up_codes) if data[1]: before_codes = set([x[0] for x in data[1]]) before_codes &= set(special_codes) - if before_codes: - # 涓嶆槸杈ㄨ瘑搴﹁�佸ぇ + if len(before_codes) > 1: + # 杈ㄨ瘑搴﹁�佷笁鍙婁互鍚庝笉鑳戒拱 return False + if len(before_codes) == 1: + # 杈ㄨ瘑搴﹁��2闇�瑕佸湪娴佸叆鍓�5 + in_blocks: list = RealTimeKplMarketData.get_top_market_jingxuan_blocks() + if not in_blocks or block not in in_blocks or in_blocks.index(block) >= 5: + return False return True -- Gitblit v1.8.0