Indicator: MFI or RSI enclosed by Bollinger Bands
Mar 3, 2014

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:
- Oscillator Selection: Calculating either the RSI or MFI based on the user-defined length.
- Basis Line: A Simple Moving Average (SMA) of the oscillator values.
- 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.
Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.
Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.
As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.
Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.
Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.
This does not represent our full Disclaimer. Please read our full disclaimer.
© 2026 LuxAlgo Global, LLC.

