PROTECTED SOURCE SCRIPT
AI Volume-KNN SuperTrend - by Trading Pine Lab

🇬🇧 English
The AI Volume-KNN SuperTrend is an advanced trading strategy that combines the robustness of the SuperTrend indicator with a machine-learning inspired KNN (K-Nearest Neighbors) model. The baseline is built from a volume-weighted moving average with ATR-based bands, while the KNN classifier validates trend direction in real time. This dual-layer approach reduces false signals and improves trend confirmation.
Entries are triggered when the SuperTrend flips direction and the KNN classifier confirms the move as bullish or bearish. Exits are managed with a dynamic trailing stop, automatically adjusting to SuperTrend ± ATR × factor. The strategy includes visual markers for AI start/continuation signals, as well as customizable coloring for bullish, bearish, and neutral phases.
All parameters are fully configurable:
-Trading direction filter: Long / Short / Both.
-KNN settings: number of neighbors (K), dataset size (N).
-Label smoothing: price and SuperTrend smoothing lengths (WMAs).
-SuperTrend settings: length, ATR factor, and moving average source.
-Visualization: trend markers and per-trend coloring.
The AI Volume-KNN SuperTrend is an advanced trading strategy that combines the robustness of the SuperTrend indicator with a machine-learning inspired KNN (K-Nearest Neighbors) model. The baseline is built from a volume-weighted moving average with ATR-based bands, while the KNN classifier validates trend direction in real time. This dual-layer approach reduces false signals and improves trend confirmation.
Entries are triggered when the SuperTrend flips direction and the KNN classifier confirms the move as bullish or bearish. Exits are managed with a dynamic trailing stop, automatically adjusting to SuperTrend ± ATR × factor. The strategy includes visual markers for AI start/continuation signals, as well as customizable coloring for bullish, bearish, and neutral phases.
All parameters are fully configurable:
-Trading direction filter: Long / Short / Both.
-KNN settings: number of neighbors (K), dataset size (N).
-Label smoothing: price and SuperTrend smoothing lengths (WMAs).
-SuperTrend settings: length, ATR factor, and moving average source.
-Visualization: trend markers and per-trend coloring.
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 제한 없이 자유롭게 사용할 수 있습니다 — 여기에서 자세히 알아보기.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 제한 없이 자유롭게 사용할 수 있습니다 — 여기에서 자세히 알아보기.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.