All indicators

Price - Mean Reversion Expansion

Jul 24, 2021

Static chart image
SignalsDashboardMoving Averages

The Price - Mean Reversion Expansion indicator quantitatively measures and visualizes price expansion and reversion relative to a series of Exponential Moving Averages (EMAs) to help traders identify trend exhaustion and potential momentum shifts.

Usage

The indicator displays the distance between price and its means as a histogram, with an accompanying envelope to track the average expansion/reversion levels.

  • Bullish Expansion (Green Bars): Occurs when the price is trading above the highest EMA in the set, suggesting strong upward momentum.
  • Bearish Expansion (Red Bars): Occurs when the price is trading below the lowest EMA in the set, suggesting strong downward momentum.
  • Entanglement (Blue Bars): Occurs when the price is trading within the range of the EMAs, indicating a lack of clear trend or consolidation.
  • Expansion Signals: A "Green Dot" appears when the expansion bar crosses over the blue envelope, signaling a potential breakout or acceleration. A "Red Dot" appears when it crosses under, suggesting a decrease in expansion or a potential mean reversion move.
  • Trend Strength Table: A small table at the bottom right visualizes the angles of the four EMAs. Brighter colors indicate steeper slopes (stronger trends), while gray indicates a flat or weak slope.

Details

The script utilizes four distinct EMAs (defaulting to 20, 50, 100, and 200) to create a comprehensive "mean" zone. It calculates the "Delta" (the normalized difference between the highest and lowest EMA) and the "Price Delta" to quantify how far the price has stretched from these averages.

The histogram height represents the magnitude of this stretch. When the histogram is far from the zero line, the price is extended; when it returns toward zero, it indicates a reversion to the mean. The angle calculations for the trend table are derived using the arctangent of the change in EMA values over a 5-bar lookback period.

Settings

  • Use this / Symbol: Allows users to calculate the reversion metrics based on a different ticker than the one currently on the chart.
  • Source: The price input used for calculations (default is close).
  • Envelope Offset: Shifts the average expansion envelope forward or backward on the x-axis.
  • EMA 1-4: Length inputs for the four Exponential Moving Averages used to define the mean.
  • Show Multi Time Trend: Toggles the visibility of the EMA angle strength table in the bottom right corner.
  • Show Price Delta: Toggles the plot of price relative to the lowest EMA.
  • Plot Trend Length: A utility toggle that displays how many bars the current trend state has persisted.

FAQ

How do I interpret the colors on the trend table?

The colors represent the slope of the EMAs. Green indicates a positive slope, red indicates a negative slope, and the intensity of the color reflects how steep the angle is.

What do the dots on the oscillator signify?

The dots indicate a crossover or crossunder between the expansion delta and its signal envelope, often used to identify the peak of a move or the start of a trend acceleration.

How can I access Price - Mean Reversion Expansion?

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.