Administrator
2024-06-11 306f896df9ad1a51dd30b291284a22c12e16597f
l2/l2_data_manager_new.py
@@ -1022,19 +1022,14 @@
                not_limit_up_info = current_price_process_manager.get_trade_not_limit_up_info(code)
                if not not_limit_up_info or tool.trade_time_sub(total_data[-1]['val']['time'],
                                                                not_limit_up_info[1]) > 10:
                    # 非涨停价成交10s后才有可能判断为板上放量
                    sell_data = cls.__L2MarketSellManager.get_current_total_sell_data(code)
                    if sell_data and sell_data[1] <= 0:
                        # 板上放量,判断是否有放量,放量才会下单
                        # 获取最近1s的主动卖金额
                        min_time = total_data[order_begin_pos.buy_single_index]['val']['time']
                        min_time = tool.trade_time_add_second(min_time, -1)
                        sell_orders = HuaXinSellOrderStatisticManager.get_latest_transaction_datas(code,
                                                                                                   min_deal_time=min_time)
                        sell_order_num = sum([x[1] for x in sell_orders])
                        sell_money = int(float(limit_up_price) * sell_order_num)
                        if sell_money < 200000:
                            return False, True, f"板上放量金额不足,近1s总卖:{sell_money}小于20w"
                    # 获取最近2s的成交
                    deal_list = HuaXinSellOrderStatisticManager.get_latest_2s_continue_deal_volumes(code)
                    total_deal_volume = 0
                    if deal_list:
                        total_deal_volume = sum([x[1] for x in deal_list])
                    total_deal_money = int(total_deal_volume * float(limit_up_price))
                    if total_deal_money < 200000:
                        return False, True, f"板上放量成交金额不足,近2s总成交金额:{total_deal_money}小于20w"
            # 判断成交进度是否距离我们的位置很近
            trade_index, is_default = cls.__TradeBuyQueue.get_traded_index(code)
            if False and not is_default and trade_index: