| | |
| | | cls.unreal_buy_dict.pop(code) |
| | | |
| | | @classmethod |
| | | def set_real_place_order_index(cls, code, index, order_begin_pos:OrderBeginPosInfo): |
| | | def set_real_place_order_index(cls, code, index, order_begin_pos: OrderBeginPosInfo): |
| | | trade_record_log_util.add_real_place_order_position_log(code, index, order_begin_pos.buy_single_index) |
| | | if order_begin_pos.mode == OrderBeginPosInfo.MODE_FAST: |
| | | need_cancel = FastCancelBigNumComputer().set_real_order_index(code, index) |
| | |
| | | cls.volume_rate_info[code][1], |
| | | is_first_code) |
| | | if b_need_cancel and b_cancel_data: |
| | | return b_cancel_data, "H撤销比例触发阈值" |
| | | return b_cancel_data, "H撤" |
| | | except Exception as e: |
| | | if constant.TEST: |
| | | logging.exception(e) |
| | |
| | | end_index, total_data, |
| | | is_first_code) |
| | | if b_need_cancel and b_cancel_data: |
| | | return b_cancel_data, f"L撤销比例触发阈值({extra_msg})" |
| | | return b_cancel_data, f"L撤({extra_msg})" |
| | | except Exception as e: |
| | | async_log_util.error(logger_l2_error, |
| | | f"L撤出错 参数:buy_single_index-{_buy_single_index} buy_exec_index-{_buy_exec_index} 错误原因:{str(e)}") |
| | |
| | | # 尝试计算快速成交信号 |
| | | has_single, _index, sell_info = cls.__compute_fast_order_begin_pos(code, compute_start_index, |
| | | compute_end_index) |
| | | fast_msg = None |
| | | if has_single: |
| | | order_begin_pos.mode = OrderBeginPosInfo.MODE_FAST |
| | | order_begin_pos.sell_info = sell_info |
| | | elif _index is not None and _index < 0: |
| | | fast_msg = sell_info |
| | | continue_count = cls.__l2PlaceOrderParamsManagerDict[code].get_begin_continue_buy_count() |
| | | # 有买入信号 |
| | | has_single, _index = cls.__compute_order_begin_pos(code, max( |
| | |
| | | order_begin_pos.num = 0 |
| | | order_begin_pos.count = 0 |
| | | order_begin_pos.buy_single_index = buy_single_index |
| | | |
| | | if sell_info: |
| | | order_begin_pos.threshold_money = sell_info[1] |
| | | l2_log.debug(code, "获取到买入信号起始点:{} ,计算范围:{}-{} ,量比:{},数据:{} 模式:{}", buy_single_index, |
| | | l2_log.debug(code, "获取到买入信号起始点:{} ,计算范围:{}-{} ,量比:{},数据:{} 模式:{}({})", buy_single_index, |
| | | compute_start_index, |
| | | compute_end_index, cls.volume_rate_info[code], total_datas[buy_single_index], |
| | | order_begin_pos.mode) |
| | | order_begin_pos.mode, fast_msg) |
| | | |
| | | # _start_time = l2_data_log.l2_time(code, tool.get_now_timestamp() - _start_time, "下单信号计算时间") |
| | | |