| | |
| | | # 是独苗 |
| | | if not TradeBlockBuyModeManager().can_buy_unique_block(): |
| | | # 不能买独苗 |
| | | return False, True, f"非强势30分钟,不满足身位:{can_buy_result[2]}" |
| | | return False, True, f"非强势30分钟,独苗,不满足身位:{can_buy_result[2]}" |
| | | else: |
| | | # 非独苗,没有可以买入的板块 |
| | | return False, True, f"非强势30分钟,非独苗,不满足身位:{can_buy_result[2]}" |
| | | return True, False, can_buy_result[2] |
| | | |
| | | @classmethod |
| | |
| | | |
| | | |
| | | if __name__ == "__main__": |
| | | block_codes = {"000333"} |
| | | print(block_codes | {"000222"}) |
| | | |
| | | print(TradeBlockBuyModeManager().can_buy_unique_block(), bin(TradeBlockBuyModeManager().get_mode())) |
| | | print(TradeBlockBuyModeManager().add_unique_block()) |
| | | print(TradeBlockBuyModeManager().can_buy_unique_block(), bin(TradeBlockBuyModeManager().get_mode())) |
| | |
| | | is_active_buy = cls.__is_need_active_buy(code, block, current_shsz_rank, len(current_open_limit_up_codes)) |
| | | |
| | | if current_shsz_rank < len(current_open_limit_up_codes) + max_rank: |
| | | return True, False, f"【{block}】前排代码:{current_shsz_rank}", is_strong_block, is_active_buy, current_shsz_rank, len( |
| | | return True, len(block_codes | { |
| | | code}) <= 1, f"【{block}】前排代码:{current_shsz_rank}", is_strong_block, is_active_buy, current_shsz_rank, len( |
| | | block_codes), len(block_codes_records) |
| | | else: |
| | | return False, False, f"【{block}】前排代码:{front_current_shsz_rank_codes} 超过{len(current_open_limit_up_codes) + max_rank}个", is_strong_block, is_active_buy, current_shsz_rank, len( |
| | | return False, len(block_codes | { |
| | | code}) <= 1, f"【{block}】前排代码:{front_current_shsz_rank_codes} 超过{len(current_open_limit_up_codes) + max_rank}个", is_strong_block, is_active_buy, current_shsz_rank, len( |
| | | block_codes), len(block_codes_records) |
| | | |
| | | # 获取可以买的板块 |