All indicators

Mean Reversion Indicator

Aug 31, 2019

Static chart image
SignalsOscillatorsChannelsRepainting Functionality

The Mean Reversion Indicator tool is designed to anticipate local trend reversals by monitoring the behavior of oscillating price curves within a normalized channel. It provides traders with visual cues when price deviations reach extreme levels, suggesting a likely return to the mean.

Usage

The indicator consists of two primary curves oscillating between a fixed range of -1 and 1. Traders can use this tool to identify overextended market conditions:

  • Overbought Signals: When the curves reach the upper boundary (1), it indicates a potential bearish reversal.
  • Oversold Signals: When the curves reach the lower boundary (-1), it indicates a potential bullish reversal.
  • Resonance: A stronger signal is often inferred when both curves move in symmetry (resonance) and touch the boundaries simultaneously.
  • Support/Resistance: The background histogram represents a Karobein Oscillator, which acts as a secondary layer of confirmation by showing momentum support or resistance behind the primary signals.

Details

The script utilizes several mathematical transformations to normalize price action into a bounded oscillator:

  • Minimax Scaling: This technique is used to anchor various data points (slopes, percentages, and oscillator values) between -1 and 1 for consistent interpretation.
  • Percentage Deviation: The tool calculates the percentage of price relative to its historical high and low within a specific lookback window.
  • Karobein Oscillator: This component helps smooth the price data and provides a trend-following background that identifies the underlying momentum environment.
  • Multi-Timeframe Integration: The script allows for the processing of price data from different intervals, which can be stabilized via the "Repaint" toggle.

Settings

  • Price Data: Determines the source input (e.g., close, open, hlc3) used for the calculations.
  • Time Frame: Sets the lookback period and calculation frequency for the indicators' internal logic.
  • Repaint?: A toggle that controls how the security function handles data; enabling it allows the script to use current bar data, while disabling it uses historical data to prevent repainting.

FAQ

How do I interpret the background histogram?

The background histogram is a Karobein oscillator. When it is highly positive or negative, it suggests strong momentum that can either support a trend or provide resistance against a mean reversion attempt.

What does "resonance" mean in this indicator?

Resonance occurs when the two main plotting lines align and touch the boundaries at the same time. This alignment suggests a higher probability of a trend reversal.

How do I access this script?

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.