| | |
| | | def get_watch_index_dict(self, code): |
| | | return {}, set() |
| | | |
| | | def start_compute_watch_indexes(self,code,buy_single_index): |
| | | def start_compute_watch_indexes(self, code, buy_single_index): |
| | | self.__compute_watch_index(code, buy_single_index) |
| | | |
| | | |
| | | |
| | | |
| | | # ---------------------------------D撤------------------------------- |
| | |
| | | return True |
| | | # 计算已经成交的比例 |
| | | total_datas = local_today_datas.get(code) |
| | | total_deal_nums=0 |
| | | total_deal_nums = 0 |
| | | total_nums = 1 |
| | | for index in watch_indexes: |
| | | data = total_datas[index] |
| | |
| | | total_datas, |
| | | local_today_canceled_buyno_map.get( |
| | | code)) |
| | | total_nums +=val["num"] |
| | | if left_count >0 and index < trade_index: |
| | | total_deal_nums+=val["num"] |
| | | total_nums += val["num"] |
| | | if left_count > 0 and index < trade_index: |
| | | total_deal_nums += val["num"] |
| | | thresh_hold_rate = LCancelRateManager.get_cancel_rate(code) |
| | | if total_deal_nums/total_nums > 1 - thresh_hold_rate-0.05: |
| | | if total_deal_nums / total_nums > 1 - thresh_hold_rate - 0.05: |
| | | return False |
| | | return True |
| | | |
| | |
| | | logger_l2_l_cancel.exception(e) |
| | | raise e |
| | | return can_cancel, cancel_data, extra_msg |
| | | |
| | | |
| | | |
| | | |
| | | def place_order_success(self, code): |
| | | self.clear(code) |