Supertrend ANY INDICATOR (RSI, MFI, CCI, etc.) + Range Filter
Mar 12, 2023

The Supertrend ANY INDICATOR (RSI, MFI, CCI, etc.) + Range Filter indicator provides a versatile technical analysis framework by applying the Supertrend algorithm to various popular oscillators and volume indicators, allowing for trend detection within specific data sets rather than just price.
Usage
This tool can be used to identify trend shifts within specific indicators such as the RSI or MFI, which often lead price action or highlight hidden momentum. Users can select their preferred base indicator from the settings and adjust the Supertrend ATR parameters to control sensitivity.
Examples of usage include:
- Trend Confirmation: Using the Supertrend on RSI to confirm if momentum is staying bullish (Supertrend line below RSI) or bearish (Supertrend line above RSI).
- Smoothing Data: By enabling the Range Filter, users can reduce noise in erratic indicators like Momentum or CCI, resulting in cleaner Supertrend signals.
- Exhaustion Trading: Combining the Supertrend signals with the built-in overbought and oversold levels to identify trend changes occurring at extreme levels.
Details
The script functions by first calculating the selected indicator (e.g., Stochastic or On Balance Volume). If the Range Filter option is enabled, the indicator data is passed through a range-filtering algorithm to smooth out minor fluctuations. The Supertrend calculation is then applied directly to this resulting data stream. For indicators with defined boundaries (like RSI), the script includes visual levels and fills to assist with overbought/oversold analysis.
Settings
Main Settings
- Indicator for Supertrend: Selects the base indicator (RSI, MFI, Accum/Dist, Momentum, OB Volume, CCI, or Stochastic).
- Indicator Length: Sets the lookback period for the chosen base indicator (where applicable).
- Supertrend ATR Length: Determines the ATR period used for the Supertrend calculation.
- Supertrend ATR Mult: Adjusts the multiplier that sets the distance of the Supertrend line from the indicator value.
Range Filter
- Use Range Filter of Indicator: Toggles a smoothing filter on the base indicator before the Supertrend is calculated.
- Range Filter Sampling Period: The lookback period for the range filter calculation.
- Range Filter Multiple: The multiplier used to define the range size for smoothing.
Display
- Show Labels: Toggles the "Buy" and "Sell" labels on the chart.
- Display Highlighting: Toggles the background fills between the indicator and the Supertrend line.
- Oversold/Overbought Level: Sets the horizontal reference lines for indicators that have bounds.
FAQ
How do I change the indicator being tracked?
You can navigate to the "Main Settings" section in the indicator inputs and use the dropdown menu labeled "Indicator for Supertrend" to choose between various options like RSI, MFI, or OBV.
What does the Range Filter do?
The Range Filter acts as a smoothing mechanism. It filters out minor price or indicator volatility, which can help prevent the Supertrend from producing "whipsaw" signals in sideways markets.
Where can I access this tool?
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.