| | |
| | | rate = round(total_deal_money / total_fast_money, 2) |
| | | if total_deal_money >= threash_money_w * 10000 and rate >= 0.25: |
| | | return True, f"近1s有大卖单({round(total_deal_money / 10000, 1)}万/{threash_money_w}万,成交占比:{total_deal_money}/{total_fast_money})" |
| | | else: |
| | | l2_log.s_cancel_debug(code, f"S快撤没达到撤单比例:成交金额({total_deal_money})/囊括金额({total_fast_money}),比例:{rate} 大单阈值:{threash_money_w}w") |
| | | return False, f"无{threash_money_w}大单" |
| | | |
| | | # big_sell_order_info格式:[总共的卖单金额, 大卖单详情列表] |
| | |
| | | |
| | | if big_sell_order_info[0] < 500000 or not big_sell_order_info[1]: |
| | | return False, "无大单卖" |
| | | l2_log.s_cancel_debug(code, f"主动卖:{big_sell_order_info}") |
| | | try: |
| | | need_cancel, cancel_msg = self.__need_cancel_for_big_sell_order(code, big_sell_order_info, order_begin_pos) |
| | | if need_cancel: |
| | |
| | | if need_cancel: |
| | | return need_cancel, cancel_msg |
| | | # S后撤取消 |
| | | # if self.__latest_process_sell_order_no.get(code) != big_sell_order_info[1][-1][0]: |
| | | # # 不处理重复的卖单 |
| | | # # 获取最新的成交时间 |
| | | # latest_trade_time = l2_huaxin_util.convert_time(big_sell_order_info[1][-1][4][0]) |
| | | # if tool.trade_time_sub(latest_trade_time, |
| | | # total_datas[order_begin_pos.buy_single_index]['val']['time']) >= 180: |
| | | # self.__compute_down_cancel_watch_index(code, big_sell_order_info, total_datas) |
| | | if self.__latest_process_sell_order_no.get(code) != big_sell_order_info[1][-1][0]: |
| | | # 不处理重复的卖单 |
| | | # 获取最新的成交时间 |
| | | latest_trade_time = l2_huaxin_util.convert_time(big_sell_order_info[1][-1][4][0]) |
| | | if tool.trade_time_sub(latest_trade_time, |
| | | total_datas[order_begin_pos.buy_single_index]['val']['time']) >= 180: |
| | | self.__compute_down_cancel_watch_index(code, big_sell_order_info, total_datas) |
| | | return False, "不满足撤单条件" |
| | | finally: |
| | | # self.__latest_process_sell_order_no[code] = big_sell_order_info[1][-1][0] |
| | | self.__latest_process_sell_order_no[code] = big_sell_order_info[1][-1][0] |
| | | pass |
| | | |
| | | def need_cancel_for_down(self, code, start_index, end_index): |