Administrator
2024-11-05 3c8a82df5bdb8f3dbc2b760c7c71623b03936d08
身位太靠后整个代码不扫入
3个文件已修改
27 ■■■■ 已修改文件
third_data/code_plate_key_manager.py 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
third_data/kpl_data_constant.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
trade/radical_buy_strategy.py 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
third_data/code_plate_key_manager.py
@@ -331,8 +331,6 @@
        return fresult
# 实时开盘啦市场数据
class RealTimeKplMarketData:
    # 精选前5
@@ -1602,6 +1600,18 @@
                    can_buy_blocks.add(b)
                    msges.append(f"【{b}】:{result[1]}")
            fmsges.append("板块回封判断##" + ",".join(msges))
        # 如果能扫入就需要获取代码在板块中的身位
        if can_buy_blocks:
            excude_codes = set()
            if kpl_data_constant.open_limit_up_code_dict_for_radical_buy:
                excude_codes |= kpl_data_constant.open_limit_up_code_dict_for_radical_buy.keys()
            # 剔除开1的代码
            for b in keys_:
                history_index, history_before_codes_info = cls.__get_history_index(code, b, yesterday_limit_up_codes,
                                                                                   excude_codes)
                if history_index >= 4:
                    return set(), f"在【{b}】中身位({history_index + 1})靠后"
        return can_buy_blocks, " **** ".join(fmsges)
third_data/kpl_data_constant.py
@@ -3,10 +3,10 @@
from db import redis_manager_delegate as redis_manager
from db.redis_manager_delegate import RedisUtils
# 用于计算激进买开1的板数:{"代码":(几版,{板块})}
from utils import tool
from utils.kpl_data_db_util import KPLLimitUpDataUtil
# 用于计算激进买开1的板数:{"代码":(几版,{板块})}
open_limit_up_code_dict_for_radical_buy = None
trade/radical_buy_strategy.py
@@ -134,10 +134,15 @@
    price = transaction_datas[-1][1]
    huaxin_timestamp = transaction_datas[-1][3]
    # 处于涨停卖的委托订单量
    # 处于涨停卖的委托订单总手数
    selling_num = L2LimitUpSellDataManager.get_delegating_sell_num(code)
    if selling_num:
    if selling_num is None:
        selling_num = 0
    if selling_num is not None:
        # 总卖 = 主动成交的累计金额 + 处于委托状态的涨停卖金额
        total_sell = __deal_active_buy_total_money[code] + selling_num * price
        if total_sell == 0:
            total_sell = 1
        rate = round(__deal_active_buy_total_money[code] / total_sell, 2)
        # 获取当前的成交量比
        limit_up_price = gpcode_manager.get_limit_up_price_as_num(code)