From 85737846e5b5d8f998ee8d1aea9d473b439a1734 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 5 Jan 2026 23:12:20 +0100 Subject: [PATCH] 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 --- quickadapter/user_data/strategies/QuickAdapterV3.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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( -- 2.53.0