]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
refactor(qav3): log error message at TP kama failure
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 23 May 2025 13:05:32 +0000 (15:05 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 23 May 2025 13:05:32 +0000 (15:05 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
quickadapter/user_data/strategies/QuickAdapterV3.py

index abe56c23b92588a909e5df909e670c02c1fe69de..f0d12fd24e9d716f1d943f0edb43280d577be085 100644 (file)
@@ -508,8 +508,11 @@ class QuickAdapterV3(IStrategy):
                 ).dropna()
                 if not trade_kama_natr.empty:
                     take_profit_natr = trade_kama_natr.iloc[-1]
-            except Exception:
-                pass
+            except Exception as e:
+                logger.error(
+                    f"Failed to calculate KAMA at take profit price computation: {str(e)}",
+                    exc_info=True,
+                )
         if isna(take_profit_natr):
             take_profit_natr = (
                 trade_zl_natr.ewm(span=trade_duration_candles).mean().iloc[-1]