SuperTrend with Chebyshev Filter
May 1, 2023

The SuperTrend with Chebyshev Filter indicator is a trend-following tool that combines the classic volatility-based trailing stop logic with advanced mathematical filtering to reduce lag and noise. This script aims to provide a smoother, more responsive alternative to the standard SuperTrend, helping traders identify market shifts with higher accuracy during both trending and ranging conditions.
Usage
The SuperTrend with Chebyshev Filter can be used to identify trend direction and potential reversal points. When the price is above the filter line, the trend is considered bullish (typically colored green); when the price is below the line, the trend is considered bearish (typically colored red).
- Trend Confirmation: Traders can use the color change of the trailing stop line as a signal for potential entries or exits.
- Trailing Stops: The line itself acts as a dynamic level for risk management, adjusting based on both price mean and market volatility.
- Early Warning Signals: The script includes "X" symbols (crosses) that appear when price crosses the filter line before the internal safety logic confirms a trend change. These serve as a heads-up for potential volatility or upcoming reversals.
Details
This indicator replaces the standard moving average and Average True Range (ATR) used in the original SuperTrend with versions processed through a Chebyshev filter. Chebyshev filters are designed to minimize the error between the ideal and actual frequency response, allowing for superior noise reduction without the significant lag associated with traditional smoothing methods.
The logic incorporates a "safety mechanism" to prevent whipsaws. In an uptrend, the trailing stop can only move up (or stay flat), and in a downtrend, it can only move down (or stay flat). A trend reversal is only confirmed when the price closes on the opposite side of the filter and satisfies specific directional consistency checks.
Settings
Main Settings
- Source: Determines the price data used for the mean calculation (default is hl2).
- Up Color / Down Color: Customizes the visual appearance of the trend lines.
- Text Color: Adjusts the color of the labels if enabled.
Chebyshev Settings
- Mean Length: The lookback period for the primary trend calculation. Higher values create a smoother but more lagging line.
- Mean Ripple: Controls the oscillation level in the filter response. Lower values result in smoother output.
- True Chebyshev I | False : Chebyshev II: Toggles between Type I (equiripple in the passband) and Type II (equiripple in the stopband) filter styles.
Volatility Settings
- ATR Style: Toggles between using the traditional High-Low range or the absolute Open-Close difference for volatility calculation.
- ATR Length: The lookback period used for the volatility component.
- ATR Ripple: Adjusts the smoothness of the volatility filter.
- Multiplier: Multiplies the filtered ATR to determine the distance of the stop line from the price mean.
Display & Notifications
- Alerts: Enables or disables the internal alert logic.
- Labels: Toggles the visibility of "Up Trend" and "Down Trend" text labels on the chart.
FAQ
How do I interpret the "X" symbols on the chart? These are early warning crosses. They appear when price crosses the filter line, but the trend change has not yet been fully confirmed by the safety logic. They signal that the current trend is under pressure.
What is the difference between Chebyshev Type I and Type II? Type I filters are generally more responsive to price changes but may exhibit more "ripple" (minor oscillations), whereas Type II filters often provide a cleaner stopband response, affecting how the indicator handles noise.
How can I access this indicator? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.