From c9e459ec26ed07279f1b139b7aec29158ba334f8 Mon Sep 17 00:00:00 2001 From: phyer Date: Wed, 14 Jan 2026 06:46:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A01=E5=B0=8F=E6=97=B6EMA5?= =?UTF-8?q?=E5=90=91=E4=B8=8A=E7=A9=BF=E8=B6=8AEMA20=E7=9A=84=E5=85=A5?= =?UTF-8?q?=E5=9C=BA=E9=99=90=E5=88=B6=E6=9D=A1=E4=BB=B6+3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- freqtrade/templates/freqaiprimer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/templates/freqaiprimer.py b/freqtrade/templates/freqaiprimer.py index a5e549d4..918a7457 100644 --- a/freqtrade/templates/freqaiprimer.py +++ b/freqtrade/templates/freqaiprimer.py @@ -596,10 +596,10 @@ class FreqaiPrimer(IStrategy): logger.error(f"[{metadata['pair']}] 缺少以下列: {missing_columns}") raise KeyError(f"缺少以下列: {missing_columns}") - # 确保所有需要的列都被合并 + # 确保所有需要的列都被合并(包括EMA交叉信号列) required_columns = ['date', 'rsi_1h', 'trend_1h', 'ema_50_1h', 'ema_200_1h', 'bb_lower_1h', 'bb_upper_1h', 'stochrsi_k_1h', 'stochrsi_d_1h', - 'macd_1h', 'macd_signal_1h'] + 'macd_1h', 'macd_signal_1h', 'ema_5_1h', 'ema_20_1h', 'ema5_cross_above_ema20'] # 验证所需列是否存在 missing_columns = [col for col in required_columns if col not in df_1h.columns]