| | |
| | | @param yesterday_limit_up_codes 昨日涨停代码 |
| | | @return: |
| | | """ |
| | | |
| | | new_blocks = LimitUpCodesBlockRecordManager().get_new_blocks() |
| | | if not new_blocks or block not in new_blocks: |
| | | return False, "非新题材" |
| | | |
| | | # 9:45点之前涨停的才能买入 |
| | | # 获取当前代码的涨停时间 |
| | | limit_up_timestamp = cls.__get_limit_up_timestamp(code) |
| | |
| | | @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 |
| | | |
| | |
| | | @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( |
| | |
| | | |
| | | # 判断是净流入前排 |
| | | 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: |
| | |
| | | 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) |
| | |
| | | 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 |
| | | |
| | | |