Administrator
5 天以前 2f6456ded1a7fdcdc29968d9d6dc3c3cb11174c1
L后还没找到真实下单位置的默认撤单率修改/L后修改阈值的策略修改
2个文件已修改
13 ■■■■ 已修改文件
api/outside_api_command_callback.py 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cancel_strategy/s_l_h_cancel_strategy.py 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/outside_api_command_callback.py
@@ -1542,13 +1542,15 @@
                                       request_id)
                    return
                rate = round(rate, 2)
                old_rate = LCancelRateManager().get_cancel_rate(0)[0]
                # L后数据快照
                last_info = LCancelBigNumComputer().statistic_l_down_watch_indexes_info(code)
                LDownCancelWatchIndexStatisticManager().set_statistic_info(code, last_info)
                CancelRateHumanSettingManager().set_l_down(code, rate)
                # L后重新囊括
                LCancelBigNumComputer().re_compute_l_down_watch_indexes(code)
                if rate < old_rate:
                    # 改小才能重新囊括
                    LCancelBigNumComputer().re_compute_l_down_watch_indexes(code)
                self.send_response({"code": 0, "data": {}},
                                   client_id,
                                   request_id)
cancel_strategy/s_l_h_cancel_strategy.py
@@ -1733,8 +1733,13 @@
                        # 没有人为设置
                        # 目标撤单比例大于大单撤单比例就取比例均值
                        thresh_hold_rate = round((thresh_hold_rate + temp_thresh_hold_rate) / 2, 2)
            real_place_order_info = self.__real_place_order_index_dict.get(code)
            is_default_place_order_index = real_place_order_info[1] if real_place_order_info else False
            if is_default_place_order_index:
                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}")
                                  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}")
            if rate >= thresh_hold_rate:
                canceled_indexes.sort()
                l2_log.l_cancel_debug(code, f"L后撤单,撤单位置:{canceled_indexes[-1]}")