]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
fix(qav3): fix natr value check
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 19 Mar 2025 14:06:24 +0000 (15:06 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 19 Mar 2025 14:06:24 +0000 (15:06 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
quickadapter/user_data/strategies/QuickAdapterV3.py

index 46568ace18a66a945e5b58aef44ca1ae9d945a5a..3e545e53514b70dfb7ff2b49fc06a586f8c6c226 100644 (file)
@@ -43,7 +43,7 @@ class QuickAdapterV3(IStrategy):
     INTERFACE_VERSION = 3
 
     def version(self) -> str:
-        return "3.1.7"
+        return "3.1.8"
 
     timeframe = "5m"
 
@@ -402,7 +402,7 @@ class QuickAdapterV3(IStrategy):
 
     def get_trade_stoploss_distance(self, df: DataFrame, trade: Trade) -> float:
         entry_natr = self.get_trade_entry_natr(df, trade)
-        if entry_natr is None or entry_natr <= 0:
+        if entry_natr is None:
             return 0.0
         return trade.open_rate * entry_natr * self.trailing_stoploss_natr_ratio