All indicators

Indicator: MFI or RSI enclosed by Bollinger Bands

Mar 3, 2014

Static chart image
Dynamic OverlaysVolume BasedSignalsOscillatorsChannels

The RSI/MFI with Volatility Bands indicator provides a dynamic method for identifying overbought and oversold conditions by applying Bollinger Bands directly to the Relative Strength Index (RSI) or Money Flow Index (MFI).

Usage

The indicator is used to detect potential trend exhaustion and price reversals by monitoring when a momentum oscillator exceeds its typical volatility range. Users can toggle between the RSI, which measures price momentum, or the MFI, which incorporates volume data to assess buying and selling pressure.

When the selected oscillator crosses above the upper Bollinger Band, it signifies an overbought condition where momentum has reached an extreme relative to its recent average. Conversely, a cross below the lower Bollinger Band signifies an oversold condition. These events are visually highlighted by background color changes—typically green for oversold breaches and red for overbought breaches—to assist in rapid identification during high-volatility market movements.

Details

The script is a refactored version of the original work by LazyBear. Unlike traditional oscillators that use static thresholds (such as 70 and 30), this tool applies a standard Bollinger Band calculation to the oscillator values themselves.

The calculation involves:

  1. Oscillator Selection: Calculating either the RSI or MFI based on the user-defined length.
  2. Basis Line: A Simple Moving Average (SMA) of the oscillator values.
  3. Volatility Bands: Adding and subtracting a multiple of the oscillator's standard deviation from the basis line.

This approach ensures that the overbought and oversold levels adapt to the current market environment. In periods of high volatility, the bands expand, requiring a more significant move to trigger a signal. In low-volatility environments, the bands contract, allowing the indicator to remain sensitive to smaller momentum shifts.

Settings

  • Length: Determines the lookback period for both the selected oscillator (RSI/MFI) and the Bollinger Bands calculation.
  • Multiplier: Sets the number of standard deviations used to calculate the width of the upper and lower bands.
  • Draw RSI?: When enabled, the indicator calculates and displays the Relative Strength Index.
  • Draw MFI?: When enabled, the indicator calculates and displays the Money Flow Index. (Note: If both are selected, the script prioritizes the default logic or restricts the display to one).
  • Highlight Oversold/Overbought?: Toggles the background color highlights that appear when the oscillator breaches the volatility bands.

FAQ

How does this differ from standard RSI? Standard RSI uses fixed horizontal levels (e.g., 30 and 70) to define extremes. This indicator uses dynamic bands that adjust based on the oscillator's recent volatility, providing more context-aware signals.

Can I use this for volume-based analysis? Yes, by selecting the MFI (Money Flow Index) option, the indicator will factor in volume data alongside price action to identify overbought and oversold states.

How do I access the RSI/MFI with Volatility Bands? 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.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.