From 8b848e8a9fa242b39f92f3a28faf89be10a6e456 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期五, 17 三月 2023 17:43:32 +0800
Subject: [PATCH] 首板策略优化

---
 l2/l2_data_manager.py |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/l2/l2_data_manager.py b/l2/l2_data_manager.py
index cd31dc7..5ec4667 100644
--- a/l2/l2_data_manager.py
+++ b/l2/l2_data_manager.py
@@ -48,9 +48,9 @@
         _key = "buy_compute_index_info-{}".format(code)
         _data_json = redis.get(_key)
         if _data_json is None:
-            return None, None, None, 0, 0, []
+            return None, None, None, 0, 0, [],0
         _data = json.loads(_data_json)
-        return _data[0], _data[1], _data[2], _data[3], _data[4], _data[5]
+        return _data[0], _data[1], _data[2], _data[3], _data[4], _data[5], _data[6]
 
     # 璁剧疆涔板叆鐐圭殑鍊�
     # buy_single_index 涔板叆淇″彿浣�
@@ -58,17 +58,17 @@
     # compute_index 璁$畻浣嶇疆
     # nums 绱绾拱棰�
     @staticmethod
-    def set_buy_compute_start_data(code, buy_single_index, buy_exec_index, compute_index, nums, count, max_num_sets):
+    def set_buy_compute_start_data(code, buy_single_index, buy_exec_index, compute_index, nums, count, max_num_sets, volume_rate):
         redis = TradePointManager.__get_redis()
         expire = tool.get_expire()
         _key = "buy_compute_index_info-{}".format(code)
         if buy_single_index is not None:
             redis.setex(_key, expire,
-                        json.dumps((buy_single_index, buy_exec_index, compute_index, nums, count, list(max_num_sets))))
+                        json.dumps((buy_single_index, buy_exec_index, compute_index, nums, count, list(max_num_sets),volume_rate)))
         else:
-            _buy_single_index, _buy_exec_index, _compute_index, _nums, _count, _max_num_index = TradePointManager.get_buy_compute_start_data(code)
+            _buy_single_index, _buy_exec_index, _compute_index, _nums, _count, _max_num_index,_volume_rate = TradePointManager.get_buy_compute_start_data(code)
             redis.setex(_key, expire,
-                        json.dumps((_buy_single_index, buy_exec_index, compute_index, nums, count, list(max_num_sets))))
+                        json.dumps((_buy_single_index, buy_exec_index, compute_index, nums, count, list(max_num_sets),volume_rate)))
 
     # 鑾峰彇鎾や拱鍏ュ紑濮嬭绠楃殑淇℃伅
     # 杩斿洖鏁版嵁鐨勫唴瀹逛负锛氭挙閿�鐐圭储寮� 鎾や拱绾拱棰� 璁$畻鐨勬暟鎹储寮�

--
Gitblit v1.8.0