| | |
| | | def get_today_limit_up_reason(cls, code): |
| | | return cls.__today_total_limit_up_reason_dict.get(code) |
| | | |
| | | # 今日涨停原因变化 |
| | | def set_today_limit_up_reason_change(self, code, from_reason, to_reason): |
| | | RedisUtils.sadd(self.__get_redis(), f"kpl_limit_up_reason_his-{code}", from_reason) |
| | | RedisUtils.expire(self.__get_redis(), f"kpl_limit_up_reason_his-{code}", tool.get_expire()) |
| | | self.__set_total_keys(code) |
| | | |
| | | # 设置代码的今日涨停原因 |
| | | def __set_total_keys(self, code): |
| | | keys = set() |
| | |
| | | if codes: |
| | | fresult[k] = codes |
| | | return fresult |
| | | |
| | | |
| | | |
| | | |
| | | # 实时开盘啦市场数据 |
| | |
| | | |
| | | class RadicalBuyBlockManager: |
| | | """ |
| | | 激进买板块管理 |
| | | 扫入买板块管理 |
| | | """ |
| | | __TargetCodePlateKeyManager = TargetCodePlateKeyManager() |
| | | # 上次的涨停代码 |
| | |
| | | if RedicalBuyDataManager.can_buy(history_before_codes_info[0][0], |
| | | DealAndDelegateWithBuyModeDataManager().get_deal_codes())[0]: |
| | | return False, f"开1数量:{count},前排代码可买:{history_before_codes_info[0]}" |
| | | return True, f"开1数量:{count},前排代码不可买:{history_before_codes_info[0]}" |
| | | return True, f"开1数量:{count},历史-{history_index + 1} 实时-{current_index + 1}" |
| | | return True, f"开1数量:{count},前排代码不可买:{history_before_codes_info[0]},历史前排-{history_before_codes_info},开1代码-{open_limit_up_block_codes}" |
| | | return True, f"开1数量:{count},历史-{history_index + 1} 实时-{current_index + 1}, 前排代码-{current_before_codes_info}, 开1代码-{open_limit_up_block_codes}" |
| | | |
| | | @classmethod |
| | | def __is_radical_buy_with_block_up(cls, code, block, yesterday_limit_up_codes): |