| | |
| | | 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})" |
| | | except Exception as e: |
| | | l2_log.info(code, logger_l2_error, "板上放量不足异常:{}",str(e)) |
| | | l2_log.info(code, logger_l2_error, "板上放量不足异常:{}", str(e)) |
| | | return False, True, f"板上放量不足" |
| | | # 上证下单需要有成交大单(包含主动买与被动买)或者挂买的大单 |
| | | if tool.is_sh_code(code): |
| | |
| | | code) / 1000 |
| | | # 如果是首次下单,增加一次下单次数 |
| | | place_order_count = trade_data_manager.PlaceOrderCountManager().get_place_order_count(code) |
| | | if place_order_count ==0: |
| | | if place_order_count == 0: |
| | | trade_data_manager.PlaceOrderCountManager().place_order(code) |
| | | return False, True, f"执行位批次数据量({buy_count})大于{THRESHOLD_BUY_COUNT} {range_indexes[0]}-{range_indexes[1]}" |
| | | # 暂时注释想买单功能 |