From 3d0f5776958434c1d19179f7427a4773c6f7383c Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期四, 11 九月 2025 14:32:19 +0800 Subject: [PATCH] L后撤单添加日志 --- cancel_strategy/s_l_h_cancel_strategy.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/cancel_strategy/s_l_h_cancel_strategy.py b/cancel_strategy/s_l_h_cancel_strategy.py index b1f757a..52298b9 100644 --- a/cancel_strategy/s_l_h_cancel_strategy.py +++ b/cancel_strategy/s_l_h_cancel_strategy.py @@ -1806,9 +1806,10 @@ canceled_buyno_map = local_today_canceled_buyno_map.get(code) # 濡傛灉鎾ゅ崟姣斾緥璁剧疆涓�100%灏变笉闇�瑕佽绠椾笅鍗曚綅鍚庨潰鐨勮鍗� - need_compute_after = abs(thresh_hold_rate - 1.00) > 0.0001 + need_compute_after = False if thresh_hold_rate - 1.00 >= -0.0001 else True dealing_info = HuaXinBuyOrderManager.get_dealing_order_info(code) + canceled_watch_indexes = set() for wi in watch_indexes: cancel_data = L2DataComputeUtil.is_canceled(code, wi, total_data, canceled_buyno_map, dealing_info[0] if dealing_info else None, @@ -1827,6 +1828,7 @@ 10 - after_place_order_index_by_dict[str(wi)]) // 10 else: canceled_num += total_data[wi]["val"]["num"] + canceled_watch_indexes.add(wi) canceled_indexes.append(cancel_data["index"]) # if wi == watch_indexes_list[-1] and left_count == 0: # # 绂讳笅鍗曚綅缃渶杩戠殑涓�涓挙鍗曪紝蹇呴』瑙﹀彂鎾ゅ崟 @@ -1854,6 +1856,7 @@ thresh_hold_rate = min(0.49, thresh_hold_rate) l2_log.l_cancel_debug(code, f"L鍚庤绠楄寖鍥达細{start_index}-{end_index},宸叉挙鍗曟瘮渚嬶細{rate}/{thresh_hold_rate}, 涓嬪崟浣嶄箣鍚庣殑绱㈠紩锛歿after_place_order_index_dict}, 鏈�澶у崟-({max_num}锛寋max_num_count}), 浜轰负璁剧疆-{cancel_rate_info}, 鐪熷疄涓嬪崟浣�-{real_place_order_info}, 澶у崠鍗曟垚浜わ細{total_sell_nums}鎵�") + l2_log.l_cancel_debug(code, f"L鍚庡凡鎾ゆ墜鏁帮細{canceled_num}/{total_num} 鎾ゅ崟绱㈠紩锛歿canceled_watch_indexes}") if rate >= thresh_hold_rate: canceled_indexes.sort() l2_log.l_cancel_debug(code, f"L鍚庢挙鍗�,鎾ゅ崟浣嶇疆锛歿canceled_indexes[-1]}") -- Gitblit v1.8.0