Administrator
2025-07-08 f58896c601bfc08a3e73a4f677e860fa4977eadf
cancel_strategy/s_l_h_cancel_strategy.py
@@ -1589,9 +1589,12 @@
            if not must_buy:
                temp_thresh_hold_rate = round((total_num - max_num * max_num_count) * 0.8 / total_num, 2)
                if thresh_hold_rate > temp_thresh_hold_rate:
                    # 目标撤单比例大于大单撤单比例就取比例均值
                    thresh_hold_rate = round((thresh_hold_rate + temp_thresh_hold_rate) / 2, 2)
                    if cancel_rate_info and cancel_rate_info[1] > 0:
                        pass
                    else:
                        # 没有人为设置
                        # 目标撤单比例大于大单撤单比例就取比例均值
                        thresh_hold_rate = round((thresh_hold_rate + temp_thresh_hold_rate) / 2, 2)
            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})")
            if rate >= thresh_hold_rate: