From: Jérôme Benoit Date: Fri, 8 Aug 2025 15:49:08 +0000 (+0200) Subject: refactor(qav3): remove unneeded intermediate variable X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=4c29b3a30793ab05e186cebef45d164417fd1a05;p=freqai-strategies.git refactor(qav3): remove unneeded intermediate variable Signed-off-by: Jérôme Benoit --- diff --git a/quickadapter/user_data/strategies/QuickAdapterV3.py b/quickadapter/user_data/strategies/QuickAdapterV3.py index 0b5c7e4..d0b433a 100644 --- a/quickadapter/user_data/strategies/QuickAdapterV3.py +++ b/quickadapter/user_data/strategies/QuickAdapterV3.py @@ -1122,9 +1122,8 @@ class QuickAdapterV3(IStrategy): trade.set_custom_data("n_outliers", n_outliers) trade.set_custom_data("last_outlier_date", last_candle_date.isoformat()) - trade_direction = trade.trade_direction if ( - trade_direction == "short" + trade.trade_direction == "short" and last_candle.get("do_predict") == 1 and last_candle.get("DI_catch") == 1 and last_candle.get(EXTREMA_COLUMN) < last_candle.get("minima_threshold") @@ -1132,7 +1131,7 @@ class QuickAdapterV3(IStrategy): ): return "minima_detected_short" if ( - trade_direction == "long" + trade.trade_direction == "long" and last_candle.get("do_predict") == 1 and last_candle.get("DI_catch") == 1 and last_candle.get(EXTREMA_COLUMN) > last_candle.get("maxima_threshold")