| | |
| | | |
| | | if order_begin_pos.MODE_RADICAL == order_begin_pos.mode: |
| | | # 积极下单不判断条件 |
| | | can, need_clear_data, reason, is_valid_exec_index = True, False, "激进下单", True |
| | | can, need_clear_data, reason, is_valid_exec_index = True, False, "扫入下单", True |
| | | else: |
| | | can, need_clear_data, reason, is_valid_exec_index = cls.__can_buy_first(code) |
| | | |
| | |
| | | # 是否是交易队列触发 |
| | | order_begin_pos = cls.__get_order_begin_pos( |
| | | code) |
| | | # 激进下单只有L撤能撤单 |
| | | # 扫入下单只有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}: |
| | | return False |
| | |
| | | buy_count += int(total_datas[i]["re"]) |
| | | if buy_nums >= threshold_num: |
| | | l2_log.info(code, logger_l2_trade_buy, |
| | | f"{code}获取到买入执行点(激进下单):{i} 统计纯买手数:{buy_nums} 目标纯买手数:{threshold_num} 统计纯买单数:{buy_count}") |
| | | f"{code}获取到买入执行点(积极下单):{i} 统计纯买手数:{buy_nums} 目标纯买手数:{threshold_num} 统计纯买单数:{buy_count}") |
| | | elif L2DataUtil.is_limit_up_price_buy_cancel(_val): |
| | | # 判断买入位置是否在买入信号之前 |
| | | buy_index = l2_data_source_util.L2DataSourceUtils.get_buy_index_with_cancel_data_v2(total_datas[i], |
| | |
| | | |
| | | safe_count = 1 |
| | | if active_buy_blocks and current_sell_data[1] > 5000000: |
| | | # 有激进板块且大于500w才能激进下单 |
| | | # 有激进板块且大于500w才能扫入下单 |
| | | safe_count = 1 |
| | | else: |
| | | # 无激进下单板块 |