]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
fix(qav3): final stage trade exit logic
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 8 Aug 2025 22:54:15 +0000 (00:54 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 8 Aug 2025 22:54:15 +0000 (00:54 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
quickadapter/user_data/strategies/QuickAdapterV3.py

index 9bd66c278f2d5a2c31f77211709649375231e1e1..3f5b181787532548af9dc56e580922bac87ddfde 100644 (file)
@@ -1182,9 +1182,12 @@ class QuickAdapterV3(IStrategy):
             trade, current_rate, trade_take_profit_price
         )
 
-        trade_exit = trade_take_profit_exit and (
-            trade_pnl_momentum_declining or not trade_recent_pnl_spiking
+        trade_exit = (
+            trade_take_profit_exit
+            and trade_pnl_momentum_declining
+            and not trade_recent_pnl_spiking
         )
+
         if not trade_exit:
             self.throttle_callback(
                 pair=pair,