From 1e4f7d33a46cfa5abf0287f62ffd08deec83b471 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期三, 10 四月 2024 10:12:40 +0800
Subject: [PATCH] 只保留激进下单

---
 l2/l2_data_manager_new.py |   40 ++++++++++++++++++++--------------------
 1 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/l2/l2_data_manager_new.py b/l2/l2_data_manager_new.py
index fa12fbf..4e5c9f0 100644
--- a/l2/l2_data_manager_new.py
+++ b/l2/l2_data_manager_new.py
@@ -1313,25 +1313,25 @@
                 order_begin_pos.sell_info = sell_info
                 fast_msg = sell_info
 
-            if not has_single:
-                # 绗簩姝ワ細璁$畻闂數涓嬪崟淇″彿
-                has_single, _index, sell_info = cls.__compute_fast_order_begin_pos(code, compute_start_index,
-                                                                                   compute_end_index)
-                fast_msg = None
-                if has_single:
-                    order_begin_pos.mode = OrderBeginPosInfo.MODE_FAST
-                    order_begin_pos.sell_info = sell_info
-                elif _index is not None and _index < 0:
-                    fast_msg = sell_info
-                    # 绗笁姝�: 璁$畻甯歌涔板叆淇″彿
-                    has_single, _index = cls.__compute_order_begin_pos(code, max(
-                        (compute_start_index - continue_count - 1) if new_add else compute_start_index, 0),
-                                                                       continue_count,
-                                                                       compute_end_index)
-                    order_begin_pos.mode = OrderBeginPosInfo.MODE_NORMAL
-                    # 鑾峰彇鏈�鏂扮殑涔颁俊鎭�
-                    sell_info = cls.__L2MarketSellManager.get_current_total_sell_data(code)
-                    order_begin_pos.sell_info = sell_info
+            # if not has_single:
+            #     # 绗簩姝ワ細璁$畻闂數涓嬪崟淇″彿
+            #     has_single, _index, sell_info = cls.__compute_fast_order_begin_pos(code, compute_start_index,
+            #                                                                        compute_end_index)
+            #     fast_msg = None
+            #     if has_single:
+            #         order_begin_pos.mode = OrderBeginPosInfo.MODE_FAST
+            #         order_begin_pos.sell_info = sell_info
+            #     elif _index is not None and _index < 0:
+            #         fast_msg = sell_info
+            #         # 绗笁姝�: 璁$畻甯歌涔板叆淇″彿
+            #         has_single, _index = cls.__compute_order_begin_pos(code, max(
+            #             (compute_start_index - continue_count - 1) if new_add else compute_start_index, 0),
+            #                                                            continue_count,
+            #                                                            compute_end_index)
+            #         order_begin_pos.mode = OrderBeginPosInfo.MODE_NORMAL
+            #         # 鑾峰彇鏈�鏂扮殑涔颁俊鎭�
+            #         sell_info = cls.__L2MarketSellManager.get_current_total_sell_data(code)
+            #         order_begin_pos.sell_info = sell_info
             # 濡傛灉涔板叆淇″彿涓庝笂娆$殑涔板叆淇″彿涓�鏍峰氨涓嶈兘绠楁柊鐨勪俊鍙�
             if cls.__last_buy_single_dict.get(code) == _index:
                 has_single = None
@@ -1661,7 +1661,7 @@
                     threshold_money -= val["num"] * int(float(val["price"]) * 100)
                 elif L2DataUtil.is_buy(val):
                     # 鍒ゆ柇浠锋牸锛堝ぇ浜庡崠1锛� 琚拱鍚冩帀
-                    if round( float(val["price"]),2) - sell_1_price >=0:
+                    if round(float(val["price"]), 2) - sell_1_price >= 0:
                         threshold_money -= val["num"] * int(float(val["price"]) * 100)
             # 绗簩姝ワ細璁$畻璧峰淇″彿
             second_930 = 9 * 3600 + 30 * 60 + 0

--
Gitblit v1.8.0