| | |
| | | open_count = len(exclude_codes) |
| | | if open_count > 0 and open_count + 1 <= len(current_before_codes): |
| | | # 前排有开1且除开开1之后是首板老大 |
| | | exclude_codes |= set(all_history_before_codes_info[open_count:open_count + START_BUY_RANK]) |
| | | exclude_codes |= set(all_first_history_before_codes[open_count:open_count + START_BUY_RANK]) |
| | | else: |
| | | # 排除首板老大 |
| | | exclude_codes |= set(all_history_before_codes_info[:START_BUY_RANK]) |
| | | exclude_codes |= set(all_first_history_before_codes[:START_BUY_RANK]) |
| | | # 开1排除 |
| | | open_limit_up_code_dict = kpl_data_constant.open_limit_up_code_dict_for_radical_buy |
| | | if open_limit_up_code_dict: |
| | |
| | | # 获取本板块买入代码的最大数量 |
| | | max_count = RadicalBuyBlockCodeCountManager().get_block_code_count(block) |
| | | if history_index > max_count: |
| | | return False, f"排除前{START_BUY_RANK},目标代码位于历史身位-{history_index + 1},前排代码:{history_before_codes_info}, 板块最多可买{max_count}" |
| | | return False, f"排除前{START_BUY_RANK}-{exclude_codes},目标代码位于历史身位-{history_index + 1},前排代码:{history_before_codes_info}, 板块最多可买{max_count}" |
| | | |
| | | if max_count == 1: |
| | | if history_index == 1: |