From 27bd174cb5ee0fefe73f30da90ed9de882a7ac77 Mon Sep 17 00:00:00 2001 From: "zhangkun9038@dingtalk.com" Date: Fri, 25 Jul 2025 07:00:45 +0800 Subject: [PATCH] remove ema300 --- freqtrade/templates/freqaiprimer.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/freqtrade/templates/freqaiprimer.py b/freqtrade/templates/freqaiprimer.py index d15fadfd..5c5a3649 100644 --- a/freqtrade/templates/freqaiprimer.py +++ b/freqtrade/templates/freqaiprimer.py @@ -258,7 +258,6 @@ class FreqaiPrimer(IStrategy): # 计算主时间框架(3m)指标 dataframe["ema200"] = ta.EMA(dataframe, timeperiod=200) - dataframe["ema300"] = ta.EMA(dataframe, timeperiod=300) dataframe["price_value_divergence"] = (dataframe["close"] - dataframe["ema200"]) / dataframe["ema200"] upperband, middleband, lowerband = ta.BBANDS(dataframe["close"], timeperiod=20, nbdevup=2.0, nbdevdn=2.0) dataframe["bb_upperband"] = upperband @@ -434,7 +433,6 @@ class FreqaiPrimer(IStrategy): cond5 = (dataframe["stochrsi_k"] < stochrsi_threshold) cond6 = ~bearish_signal_aligned cond7 = ~stochrsi_overbought_aligned - cond8 = (dataframe["close"] >= dataframe["ema300"]) # 记录 cond6 和 cond7 的触发情况 logger.debug(f"[{pair}] cond6 (非熊市) 触发率: {(~bearish_signal_aligned).mean():.2%}, " @@ -459,7 +457,6 @@ class FreqaiPrimer(IStrategy): f"close={bb_close_value:.6f} <= bb_lowerband={bb_lower_value:.6f}: {cond4.iloc[-1]}, " f"stochrsi_k={stochrsi_value:.2f} < {stochrsi_threshold:.2f}: {cond5.iloc[-1]}, " f"非熊市={cond6.iloc[-1]}, " - f"ema300={cond8.iloc[-1]}, " f"STOCHRSI未持续超买={cond7.iloc[-1]}") else: logger.warning(f"[{pair}] &-price_value_divergence 列缺失,跳过买入信号生成")