From: Jérôme Benoit Date: Sun, 16 Mar 2025 18:44:57 +0000 (+0100) Subject: fix(qav3): rely on custom stoploss for trailing stop X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=a52e5bf45f05a80daa65a5b6912df35763616bec;p=freqai-strategies.git fix(qav3): rely on custom stoploss for trailing stop Signed-off-by: Jérôme Benoit --- diff --git a/quickadapter/user_data/strategies/QuickAdapterV3.py b/quickadapter/user_data/strategies/QuickAdapterV3.py index ff21717..f1f2735 100644 --- a/quickadapter/user_data/strategies/QuickAdapterV3.py +++ b/quickadapter/user_data/strategies/QuickAdapterV3.py @@ -43,12 +43,12 @@ class QuickAdapterV3(IStrategy): timeframe = "5m" stoploss = -0.02 + use_custom_stoploss = True # Trailing stop: - trailing_stop = True + trailing_stop = False trailing_stop_positive = 0.01 trailing_stop_positive_offset = 0.011 trailing_only_offset_is_reached = True - use_custom_stoploss = True @property def stoploss_natr_ratio(self) -> float: @@ -394,6 +394,10 @@ class QuickAdapterV3(IStrategy): current_profit: float, **kwargs, ) -> float | None: + # Trailing stoploss starts at 1% profit + if current_profit < 0.01: + return None + df, _ = self.dp.get_analyzed_dataframe(pair=pair, timeframe=self.timeframe) if df.empty: