Administrator
2024-05-16 0b6850cb641bf704b7feb050a6e481553f639e06
l2/l2_data_manager_new.py
@@ -988,18 +988,22 @@
            # 1.当前成交价为涨停价
            # 2.总卖额为0
            if abs(float(limit_up_price) - float(trade_price)) < 0.001:
                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"
                # 获取最近的非涨停价成交时间
                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"
            # 判断成交进度是否距离我们的位置很近
            trade_index, is_default = cls.__TradeBuyQueue.get_traded_index(code)
            if False and not is_default and trade_index: