From 2f2516749615da866e96d8d24e499b7ecbb63a3e Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期一, 23 六月 2025 12:28:52 +0800
Subject: [PATCH] 默认交易模式变更/真实下单位置计算位置修改

---
 l2/l2_data_util.py |   27 ++++-----------------------
 1 files changed, 4 insertions(+), 23 deletions(-)

diff --git a/l2/l2_data_util.py b/l2/l2_data_util.py
index 5130891..e12f024 100644
--- a/l2/l2_data_util.py
+++ b/l2/l2_data_util.py
@@ -113,6 +113,8 @@
         load_sell_no_map(local_today_sellno_map, code, local_today_datas.get(code), force)
         load_canceled_buy_no_map(local_today_canceled_buyno_map, code, local_today_datas.get(code), force)
 
+    constant.L2_DATA_IS_LOADED = True
+
 
 # 灏嗘暟鎹牴鎹畁um-operate鍒嗙被
 def load_num_operate_map(local_today_num_operate_map, code, source_datas, clear=False):
@@ -293,33 +295,12 @@
     return False
 
 
-# 鏄惁涓哄ぇ鍗�
-def is_big_money(val):
-    price = float(val["price"])
-    money = price * int(val["num"])
-    if price > 3.0:
-        if money >= 29900:
-            return True
-        else:
-            return False
-    else:
-        max_money = price * 10000
-        if money >= max_money * 0.95:
-            return True
-        else:
-            return False
-
-
 class L2DataUtil:
     @classmethod
     def is_same_time(cls, time1, time2):
         if constant.TEST:
             return True
-        time1_s = time1.split(":")
-        time1_second = int(time1_s[0]) * 3600 + int(time1_s[1]) * 60 + int(time1_s[2])
-        time2_s = time2.split(":")
-        time2_second = int(time2_s[0]) * 3600 + int(time2_s[1]) * 60 + int(time2_s[2])
-        if abs(time2_second - time1_second) < 3:
+        if abs(tool.trade_time_sub(time1, time2)) < 3:
             return True
         else:
             return False
@@ -639,4 +620,4 @@
 
 
 if __name__ == "__main__":
-    print(L2DataUtil.get_time_with_ms({"time": "10:00:00", "tms": 490}))
+    print(L2DataUtil.time_sub_as_ms({"time": "09:46:05", "tms": 480}, {"time": "09:46:04", "tms": 90}))

--
Gitblit v1.8.0