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.
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.