| | |
| | | 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) |
| | | zyltgb = global_util.zyltgb_map.get(code) |
| | | if k_format and k_format[8][0]: |
| | | if is_special: |
| | | # 具有辨识度 |
| | | zyltgb = zylt_threshold[1] + 1 |
| | | zyltgb = zylt_threshold[2] + 1 |
| | | |
| | | if zyltgb >= zylt_threshold[0]: |
| | | return False, True, f"{zylt_threshold[0] // 100000000}亿以上的都不买({zyltgb})" |
| | | if zyltgb >= zylt_threshold[1]: |
| | | return False, True, f"{zylt_threshold[1] // 100000000}亿以上的都不买({zyltgb})" |
| | | |
| | | if zyltgb < zylt_threshold[0]: |
| | | return False, True, f"{zylt_threshold[0] // 100000000}亿以下的都不买({zyltgb})" |
| | | |
| | | if HighIncreaseCodeManager().is_in(code): |
| | | 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"): |
| | | msg_list.append("强势10分钟") |
| | | # 独苗 |
| | | if not can_buy_result[0] and can_buy_result[1]: |
| | | msg_list.append("独苗") |
| | | if zyltgb < zylt_threshold[1] or zyltgb > zylt_threshold[2]: |
| | | if zyltgb < zylt_threshold[2] or zyltgb > zylt_threshold[3]: |
| | | # 如果没有辨识度才不买 |
| | | if k_format and k_format[8][0]: |
| | | # 有辨识度 |
| | | pass |
| | | else: |
| | | return False, True, f"强势10分钟,独苗({can_buy_result[4]})不下单({can_buy_result[4]})自由流通市值({zyltgb})不满足条件" |
| | | if not is_special: |
| | | 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] < 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]: |
| | | return False, True, f"强势10分钟,独苗({can_buy_result[4]}),当日量比({cls.volume_rate_info[code][0]})小于{volume_rate_thresholds[0]}" |
| | | 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 zyltgb < zylt_threshold[1] or zyltgb > zylt_threshold[2]: |
| | | if zyltgb < zylt_threshold[2] or zyltgb > zylt_threshold[3]: |
| | | msg_list.append("不满足自由流通") |
| | | 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]: |
| | | return False, True, f"强势10分钟,后排,不满足自由市值,当日量比({cls.volume_rate_info[code][0]})小于{volume_rate_thresholds[0]}" |
| | | 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("满足自由流通") |
| | | # 后排,满足自由流通市值需要下单 |
| | |
| | | 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]: |
| | | 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] < volume_rate_thresholds[1] and not is_special: |
| | | return False, True, f"参考量在最近5天,无辨识度,量未达到{volume_rate_thresholds[1]}({cls.volume_rate_info[code][0]})" |
| | | |
| | | # 非强势10分钟只买主线 |
| | | if not can_buy_result[0] and can_buy_result[1]: |
| | | return False, True, f"非强势10分钟,独苗({can_buy_result[4]})不下单" |
| | | if not is_special: |
| | | return False, True, f"非强势10分钟,无辨识度,独苗({can_buy_result[4]})不下单" |
| | | if can_buy_result[3]: |
| | | # 强势主线 |
| | | if zyltgb < zylt_threshold[1] or zyltgb > zylt_threshold[2]: |
| | | if zyltgb < zylt_threshold[2] or zyltgb > zylt_threshold[3]: |
| | | 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]: |
| | | return False, True, f"非强势10分钟,强势主线后排,不满足自由市值,当日量比({cls.volume_rate_info[code][0]})小于{volume_rate_thresholds[0]}" |
| | | 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]): |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < volume_rate_thresholds[0]: |
| | | return False, True, f"非强势10分钟,强势主线后排,满足自由市值,股价创新高或者逼近前高, 当日量比({cls.volume_rate_info[code][0]})小于{volume_rate_thresholds[0]}" |
| | | else: |
| | | # 非强势主线 |
| | | if zyltgb < zylt_threshold[1] or zyltgb > zylt_threshold[2]: |
| | | 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]}" |
| | | 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: |
| | | 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]: |
| | | return False, True, f"非强势10分钟,非强势主线后排【主线后排】, 满足自由市值,当日量比({cls.volume_rate_info[code][0]})小于{volume_rate_thresholds[0]}" |
| | | 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] |
| | | |
| | | @classmethod |
| | |
| | | trade_index, is_default = TradeBuyQueue().get_traded_index(code) |
| | | if trade_index and not is_default: |
| | | m_base_val = l2_trade_factor.L2PlaceOrderParamsManager.get_base_m_val(code) |
| | | thresh_hold_num = m_base_val * 3 // (float(gpcode_manager.get_limit_up_price(code)) * 100) |
| | | thresh_hold_num = m_base_val * 4 // (float(gpcode_manager.get_limit_up_price(code)) * 100) |
| | | # 真实下单位到成交位置的纯买额 * 3 |
| | | total_num = 0 |
| | | for i in range(trade_index + 1, buy_single_index): |
| | |
| | | total_num += left_count * val["num"] |
| | | if total_num > thresh_hold_num: |
| | | break |
| | | if total_num > thresh_hold_num and False: |
| | | if total_num > thresh_hold_num: |
| | | # 距离成交进度位置过远 |
| | | l2_log.debug(code, |
| | | f"获取的信号位无效(板上买,范围:{trade_index + 1}-{order_begin_pos.buy_single_index} 未成交总手{total_num}/阈值{thresh_hold_num})") |