From: Jérôme Benoit Date: Mon, 5 Jan 2026 22:12:20 +0000 (+0100) Subject: feat(plot): add smoothed extrema line to min_max subplot with weighted smoothing X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=85737846e5b5d8f998ee8d1aea9d473b439a1734;p=freqai-strategies.git feat(plot): add smoothed extrema line to min_max subplot with weighted smoothing - Add 'smoothed-extrema' column displaying weighted extrema after smoothing - Position smoothed extrema line below maxima/minima bars in plot z-order - Use 'wheat' color for better visual distinction from red/green bars - Store smoothed result in variable before assigning to both EXTREMA_COLUMN and smoothed-extrema --- diff --git a/quickadapter/user_data/strategies/QuickAdapterV3.py b/quickadapter/user_data/strategies/QuickAdapterV3.py index 1065d30..183f2a3 100644 --- a/quickadapter/user_data/strategies/QuickAdapterV3.py +++ b/quickadapter/user_data/strategies/QuickAdapterV3.py @@ -194,6 +194,7 @@ class QuickAdapterV3(IStrategy): EXTREMA_COLUMN: {"color": "orange", "type": "line"}, }, "min_max": { + "smoothed-extrema": {"color": "wheat", "type": "line"}, "maxima": {"color": "red", "type": "bar"}, "minima": {"color": "green", "type": "bar"}, }, @@ -938,7 +939,7 @@ class QuickAdapterV3(IStrategy): .mask(extrema_direction.lt(0) & weighted_extrema.eq(0.0), -plot_eps) ) - dataframe[EXTREMA_COLUMN] = smooth_extrema( + smoothed_extrema = smooth_extrema( weighted_extrema, self.extrema_smoothing["method"], self.extrema_smoothing["window_candles"], @@ -948,6 +949,9 @@ class QuickAdapterV3(IStrategy): self.extrema_smoothing["sigma"], ) + dataframe[EXTREMA_COLUMN] = smoothed_extrema + dataframe["smoothed-extrema"] = smoothed_extrema + return dataframe def populate_indicators(