Machine Learning | Adaptive Trend Signals
https://in.tradingview.com/script/bOblG ... bitwardex/
As author stated, "Machine Learning | Adaptive Trend Signals is a Pine Scriptâ„¢ v6 indicator designed to visualize market trends and generate signals through a combination of volatility clustering, Gaussian smoothing, and adaptive trend calculations. Built as an overlay indicator, it integrates advanced techniques inspired by machine learning concepts, such as K-Means clustering, to adapt to changing market conditions. The script is highly customizable, includes a backtesting module, and supports alert conditions, making it suitable for traders exploring trend-based strategies and developers studying volatility-driven indicator design."
I discarded the backtest module with its dashboard, because it would have required me a lot more effort.
I added instead a binary buffer to easily detect trend.