All indicators

KNN Supertrend Horizon

By LuxAlgoMar 23, 2026

Static chart image

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 on Vela

Run it on Vela. Go further with a paid plan.

  • Up to 500 strategy alerts, with webhook automation
  • Up to 10× the chart history of Free
  • Orderflow lookback up to full history
  • Up to 100,000 monthly credits for Quant to customize it
  • Futures data alongside crypto, stocks, forex and commodities
See plans

Also works on

TradingView
NinjaTrader
Original indicatorBuilt in-house by LuxAlgo

Run it on Vela. Make it yours with Quant.

Open this indicator free on Vela, our next-generation charting platform. Then ask Quant, our coding agent built into Vela, to retune it or turn it into a backtested strategy of your own.