Administrator
2024-12-24 5afbce25e8903e4ceae59abf393b844d23fd2d45
trade/buy_radical/radical_buy_data_manager.py
@@ -220,20 +220,20 @@
        @param is_refered: 是否是参考票
        @param code: 代码
        @param total_sell_volume: 总卖量
        @return: 是否可以买, 原因
        @return: 是否可以买, 原因, 是否可拉黑
        """
        if WantBuyCodesManager().is_in_cache(code):
            return True, "已加想"
            return True, "已加想", False
        k_format = None
        if not constant.TEST:
            k_format = code_nature_analyse.CodeNatureRecordManager().get_k_format_cache(code)
        if k_format:
            if not k_format[13]:
                return False, "近60个交易日无涨停"
                return False, "近60个交易日无涨停", True
            if k_format[14]:
                # 昨天炸板,一律不买
                return False, f"昨日炸板"
                return False, f"昨日炸板", True
        # 获取涨停价
        price = gpcode_manager.get_limit_up_price_as_num(code)
        if not price:
@@ -241,7 +241,7 @@
            price = L1DataManager.get_l1_current_price(code)
        if price:
            if price < constant.MIN_CODE_RADICAL_BUY_PRICE or price > constant.MAX_CODE_RADICAL_BUY_PRICE:
                return False, "价格不满足需求"
                return False, "价格不满足需求", True
        # 判断自由流通股本
        zyltgb = global_util.zyltgb_map.get(code)
        if zyltgb:
@@ -252,17 +252,17 @@
                    zylt_can_buy = True
                    break
            if not zylt_can_buy:
                return False, "自由流通市值/价格不满足扫的范围"
                return False, "自由流通市值/价格不满足扫的范围", True
        # 判断昨日是否跌幅过大
        if k_format and len(k_format) > 12 and k_format[12]:
            return False, "上个交易日跌幅过大"
            return False, "上个交易日跌幅过大", True
        if gpcode_manager.BlackListCodeManager().is_in_cache(code):
            if deal_codes is not None and code in deal_codes:
                pass
            else:
                # 拉黑且不是已经买入性质的拉黑
                return False, "已拉黑"
                return False, "已拉黑", False
        if is_refered:
            # 参考票没有大单
@@ -275,16 +275,16 @@
            if not constant.TEST:
                big_order_deal_enough = is_big_order_deal_enough(code, volume_rate, 0)
            if not big_order_deal_enough[0] and big_order_deal_enough[2]:
                return False, "交易前两分钟大单不足"
                return False, "交易前两分钟大单不足", False
        jx_out_blocks = RealTimeKplMarketData.get_top_market_jingxuan_out_blocks()
        if jx_out_blocks:
            blocks = RadicalBuyBlockManager.get_code_blocks(code)[0]
            same_blocks = blocks & set(jx_out_blocks)
            if same_blocks:
                return False, f"【{same_blocks}】板块精选流出"
                return False, f"【{same_blocks}】板块精选流出", False
        return True, ""
        return True, "", False
    @classmethod
    def big_order_deal(cls, code):
@@ -1171,7 +1171,7 @@
    """
    THRESHOLD_MONEY = BeforeSubDealBigOrderManager().get_big_order_threshold(code)
    TOTAL_BIG_DEAL_MONEY_THRESHOLD_COUNT = round(
        code_volumn_manager.CodeVolumeManager().get_max_volume_in_5days(code) * limit_up_price / 1e8, 2)
        code_volumn_manager.CodeVolumeManager().get_max_volume_in_5days(code) * limit_up_price / 1e8, 2) * 1.2
    if tool.is_ge_code(code):
        TOTAL_BIG_DEAL_MONEY_THRESHOLD_COUNT *= 3.3