| | |
| | | return True, f"剩余笔数({total_left_count})/金额({round(total_left_num * float(limit_up_price) * 100)})不足,成交进度:{trade_index},真实下单位置:{real_order_index} 阈值:({THRESHOLD_MONEY_W},{THRESHOLD_COUNT}) " |
| | | return False, f"不满足撤单条件: 成交进度-{trade_index} 真实下单位置-{real_order_index} total_left_count-{total_left_count} total_left_num-{total_left_num}" |
| | | |
| | | # 距离太近,封单不足,有大单50w大单砸下来就撤 |
| | | def need_cancel_for_p(self, code, big_sell_order_info, order_begin_pos): |
| | | # 距离太近,封单不足 |
| | | def need_cancel_for_p(self, code, order_begin_pos): |
| | | if not order_begin_pos or not order_begin_pos.buy_exec_index or order_begin_pos.buy_exec_index < 0: |
| | | return False, "尚未下单" |
| | | |
| | | if big_sell_order_info[0] < 50 * 10000 or not big_sell_order_info[1]: |
| | | return False, "不为大单" |
| | | # 判断是否具有真实的下单位置 |
| | | real_order_index_info = self.__get_real_order_index_cache(code) |
| | | if not real_order_index_info: |
| | |
| | | if trade_index is None: |
| | | trade_index = 0 |
| | | real_order_index = real_order_index_info[0] |
| | | if real_order_index_info[0] <= trade_index: |
| | | if real_order_index <= trade_index: |
| | | return False, "真实下单位在成交位之前" |
| | | |
| | | start_order_no = big_sell_order_info[1][-1][4][1] |
| | | real_trade_index = trade_index |
| | | # 统计未撤订单的数量与金额 |
| | | total_datas = local_today_datas.get(code) |
| | | for i in range(trade_index, real_order_index): |
| | | data = total_datas[i] |
| | | val = data['val'] |
| | | if not L2DataUtil.is_limit_up_price_buy(val): |
| | | continue |
| | | if int(val['orderNo']) < start_order_no: |
| | | continue |
| | | real_trade_index = i |
| | | break |
| | | |
| | | # 是否是下单3分钟内 |
| | | sub_time = tool.trade_time_sub(total_datas[-1]['val']['time'], total_datas[real_order_index]['val']['time']) |
| | | if sub_time > 30: |
| | |
| | | left_money = total_left_num * float(limit_up_price) |
| | | if left_money < 1000 * 100: |
| | | # 实际下单位后方所有涨停纯买额≤1000万 |
| | | return True, f"P撤:封单纯买额-{round(left_money / 100, 1)}万 大单数量-{total_big_num_count} 下单位-{real_order_index} 成交位-{real_trade_index}" |
| | | return True, f"P撤:封单纯买额-{round(left_money / 100, 1)}万 大单数量-{total_big_num_count} 下单位-{real_order_index}" |
| | | return False, "不满足撤单条件" |
| | | |
| | | # w撤 |