| | |
| | | # 包含高位板的整体排序 |
| | | all_history_index, all_history_before_codes_info = cls.__get_history_index(code, block, set(), |
| | | ignore_open_limit_up=False) |
| | | all_history_before_codes = [x[0] for x in all_history_before_codes_info] |
| | | |
| | | history_index_first, history_before_codes_info_first = cls.__get_history_index(code, block, yesterday_limit_up_codes, ignore_open_limit_up=False) |
| | | all_history_before_codes = [x[0] for x in history_before_codes_info_first] |
| | | if not constant.TEST: |
| | | # 前两个代码是否有炸板 |
| | | dif_codes = set(all_history_before_codes[:2]) - set(current_before_codes[:2]) |
| | | if dif_codes: |
| | | return False, f"前2代码有炸板:{dif_codes}, 前排代码:{all_history_before_codes}" |
| | | # dif_codes = set(all_history_before_codes[:2]) - set(current_before_codes[:2]) |
| | | # if dif_codes: |
| | | # return False, f"前2代码有炸板:{dif_codes}, 前排代码:{all_history_before_codes}" |
| | | # 前排代码炸板不能>=2个 |
| | | # 前排首板代码炸板数量在2个及以上不能买 |
| | | dif_codes = set(all_history_before_codes) - set(current_before_codes) |
| | | if len(dif_codes) >= 2: |
| | | return False, f"板块前排有{len(dif_codes)}个炸板" |
| | | return False, f"板块前排首板有{len(dif_codes)}个炸板" |
| | | |
| | | exclude_codes = set() |
| | | for x in current_before_codes_info: |