| | |
| | | return fresult |
| | | |
| | | |
| | | |
| | | |
| | | # 实时开盘啦市场数据 |
| | | class RealTimeKplMarketData: |
| | | # 精选前5 |
| | |
| | | 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) |
| | | |
| | | |
| | |
| | | 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 |
| | | |
| | | |
| | |
| | | |
| | | 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) |