]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
refactor(qav3): plot min_max bar
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Tue, 11 Feb 2025 18:45:06 +0000 (19:45 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Tue, 11 Feb 2025 18:45:06 +0000 (19:45 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
quickadapter/user_data/strategies/QuickAdapterV3.py

index 14db908ca31a40a27aae38ff39826d621fe0fe26..fbe6d12131cf1962806f5832e7787038ed2a43a6 100644 (file)
@@ -75,7 +75,7 @@ class QuickAdapterV3(IStrategy):
                 "&s-maxima_sort_threshold": {"color": "#5b5e4b", "type": "line"},
             },
             "min_max": {
-                "maxima": {"color": "#a29db9", "type": "bar"},
+                "maxima": {"color": "#ac7fc", "type": "bar"},
                 "minima": {"color": "#ac7fc", "type": "bar"},
             },
         },
@@ -248,7 +248,7 @@ class QuickAdapterV3(IStrategy):
             dataframe.at[mp, "&s-extrema"] = -1
         for mp in max_peaks:
             dataframe.at[mp, "&s-extrema"] = 1
-        dataframe["minima"] = np.where(dataframe["&s-extrema"] == -1, 1, 0)
+        dataframe["minima"] = np.where(dataframe["&s-extrema"] == -1, -1, 0)
         dataframe["maxima"] = np.where(dataframe["&s-extrema"] == 1, 1, 0)
         dataframe["&s-extrema"] = (
             dataframe["&s-extrema"]