| | |
| | | def can_buy_first(cls, code, limit_up_price): |
| | | now_timestamp = int(tool.get_now_time_str().replace(":", "")) |
| | | # 判断板块 |
| | | # (可以买的板块列表, 是否是独苗, 消息简介,可买的强势主线) |
| | | # (可以买的板块列表, 是否是独苗, 消息简介,可买的强势主线, 板块关键词) |
| | | can_buy_result = cls.__get_can_buy_block(code) |
| | | l2_log.debug(code, "获取到的板块信息:{}", can_buy_result) |
| | | if can_buy_result is None: |
| | |
| | | if not can_buy_result[0] and can_buy_result[1]: |
| | | msg_list.append("独苗") |
| | | if zyltgb < 10 * 100000000 or zyltgb > 20 * 100000000: |
| | | return False, True, f"强势10分钟,独苗不下单({can_buy_result[4]})自由流通市值({zyltgb})不满足条件" |
| | | return False, True, f"强势10分钟,独苗({can_buy_result[4]})不下单({can_buy_result[4]})自由流通市值({zyltgb})不满足条件" |
| | | if k_format and (k_format[1][0] or k_format[3][0]): |
| | | msg_list.append("股价创新高或者逼近前高") |
| | | # 股价创新高或者逼近前高 |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < 0.6: |
| | | return False, True, f"强势10分钟,独苗,股价创新高或者逼近前高,当日量比({cls.volume_rate_info[code][0]})小于0.6" |
| | | return False, True, f"强势10分钟,独苗({can_buy_result[4]}),股价创新高或者逼近前高,当日量比({cls.volume_rate_info[code][0]})小于0.6" |
| | | else: |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < 0.3: |
| | | return False, True, f"强势10分钟,独苗,当日量比({cls.volume_rate_info[code][0]})小于0.3" |
| | | return False, True, f"强势10分钟,独苗({can_buy_result[4]}),当日量比({cls.volume_rate_info[code][0]})小于0.3" |
| | | else: |
| | | msg_list.append("非独苗") |
| | | if zyltgb < 10 * 100000000 or zyltgb > 20 * 100000000: |
| | |
| | | else: |
| | | # 非强势10分钟只买主线 |
| | | if not can_buy_result[0] and can_buy_result[1]: |
| | | return False, True, f"非强势10分钟,独苗不下单" |
| | | return False, True, f"非强势10分钟,独苗({can_buy_result[4]})不下单" |
| | | if can_buy_result[3]: |
| | | # 强势主线 |
| | | if zyltgb < 10 * 100000000 or zyltgb > 20 * 100000000: |