From b7864d69cdc3ffdb9546fb4ac2d635385dc3be30 Mon Sep 17 00:00:00 2001 From: "zhangkun9038@dingtalk.com" Date: Sat, 30 Aug 2025 01:03:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=83=E6=9E=97=E5=B8=A6=E4=B8=8B=E8=BD=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- freqtrade/templates/freqaiprimer.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/freqtrade/templates/freqaiprimer.py b/freqtrade/templates/freqaiprimer.py index 132bddc7..497f6768 100644 --- a/freqtrade/templates/freqaiprimer.py +++ b/freqtrade/templates/freqaiprimer.py @@ -985,15 +985,16 @@ class FreqaiPrimer(IStrategy): logger.info(f"[{pair}] 🟢 牛市绿色通道:持仓{open_trades}≤2个,25USDT入场,5条件需要满足{satisfied_count}/4个") elif trend_status == "bullish": - # 牛市正常通道:持仓>2个,75USDT入场,必须满足全部7个条件,且价格必须低于EMA50 - cond1 = (dataframe["&-price_value_divergence"] < self.buy_threshold * 1.2) # 提高要求至1.2倍 - cond2 = (dataframe["volume_z_score"] > volume_z_score_threshold * 0.8) # 提高成交量要求至0.8倍 - cond3 = (dataframe["rsi"] < rsi_threshold * 1.07) # 提高要求至1.0倍 - cond4 = (dataframe["close"] <= dataframe["bb_lowerband"]) # 收盘价低于布林带下轨 - cond5 = (dataframe["stochrsi_k"] < stochrsi_threshold * 1.0) # 提高要求至1.0倍 + # 牛市正常通道:持仓>2个,75USDT入场,放宽条件以增加入场信号 + cond1 = (dataframe["&-price_value_divergence"] < self.buy_threshold * 1.5) # 进一步放宽至1.5倍 + cond2 = (dataframe["volume_z_score"] > volume_z_score_threshold * 0.6) # 放宽成交量要求至0.6倍 + cond3 = (dataframe["rsi"] < rsi_threshold * 1.05) # 进一步放宽至1.15倍 + cond4 = (dataframe["close"] <= dataframe["bb_lowerband"] * 1.05) # 略微放宽布林带条件 + cond5 = (dataframe["stochrsi_k"] < stochrsi_threshold * 1.1) # 放宽STOCHRSI要求至1.1倍 cond6 = pd.Series([True] * len(dataframe), index=dataframe.index) # 取消熊市过滤 cond7 = pd.Series([True] * len(dataframe), index=dataframe.index) # 取消超买过滤 - buy_condition = cond1 & cond2 & cond3 & cond4 & cond5 & cond6 & cond7 & price_below_ema50 & ~is_unstable_region & (high_position == 0) + # 只需要满足5个核心条件即可入场 + buy_condition = (cond1 & cond2 & cond3 & cond4 & cond5) & cond6 & cond7 & price_below_ema50 & ~is_unstable_region & (high_position == 0) logger.info(f"[{pair}] 🚀 牛市正常通道:持仓{open_trades}>2个,75USDT入场,必须满足全部7个条件") elif trend_status == "bearish":