]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
perf(qav3): ensure dynamic SL try to enforce RR ratio ASAP
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 31 Mar 2025 10:17:36 +0000 (12:17 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 31 Mar 2025 10:17:36 +0000 (12:17 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
quickadapter/user_data/strategies/QuickAdapterV3.py

index af143d8454d975eee70f84d198ecc6652880b79d..af818d7153d4ff87fbcb9924200aab559a35f3e6 100644 (file)
@@ -59,21 +59,13 @@ class QuickAdapterV3(IStrategy):
     INTERFACE_VERSION = 3
 
     def version(self) -> str:
-        return "3.2.4"
+        return "3.2.5"
 
     timeframe = "5m"
 
     stoploss = -0.02
     use_custom_stoploss = True
 
-    @property
-    def trailing_stoploss_positive_offset(self) -> float:
-        return self.config.get("trailing_stoploss_positive_offset", 0.005)
-
-    @property
-    def trailing_stoploss_only_offset_is_reached(self) -> bool:
-        return self.config.get("trailing_stoploss_only_offset_is_reached", True)
-
     @property
     def trailing_stoploss_natr_ratio(self) -> float:
         return self.config.get("trailing_stoploss_natr_ratio", 0.025)
@@ -507,12 +499,6 @@ class QuickAdapterV3(IStrategy):
         current_profit: float,
         **kwargs,
     ) -> float | None:
-        if (
-            self.trailing_stoploss_only_offset_is_reached
-            and current_profit < self.trailing_stoploss_positive_offset
-        ):
-            return None
-
         df, _ = self.dp.get_analyzed_dataframe(pair=pair, timeframe=self.timeframe)
 
         if df.empty: