| | |
| | | |
| | | from utils import tool, trade_util |
| | | from l2.transaction_progress import TradeBuyQueue |
| | | from trade import trade_queue_manager, l2_trade_factor, trade_manager, trade_data_manager |
| | | from trade import trade_queue_manager, l2_trade_factor, trade_manager, trade_data_manager, trade_constant |
| | | from l2 import l2_log, l2_data_source_util, code_price_manager |
| | | from l2.l2_data_util import L2DataUtil, local_today_num_operate_map, local_today_datas, local_today_buyno_map, \ |
| | | local_today_canceled_buyno_map |
| | |
| | | |
| | | |
| | | def set_real_place_position(code, index, buy_single_index=None, is_default=True): |
| | | """ |
| | | 设置真实下单位置 |
| | | @param code: |
| | | @param index: |
| | | @param buy_single_index: |
| | | @param is_default: |
| | | @return: 撤单类型, 撤单原因 |
| | | """ |
| | | # DCancelBigNumComputer().set_real_order_index(code, index) |
| | | s_l_h_cancel_strategy.SCancelBigNumComputer().set_real_place_order_index(code, index, is_default) |
| | | s_l_h_cancel_strategy.LCancelBigNumComputer().set_real_place_order_index(code, index, |
| | | need_cancel, cancel_msg = s_l_h_cancel_strategy.LCancelBigNumComputer().set_real_place_order_index(code, index, |
| | | buy_single_index=buy_single_index, |
| | | is_default=is_default) |
| | | if need_cancel: |
| | | return trade_constant.CANCEL_TYPE_L, cancel_msg |
| | | s_l_h_cancel_strategy.HourCancelBigNumComputer().set_real_place_order_index(code, index, buy_single_index) |
| | | NewGCancelBigNumComputer().set_real_place_order_index(code, index, buy_single_index, is_default) |
| | | FCancelBigNumComputer().set_real_order_index(code, index, is_default) |
| | | JCancelBigNumComputer().set_real_place_order_index(code, index, buy_single_index, is_default) |
| | | NBCancelBigNumComputer().set_real_place_order_index(code, index, buy_single_index, is_default) |
| | | RDCancelBigNumComputer().set_real_place_order_index(code, index, buy_single_index, is_default) |
| | | return None, '' |
| | | |
| | | |
| | | class BaseCancel: |
| | |
| | | return True |
| | | return False |
| | | |
| | | |
| | | # ---------------------------------RD撤------------------------------- |
| | | # 扫入下单大单撤 |
| | | class RDCancelBigNumComputer: |