Administrator
2024-09-26 f0743a9c8e4cc247a213804cc68c7fa26f173736
扫入策略调正
1个文件已修改
20 ■■■■ 已修改文件
third_data/code_plate_key_manager.py 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
third_data/code_plate_key_manager.py
@@ -1363,22 +1363,30 @@
        if len(current_before_codes_info) < 2:
            return False, f"前排代码小于2个:{current_before_codes_info}"
        if current_before_codes_info[0][1] < kpl_block_util.open_limit_up_time_range[1]:
            return False, f"有开1:{current_before_codes_info}"
        # 老大,老二必须相隔5分钟内
        if current_before_codes_info[1][1] - current_before_codes_info[0][1] >= 5 * 60:
            return False, f"老大老二涨停时间必须间隔5分钟内"
        # if current_before_codes_info[1][1] - current_before_codes_info[0][1] >= 5 * 60:
        #     return False, f"老大老二涨停时间必须间隔5分钟内"
        # 获取当前代码的涨停时间
        limit_up_timestamp = LimitUpDataConstant.get_first_limit_up_time(code)
        if not limit_up_timestamp:
            limit_up_timestamp = time.time()
        if limit_up_timestamp - current_before_codes_info[0][1] >= 15 * 60:
            return False, f"距离老大涨停已过去10分钟({current_before_codes_info[0]})"
            return False, f"距离老大涨停已过去15分钟({current_before_codes_info[0]})"
        history_index, history_before_codes_info = cls.__get_history_index(code, block, set())
        history_before_codes = [x[0] for x in history_before_codes_info]
        # 判断是否是老3且与老二间隔5分钟以内
        if current_index == 2 and history_index == 2:
            if limit_up_timestamp - current_before_codes_info[-1][1] <= 5 * 60:
                if RedicalBuyDataManager.can_buy(code)[0]:
                    return True, f"老二老三间隔5分钟内:前排代码-{current_before_codes_info}"
        if current_before_codes_info[0][1] < kpl_block_util.open_limit_up_time_range[1]:
            return False, f"有开1:{current_before_codes_info}"
        # 前两个代码是否有炸板
        dif_codes = set(history_before_codes[:2]) - set(current_before_codes[:2])
@@ -1396,7 +1404,7 @@
            # pre_code不能买,才能买
            if RedicalBuyDataManager.can_buy(pre_code)[0]:
                return False, f"前排代码可买:{pre_code}"
        return True, "满足买入需求"
        return True, f"满足买入需求: 前排代码-{current_before_codes_info}"
    @classmethod
    def is_radical_buy(cls, code, yesterday_limit_up_codes):