Administrator
2024-08-15 0e921bc8d68e830f15bb049dfb84b22bc05db788
bug修复
2个文件已修改
8 ■■■■■ 已修改文件
l2/l2_data_manager_new.py 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/buy_strategy_util.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/l2_data_manager_new.py
@@ -951,9 +951,11 @@
                        if not can_place_order:
                            try:
                                # 不能下单,判断小群撤是否可以下
                                if buy_strategy_util.is_has_small_batch_cancel(code, trade_index, order_begin_pos.buy_single_index):
                                if buy_strategy_util.is_has_small_batch_cancel(code, trade_index,
                                                                               order_begin_pos.buy_single_index):
                                    # 判断撤单比例是否足够
                                    if not buy_strategy_util.is_cancel_rate_reieved(code, 0.69,trade_index, order_begin_pos.buy_single_index):
                                    if not buy_strategy_util.is_cancel_rate_reieved(code, 0.69, trade_index,
                                                                                    order_begin_pos.buy_single_index):
                                        return False, True, f"板上放量不足,有小群撤, 整体撤单比例不足({trade_index}-{order_begin_pos.buy_single_index})"
                                else:
                                    return False, True, f"板上放量不足,且没有小群撤({trade_index}-{order_begin_pos.buy_single_index})"
utils/buy_strategy_util.py
@@ -73,7 +73,7 @@
        if val["num"] < min_num:
            continue
        buy_index = l2_data_source_util.L2DataSourceUtils.get_buy_index_with_cancel_data_v2(val, buyno_map)
        buy_index = l2_data_source_util.L2DataSourceUtils.get_buy_index_with_cancel_data_v2(data, buyno_map)
        if buy_index and start_index <= buy_index:
            cancel_count += 1
    if buy_count == 0: