| | |
| | | |
| | | # 设置订单过滤条件 |
| | | # special_price:过滤的1手的价格 |
| | | def set_order_fileter_condition(self, code, min_volume, limit_up_price, shadow_price, buy_volume): |
| | | def set_order_fileter_condition(self, code, min_volume, limit_up_price, shadow_price, buy_volume, special_volumes): |
| | | if not special_volumes: |
| | | special_volumes = set() |
| | | if code not in self.filter_order_condition_dict: |
| | | # (最小的量, 涨停价格, 影子单价格, 买的量, 废弃使用, 特殊的量集合) |
| | | self.filter_order_condition_dict[code] = [(min_volume, limit_up_price, shadow_price, buy_volume, |
| | | min_volume // 50)] |
| | | min_volume // 50, set(special_volumes))] |
| | | huaxin_l2_log.info(logger_local_huaxin_l2_subscript, |
| | | f"({code})常规过滤条件设置:{self.filter_order_condition_dict[code]}") |
| | | |
| | |
| | | |
| | | # 所有的涨停卖 |
| | | if item[1] == filter_condition[0][1]: |
| | | return item |
| | | |
| | | if item[3] != '1': |
| | | # 涨停卖 |
| | | return item |
| | | elif item[2] in filter_condition[0][5]: |
| | | # 涨停满足特殊的手数 |
| | | return item |
| | | return None |
| | | return item |
| | | # 过滤订单 |