Administrator
2024-08-19 7b44f8947a94dbe4f7c23a43e6fbfe331f93d29b
整体撤单比例不足加入提示原因
2个文件已修改
14 ■■■■■ 已修改文件
l2/l2_data_manager_new.py 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/buy_strategy_util.py 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/l2_data_manager_new.py
@@ -956,9 +956,11 @@
                            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):
                                    return False, True, f"板上放量距离远({not_limit_up_trade_time_with_ms}),有小群撤, 整体撤单比例不足({trade_index}-{order_begin_pos.buy_single_index})"
                                cancel_rate_reieved_info = buy_strategy_util.is_cancel_rate_reieved(code, 0.69,
                                                                                                    trade_index,
                                                                                                    order_begin_pos.buy_single_index)
                                if not cancel_rate_reieved_info[0]:
                                    return False, True, f"板上放量距离远({not_limit_up_trade_time_with_ms}),有小群撤, 整体撤单比例不足({trade_index}-{order_begin_pos.buy_single_index}){cancel_rate_reieved_info[1]}"
                            else:
                                return False, True, f"板上放量距离远({not_limit_up_trade_time_with_ms}),没有小群撤({trade_index}-{order_begin_pos.buy_single_index})"
                        except Exception as e:
utils/buy_strategy_util.py
@@ -91,10 +91,10 @@
        if buy_index and start_index <= buy_index:
            cancel_count += 1
    if buy_count == 0:
        return False
        return False, "买入数量为0"
    if round(cancel_count / buy_count, 2) > threshhold_rate:
        return True
    return False
        return True, f"买入数量-{buy_count} 撤单数量-{cancel_count}"
    return False, f"买入数量-{buy_count} 撤单数量-{cancel_count}"
def is_far_away_from_trade_index(code, trade_index, buy1_money):