PROTECTED SOURCE SCRIPT
AI KNN-Dual SuperTrend MTF - by Trading Pine Lab

๐ฌ๐ง
The AI KNN-Dual SuperTrend MTF is a next-generation trading strategy that merges two higher-timeframe SuperTrends with dual KNN (K-Nearest Neighbors) classifiers, an ADX/DMI filter, and a Pivot Percentile bias module. This layered architecture ensures stronger signal confirmation by requiring consensus across AI models, multi-timeframe SuperTrends, and statistical filters.
Entries occur only when both SuperTrends align with bullish or bearish KNN labels, while the ADX/DMI filter validates momentum. Exits are managed dynamically with adaptive trailing stops (ST ยฑ ATR ร factor) or when market conditions flip according to percentile bias.
All parameters are fully configurable:
-Trading direction filter: Long / Short / Both.
-KNN classifiers: neighbors (K), dataset size (N), smoothing lengths.
-Dual SuperTrend: higher timeframes, ATR length, ATR factor, baseline type.
-ADX/DMI filter: customizable length and timeframe.
-Pivot Percentile module: multi-scale statistical bias.
-Visualization: AI markers, ribbons, aura lines, and per-trend coloring.
The AI KNN-Dual SuperTrend MTF is a next-generation trading strategy that merges two higher-timeframe SuperTrends with dual KNN (K-Nearest Neighbors) classifiers, an ADX/DMI filter, and a Pivot Percentile bias module. This layered architecture ensures stronger signal confirmation by requiring consensus across AI models, multi-timeframe SuperTrends, and statistical filters.
Entries occur only when both SuperTrends align with bullish or bearish KNN labels, while the ADX/DMI filter validates momentum. Exits are managed dynamically with adaptive trailing stops (ST ยฑ ATR ร factor) or when market conditions flip according to percentile bias.
All parameters are fully configurable:
-Trading direction filter: Long / Short / Both.
-KNN classifiers: neighbors (K), dataset size (N), smoothing lengths.
-Dual SuperTrend: higher timeframes, ATR length, ATR factor, baseline type.
-ADX/DMI filter: customizable length and timeframe.
-Pivot Percentile module: multi-scale statistical bias.
-Visualization: AI markers, ribbons, aura lines, and per-trend coloring.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations โ learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations โ learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.