| | |
| | | # ------------挂单时间约束---------- |
| | | order_begin_pos = cls.__get_order_begin_pos( |
| | | code) |
| | | if not trade_result_manager.can_place_order_for_cancel_time(code, total_data[order_begin_pos.buy_exec_index]): |
| | | if not trade_result_manager.can_place_order_for_cancel_time(code, total_data[order_begin_pos.buy_exec_index]) and not gpcode_manager.GreenListCodeManager().is_in_cache(code): |
| | | return False, True, f"距离上次挂单小于时间限制", True |
| | | |
| | | # ------------板块约束------------- |
| | |
| | | # 扫入下单只有L撤能撤单 |
| | | if order_begin_pos and order_begin_pos.mode == OrderBeginPosInfo.MODE_RADICAL and cancel_type not in { |
| | | trade_constant.CANCEL_TYPE_L, trade_constant.CANCEL_TYPE_L_UP, trade_constant.CANCEL_TYPE_L_DOWN}: |
| | | l2_log.cancel_debug(code, "撤单中断,原因:{}", "扫入下单不是L撤") |
| | | return False |
| | | |
| | | # 加绿只有L撤生效 |
| | | if gpcode_manager.GreenListCodeManager().is_in_cache(code): |
| | | if cancel_type not in { trade_constant.CANCEL_TYPE_L, trade_constant.CANCEL_TYPE_L_UP, trade_constant.CANCEL_TYPE_L_DOWN}: |
| | | l2_log.cancel_debug(code, "撤单中断,原因:{}", "加绿不是L撤") |
| | | return False |
| | | total_datas = local_today_datas.get(code) |
| | | if not total_datas: |
| | | return False |