KNN Supertrend Horizon
By LuxAlgoMar 23, 2026
KNN Supertrend Horizon wraps a Supertrend baseline in a machine-learning filter. A k-nearest-neighbors model encodes RSI and ATR-based volatility, finds the most similar bars inside the Search Window, the logic of kNN analog forecasting, and classifies conditions as bullish or bearish. Only when that vote agrees with the Supertrend direction does the colored horizon print, trimming the weak flips a raw trend line suffers in chop.
How to Trade the KNN Supertrend Horizon?
- Bullish horizon: classifier and baseline agree upward: context for trend entries and pullbacks toward the trend level.
- Bearish horizon: agreement downward, the mirror case.
- Fading gradient colors: the Liquid Smooth candle coloring mutes as model confidence drops: fatigue, indecision, or consolidation worth sitting out.
- 3D Rejection Orbs: printed when a candle rejects the trend level with a meaningful wick; size scales with relative volume and a label reports the candle's volume.
- Dashboard: direction, model confidence, and relative volatility in one panel.
The ML Confidence Buffer holds flips back until the classification moves decisively past the midpoint, keeping the horizon steadier than stop-and-reverse logic alone.
KNN Supertrend Horizon Settings
- K-Neighbors and Search Window: neighbors per classification and how much history is scanned.
- ATR Length and Factor: the Supertrend baseline's volatility lookback and multiplier.
- Smooth Price Input: HMA smoothing of the price feeding the model's features.
- ML Confidence Buffer (%): how far past the midpoint probability the signal must move before a flip is accepted.
- Show 3D Rejection Orbs, Min Wick-to-Body Multiplier, and Min Bubble Gap: rejection toggle, wick requirement, and orb spacing.
- Liquid Smoothness, Vibrancy, Show Dashboard: gradient behavior and the stats panel.
Frequently Asked Questions
Free indicator
Get free access to this indicator on the platforms below.
The Library is free. Quant makes it yours.
Pull any concept or indicator into Quant: rebuild it, retune it, or turn it into a backtested strategy of your own.

