| | |
| | | cls.__process_not_order(code, cancel_data["index"] + 1, end_index, capture_time, is_first_code) |
| | | finally: |
| | | l2_log.debug(code, "触发撤单,撤单位置:{} ,撤单原因:{}, 下单模式:{}", cancel_data["index"], cancel_msg, |
| | | f"{order_begin_pos.mode}") |
| | | f"{order_begin_pos.mode}") |
| | | else: |
| | | pass |
| | | |
| | |
| | | order_begin_pos.buy_exec_index, |
| | | local_today_datas.get(code)) |
| | | return False |
| | | l2_log.debug(code, "可以下单,原因:{}, 下单模式:{} 最小订单号:{}", reason, order_begin_pos.mode, order_begin_pos.min_order_no) |
| | | l2_log.debug(code, "可以下单,原因:{}, 下单模式:{} 最小订单号:{}", reason, order_begin_pos.mode, |
| | | order_begin_pos.min_order_no) |
| | | l2_log.debug(code, "开始执行买入") |
| | | trade_manager.start_buy(code, capture_timestamp, last_data, |
| | | last_data_index, order_begin_pos.mode, order_begin_pos.buy_exec_index) |
| | |
| | | # 扫入下单只有L撤能撤单 |
| | | if order_begin_pos and order_begin_pos.mode == OrderBeginPosInfo.MODE_RADICAL and cancel_type not in { |
| | | trade_constant.CANCEL_TYPE_L_DOWN, trade_constant.CANCEL_TYPE_L, trade_constant.CANCEL_TYPE_RD, |
| | | trade_constant.CANCEL_TYPE_P}: |
| | | trade_constant.CANCEL_TYPE_P, trade_constant.CANCEL_TYPE_F}: |
| | | 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, trade_constant.CANCEL_TYPE_RD, |
| | | trade_constant.CANCEL_TYPE_P}: |
| | | trade_constant.CANCEL_TYPE_P, trade_constant.CANCEL_TYPE_F}: |
| | | l2_log.cancel_debug(code, "撤单中断,原因:{}", "加绿不是L撤") |
| | | return False |
| | | |