]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
fix(qav3): revert minimal_roi @property change
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Tue, 30 Sep 2025 12:28:48 +0000 (14:28 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Tue, 30 Sep 2025 12:28:48 +0000 (14:28 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
quickadapter/user_data/strategies/QuickAdapterV3.py

index ccd0c393da08b6b26783de87300b34e9fa950cf9..cf9097f8a3622e21c90c4b42720bcc5b9b9267a5 100644 (file)
@@ -104,17 +104,21 @@ class QuickAdapterV3(IStrategy):
         2: (0.7640, 0.2),
     }
 
-    @property
-    def minimal_roi(self) -> dict[str, Any]:
-        timeframe_minutes = timeframe_to_minutes(self.config.get("timeframe", "5m"))
-        fit_live_predictions_candles = int(
-            self.config.get("freqai", {}).get("fit_live_predictions_candles", 100)
-        )
-        return {str(timeframe_minutes * fit_live_predictions_candles): -1}
-
-    @minimal_roi.setter
-    def minimal_roi(self, value: dict[str, Any]) -> None:
-        pass
+    timeframe_minutes = timeframe_to_minutes(timeframe)
+    minimal_roi = {str(timeframe_minutes * 864): -1}
+
+    # FreqAI is crashing if minimal_roi is a property
+    # @property
+    # def minimal_roi(self) -> dict[str, Any]:
+    #     timeframe_minutes = timeframe_to_minutes(self.config.get("timeframe", "5m"))
+    #     fit_live_predictions_candles = int(
+    #         self.config.get("freqai", {}).get("fit_live_predictions_candles", 100)
+    #     )
+    #     return {str(timeframe_minutes * fit_live_predictions_candles): -1}
+
+    # @minimal_roi.setter
+    # def minimal_roi(self, value: dict[str, Any]) -> None:
+    #     pass
 
     process_only_new_candles = True