| | |
| | | need_cancel, cancel_msg = self.__need_cancel_for_up(code, big_sell_order_info, total_datas) |
| | | if need_cancel: |
| | | return need_cancel, cancel_msg |
| | | 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) |
| | | # 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) |
| | | return False, "不满足撤单条件" |
| | | finally: |
| | | self.__latest_process_sell_order_no[code] = big_sell_order_info[1][-1][0] |
| | |
| | | # 获取撤单比例,返回(撤单比例,是否必买) |
| | | @classmethod |
| | | def get_cancel_rate(cls, code, buy_exec_time, is_up=False, is_l_down_recomputed=False): |
| | | # 下单15s内撤单比例为设置为29% -- 暂时不生效 |
| | | # if not is_up and tool.trade_time_sub(tool.get_now_time_str(), buy_exec_time) <= 15: |
| | | # return 0.29, False |
| | | try: |
| | | must_buy_cancel_rate = cls.__MustBuyCodesManager.get_cancel_rate_cache(code) |
| | | if must_buy_cancel_rate is not None: |
| | |
| | | self.__last_trade_progress_dict[code] = index |
| | | self.__compute_total_l_down_not_deal_num(code) |
| | | |
| | | if total_datas is None: |
| | | return |
| | | |
| | | if not self.__is_l_down_can_cancel(code, buy_single_index): |
| | | # L后已经不能守护 |
| | | HourCancelBigNumComputer().start_compute_watch_indexes(code, buy_single_index) |