From aa3392d3d5b0b858deedd44abd7c4020eb565f4c Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期三, 16 八月 2023 15:28:42 +0800 Subject: [PATCH] ++++++++++++++++ bug修复 --- l2/cancel_buy_strategy.py | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/l2/cancel_buy_strategy.py b/l2/cancel_buy_strategy.py index 430cf2e..1e5f887 100644 --- a/l2/cancel_buy_strategy.py +++ b/l2/cancel_buy_strategy.py @@ -166,13 +166,11 @@ # 濡傛灉start_index涓巄uy_single_index鐩稿悓锛屽嵆鏄笅鍗曞悗鐨勭涓�娆¤绠� # 闇�瑕佹煡璇拱鍏ヤ俊鍙蜂箣鍓嶇殑鍚�1s鏄惁鏈夋定鍋滄挙鐨勬暟鎹� process_index = process_index_old - # 涓嬪崟娆℃暟 - place_order_count = trade_data_manager.PlaceOrderCountManager().get_place_order_count(code) if buy_single_index == start_index: # 绗�1娆¤绠楅渶瑕佽绠椾拱鍏ヤ俊鍙�-鎵ц浣嶇殑鍑�鍊� left_big_num = self.__compute_left_big_num(code, buy_single_index, buy_single_index, buy_exec_index, - total_data, place_order_count) + total_data, volume_rate_index) buy_num += left_big_num # 璁剧疆涔板叆淇″彿-涔板叆鎵ц浣嶇殑鏁版嵁涓嶉渶瑕佸鐞� start_index = end_index + 1 @@ -233,7 +231,6 @@ cancel_num += data["re"] * int(val["num"]) # 淇濆瓨鏁版嵁 - if need_cancel: rate__ = round(cancel_num / max(buy_num, 1), 2) if rate__ > cancel_rate_threshold: @@ -509,7 +506,6 @@ l2_log.cancel_debug(code, "H绾ф槸鍚﹂渶瑕佹挙鍗曪紝鏁版嵁鑼冨洿锛歿}-{} ", start_index, end_index) # 鑾峰彇涓嬪崟娆℃暟 - place_order_count = trade_data_manager.PlaceOrderCountManager().get_place_order_count(code) cancel_rate_threshold = self.__hCancelParamsManager.get_cancel_rate(volume_index) process_index = start_index # 鏄惁鏈夎娴嬬殑鏁版嵁鎾ゅ崟 -- Gitblit v1.8.0