From 306f896df9ad1a51dd30b291284a22c12e16597f Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期二, 11 六月 2024 23:32:01 +0800
Subject: [PATCH] 更改板上放量不足规则/L前囊括规则修改

---
 l2/l2_data_manager_new.py |   21 ++++++++-------------
 1 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/l2/l2_data_manager_new.py b/l2/l2_data_manager_new.py
index ab046be..2327782 100644
--- a/l2/l2_data_manager_new.py
+++ b/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:

--
Gitblit v1.8.0