From cd4a5b7518c947ab96ca1d029cc5fca1ad8674bc Mon Sep 17 00:00:00 2001 From: "zhangkun9038@dingtalk.com" Date: Wed, 13 Aug 2025 19:02:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B6=8B=E5=8A=BF=E8=8E=B7=E5=8F=96=E9=87=87?= =?UTF-8?q?=E7=94=A8=E4=BA=86=E6=96=B0=E7=9A=84=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- freqtrade/templates/freqaiprimer.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/freqtrade/templates/freqaiprimer.py b/freqtrade/templates/freqaiprimer.py index aa711ef5..24814425 100644 --- a/freqtrade/templates/freqaiprimer.py +++ b/freqtrade/templates/freqaiprimer.py @@ -438,8 +438,8 @@ class FreqaiPrimer(IStrategy): cond3 = (dataframe["rsi"] < rsi_threshold * 1.2) # 放宽RSI要求 cond4 = (dataframe["close"] <= dataframe["bb_upperband"]) # 可以在上轨附近入场 cond5 = (dataframe["stochrsi_k"] < stochrsi_threshold * 1.2) # 放宽STOCHRSI要求 - cond6 = True # 取消熊市过滤 - cond7 = True # 取消超买过滤 + cond6 = pd.Series([True] * len(dataframe), index=dataframe.index) # 取消熊市过滤 + cond7 = pd.Series([True] * len(dataframe), index=dataframe.index) # 取消超买过滤 logger.info(f"[{pair}] 🚀 上涨趋势策略:放宽入场条件") elif trend_status == "bearish": @@ -503,17 +503,6 @@ class FreqaiPrimer(IStrategy): combined_condition = reduce(lambda x, y: x & y, conditions) dataframe.loc[combined_condition, 'enter_long'] = 1 - # 创建条件总结列表 - conditions_summary = [ - ("&-price_value_divergence", divergence_value, "<", self.buy_threshold, cond1.iloc[-1]), - ("volume_z_score", volume_z_score_value, ">", volume_z_score_threshold, cond2.iloc[-1]), - ("rsi", rsi_value, "<", rsi_threshold, cond3.iloc[-1]), - ("close <= bb_lowerband", bb_close_value, "<=", bb_lower_value, cond4.iloc[-1]), - ("stochrsi_k", stochrsi_value, "<", stochrsi_threshold, cond5.iloc[-1]), - ("非熊市", None, None, None, cond6.iloc[-1]), - ("STOCHRSI未持续超买", None, None, None, cond7.iloc[-1]), - ] - # 输出每个条件的状态 logger.info(f"[{pair}] === 买入条件检查 ===") satisfied_conditions = []