From: Jérôme Benoit Date: Sun, 13 Apr 2025 20:49:49 +0000 (+0200) Subject: refactor(qav3): cleanup in feature engineering code X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=76cb7866ebbfe49c7b12a2cc0e4d75af02f3c605;p=freqai-strategies.git refactor(qav3): cleanup in feature engineering code Signed-off-by: Jérôme Benoit --- diff --git a/quickadapter/user_data/strategies/QuickAdapterV3.py b/quickadapter/user_data/strategies/QuickAdapterV3.py index 2cfca82..30c60d3 100644 --- a/quickadapter/user_data/strategies/QuickAdapterV3.py +++ b/quickadapter/user_data/strategies/QuickAdapterV3.py @@ -225,12 +225,11 @@ class QuickAdapterV3(IStrategy): dataframe["%-close_pct_change"] = dataframe["close"].pct_change() dataframe["%-raw_volume"] = dataframe["volume"] dataframe["%-obv"] = ta.OBV(dataframe) - pair = str(metadata.get("pair")) - label_period_candles = self.get_label_period_candles(pair) - dataframe["%-natr_label_period_candles"] = ta.NATR( + label_period_candles = self.get_label_period_candles(str(metadata.get("pair"))) + dataframe["%-atr_label_period_candles"] = ta.ATR( dataframe, timeperiod=label_period_candles ) - dataframe["%-atr_label_period_candles"] = ta.ATR( + dataframe["%-natr_label_period_candles"] = ta.NATR( dataframe, timeperiod=label_period_candles ) dataframe["%-ewo"] = ewo(