]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
refactor: cleanup uneeded intermediate variables
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 29 Jan 2025 21:31:37 +0000 (22:31 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 29 Jan 2025 21:31:37 +0000 (22:31 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
quickadapter/user_data/strategies/QuickAdapterV3.py

index 7508fd7f2cdd92c84c6fb3e5030571ab9458a173..ee4df1b8ed2abf8fbf78eb5464febfe09ea57a98 100644 (file)
@@ -171,10 +171,11 @@ class QuickAdapterV3(IStrategy):
         )
         dataframe["%-dist_to_zerohist"] = get_distance(0, dataframe["%-macdhist"])
         # VWAP
-        vwap_low, vwap, vwap_high = VWAPB(dataframe, 20, 1)
-        dataframe["vwap_upperband"] = vwap_high
-        dataframe["vwap_middleband"] = vwap
-        dataframe["vwap_lowerband"] = vwap_low
+        (
+            dataframe["vwap_lowerband"],
+            dataframe["vwap_middleband"],
+            dataframe["vwap_upperband"],
+        ) = VWAPB(dataframe, 20, 1)
         dataframe["%-vwap_width"] = (
             (dataframe["vwap_upperband"] - dataframe["vwap_lowerband"])
             / dataframe["vwap_middleband"]