| | |
| | | @classmethod |
| | | def get_cancel_rate(cls, code): |
| | | base_rate = constant.L_CANCEL_RATE |
| | | try: |
| | | block_rate = 0 |
| | | if code in cls.__block_limit_up_count_dict: |
| | | count = cls.__block_limit_up_count_dict[code] |
| | |
| | | |
| | | base_rate += block_rate |
| | | base_rate += deal_rate |
| | | except Exception as e: |
| | | l2_log.l_cancel_debug(code, f"计算撤单比例出错:{e}") |
| | | return round(base_rate, 2) |
| | | |
| | | # 设置板块涨停数量(除开自己) |
| | |
| | | val = data["val"] |
| | | if L2DataUtil.is_limit_up_price_buy_cancel(val): |
| | | # 查询买入位置 |
| | | buy_index = l2_data_source_util.L2DataSourceUtils.get_buy_index_with_cancel_data_v2(data, local_today_buyno_map.get(code)) |
| | | buy_index = l2_data_source_util.L2DataSourceUtils.get_buy_index_with_cancel_data_v2(data, |
| | | local_today_buyno_map.get( |
| | | code)) |
| | | if buy_index is not None and buy_index in watch_indexes: |
| | | need_compute = True |
| | | break |