Mean Reversal
May 12, 2023

The Mean Reversal indicator identifies potential trend exhaustion and reversal points by combining Bollinger Bands, RSI, Williams %R, and ADX filters to generate high-probability buy and sell signals.
Usage
The indicator displays triangle shapes on the chart to signal potential entries. A green upward triangle indicates a bullish mean reversal, while a red downward triangle indicates a bearish mean reversal.
To maximize the effectiveness of these signals, users should:
- Observe the bar colors: Bars highlighted in blue indicate that the price is in an overbought or oversold state based on the RSI settings, suggesting a higher probability of a reversal.
- Compare candle sizes: Avoid entering trades if the signal candle's body is significantly smaller than the preceding candle.
- Multi-timeframe confluence: The script incorporates a 1-hour Williams %R filter to ensure that signals align with broader overbought or oversold conditions on a higher timeframe.
Details
This tool utilizes a multi-layered approach to filter out noise in trending markets:
- Bollinger Bands: Used to detect price breakouts and subsequent crosses back inside the bands. A Bollinger Band Width filter is applied to ensure there is sufficient volatility (Standard Deviation) before a signal is triggered.
- RSI & Williams %R: These oscillators provide momentum confirmation. The Williams %R is specifically calculated from the 60-minute timeframe to provide a macro perspective on overbought (-20) and oversold (-80) levels.
- ADX: The Average Directional Index is used to ensure the market is not in a weak or trendless state, only allowing signals when the ADX value is above 20.
Settings
Bollinger Bands
- Bollinger Bands Length: The lookback period for the basis SMA.
- Bollinger Bands Standard Deviations: The multiplier for the upper and lower bands.
- Offset: Shifts the Bollinger Bands forward or backward in time.
RSI
- RSI Length: The lookback period for the Relative Strength Index.
- Overbought Level: The threshold above which the price is considered overbought.
- Oversold Level: The threshold below which the price is considered oversold.
FAQ
How do I use the bar colors?
The blue bar colors highlight instances where the RSI has reached overbought or oversold levels. These act as a warning that a reversal signal may be imminent.
Can I change the higher timeframe filter?
The current implementation uses a 1-hour (60-minute) Williams %R filter. This is hardcoded to provide consistent macro filtering, but the levels can be adjusted in the code if necessary.
How do I access the Mean Reversal indicator?
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.

