| | |
| | | 1), buy_condition_util.get_volume_rate_by_level(2) |
| | | |
| | | k_format = code_nature_analyse.CodeNatureRecordManager().get_k_format_cache(code) |
| | | # 是否有辨识度 |
| | | is_special = True if k_format and k_format[8][0] else False |
| | | # 上5个交易日有炸板之后 |
| | | has_open_limit_up_in_5 = True if k_format and len(k_format) >= 11 and k_format[10] else False |
| | | # 上5个交易日有跌停 |
| | | has_limit_down_in_5 = True if k_format and len(k_format) >= 13 and k_format[12] else False |
| | | # 是否是强势10分钟 |
| | | is_in_strong_time = now_timestamp <= int("094000") |
| | | |
| | | if k_format and (k_format[1][0] or k_format[3][0]) and len(k_format) >= 12 and k_format[11]: |
| | | # 破前高/接近前高且30天内有涨停 |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < volume_rate_thresholds[1]: |
| | | return False, True, f"股价创新高或者逼近前高且30天内有涨停,当日量比({cls.volume_rate_info[code][0]})小于{volume_rate_thresholds[1]}" |
| | | |
| | | # 上5个交易日有炸板之后 |
| | | if k_format and len(k_format) >= 11 and k_format[10]: |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < volume_rate_thresholds[1]: |
| | | return False, True, f"上5个交易日炸板,量未达到{volume_rate_thresholds[1]}({cls.volume_rate_info[code][0]})" |
| | | |
| | | # 上5个交易日有跌停 |
| | | if k_format and len(k_format) >= 13 and k_format[12]: |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < 0.29: |
| | | return False, True, f"上5个交易日跌停,量未达到{0.29}({cls.volume_rate_info[code][0]})" |
| | | |
| | | is_special = True if k_format and k_format[8][0] else False |
| | | # 获取市场行情 |
| | | situation = cls.__MarketSituationManager.get_situation_cache() |
| | | zylt_threshold = buy_condition_util.get_zyltgb_threshold(situation) |
| | |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < 0.8: |
| | | return False, True, f"5天内3次涨停,量未达到80%({cls.volume_rate_info[code][0]})" |
| | | msg_list = [] |
| | | if now_timestamp <= int("094000"): |
| | | if is_in_strong_time: |
| | | msg_list.append("强势10分钟") |
| | | # 上5个交易日有炸板之后 |
| | | if has_open_limit_up_in_5: |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < 0.15: |
| | | return False, True, f"强势10分钟,上5个交易日炸板,量未达到{0.15}({cls.volume_rate_info[code][0]})" |
| | | |
| | | # 上5个交易日有跌停 |
| | | if has_limit_down_in_5: |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < 0.15: |
| | | return False, True, f"强势10分钟,上5个交易日跌停,量未达到{0.15}({cls.volume_rate_info[code][0]})" |
| | | |
| | | |
| | | # 获取量的参考日期 |
| | | if code in global_util.max60_volumn: |
| | | day = global_util.max60_volumn[code][1] |
| | | if day in HistoryKDatasUtils.get_latest_trading_date_cache(5): |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < 0.15 and not is_special: |
| | | return False, True, f"强势10分钟,参考量在最近5天,无辨识度,量未达到0.15({cls.volume_rate_info[code][0]})" |
| | | |
| | | # 独苗 |
| | | if not can_buy_result[0] and can_buy_result[1]: |
| | | msg_list.append("独苗") |
| | |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < volume_rate_thresholds[1]: |
| | | return False, True, f"强势10分钟,独苗({can_buy_result[4]}),股价创新高或者逼近前高,当日量比({cls.volume_rate_info[code][0]})小于{volume_rate_thresholds[1]}" |
| | | else: |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < volume_rate_thresholds[0] and not is_special: |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < volume_rate_thresholds[ |
| | | 0] and not is_special: |
| | | return False, True, f"强势10分钟,无辨识度,独苗({can_buy_result[4]}),当日量比({cls.volume_rate_info[code][0]})小于{volume_rate_thresholds[0]}" |
| | | else: |
| | | msg_list.append("非独苗") |
| | |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < volume_rate_thresholds[1]: |
| | | return False, True, f"强势10分钟,后排,不满足自由市值,股价创新高或者逼近前高,当日量比({cls.volume_rate_info[code][0]})小于{volume_rate_thresholds[1]}" |
| | | else: |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < volume_rate_thresholds[0] and not is_special: |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < volume_rate_thresholds[ |
| | | 0] and not is_special: |
| | | return False, True, f"强势10分钟,后排,无辨识度,不满足自由市值,当日量比({cls.volume_rate_info[code][0]})小于{volume_rate_thresholds[0]}" |
| | | else: |
| | | msg_list.append("满足自由流通") |
| | |
| | | return True, False, can_buy_result[2] |
| | | return True, False, can_buy_result[2] |
| | | else: |
| | | |
| | | # 上5个交易日有炸板之后 |
| | | if has_open_limit_up_in_5: |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < 0.29: |
| | | return False, True, f"强势10分钟,上5个交易日炸板,量未达到{0.29}({cls.volume_rate_info[code][0]})" |
| | | |
| | | # 上5个交易日有跌停 |
| | | if has_limit_down_in_5: |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < 0.29: |
| | | return False, True, f"强势10分钟,上5个交易日跌停,量未达到{0.29}({cls.volume_rate_info[code][0]})" |
| | | |
| | | # 获取量的参考日期 |
| | | if code in global_util.max60_volumn: |
| | | day = global_util.max60_volumn[code][1] |
| | | if day in HistoryKDatasUtils.get_latest_trading_date_cache(5): |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < volume_rate_thresholds[1] and not is_special: |
| | | return False, True, f"参考量在最近5天,无辨识度,量未达到{volume_rate_thresholds[1]}({cls.volume_rate_info[code][0]})" |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < 0.29 and not is_special: |
| | | return False, True, f"参考量在最近5天,无辨识度,量未达到0.29({cls.volume_rate_info[code][0]})" |
| | | |
| | | # 非强势10分钟只买主线 |
| | | if not can_buy_result[0] and can_buy_result[1]: |
| | |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < volume_rate_thresholds[1]: |
| | | return False, True, f"非强势10分钟,强势主线后排,不满足自由市值,股价创新高或者逼近前高,当日量比({cls.volume_rate_info[code][0]})小于{volume_rate_thresholds[1]}" |
| | | else: |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < volume_rate_thresholds[0] and not is_special: |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < volume_rate_thresholds[ |
| | | 0] and not is_special: |
| | | return False, True, f"非强势10分钟,强势主线后排,不满足自由市值,无辨识度,当日量比({cls.volume_rate_info[code][0]})小于{volume_rate_thresholds[0]}" |
| | | else: |
| | | if k_format and (k_format[1][0] or k_format[3][0]): |
| | |
| | | else: |
| | | # 非强势主线 |
| | | if zyltgb < zylt_threshold[2] or zyltgb > zylt_threshold[3]: |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < volume_rate_thresholds[1] and not is_special: |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < volume_rate_thresholds[ |
| | | 1] and not is_special: |
| | | return False, True, f"非强势10分钟,非强势主线后排【主线后排】,不满足自由市值,无辨识度, 当日量比({cls.volume_rate_info[code][0]})小于{volume_rate_thresholds[1]}" |
| | | else: |
| | | if k_format and (k_format[1][0] or k_format[3][0]): |
| | |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < volume_rate_thresholds[1]: |
| | | return False, True, f"非强势10分钟,非强势主线后排【主线后排】,满足自由市值,股价创新高或者逼近前高, 当日量比({cls.volume_rate_info[code][0]})小于{volume_rate_thresholds[1]}" |
| | | else: |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < volume_rate_thresholds[0] and not is_special: |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < volume_rate_thresholds[ |
| | | 0] and not is_special: |
| | | return False, True, f"非强势10分钟,非强势主线后排【主线后排】, 满足自由市值,无辨识度,当日量比({cls.volume_rate_info[code][0]})小于{volume_rate_thresholds[0]}" |
| | | return True, False, can_buy_result[2] |
| | | |