MACD + Averages
Jan 21, 2022

The MACD + Averages indicator provides a modified Moving Average Convergence Divergence oscillator that incorporates cumulative average peak and dip levels to help traders identify overextended market conditions and potential trend reversals.
Usage
The Usage section focuses on identifying trend momentum and potential reversal zones using the calculated average levels.
- Average Peak and Dip Lines: The indicator calculates the average value of all historical signal line peaks (above zero) and dips (below zero). These lines act as dynamic thresholds for overbought and oversold conditions.
- Momentum Visualization: The MACD histogram and signal lines are color-coded to show whether momentum is increasing or decreasing. Strong colors represent rising bullish or falling bearish momentum, while faded colors indicate weakening momentum.
- Divergence Detection: Small triangle shapes appear on the signal line when the script detects potential bullish or bearish divergences based on the signal line's reaction at historical extreme levels.
- Table Monitor: A right-side monitor can be enabled to provide additional context, though the primary focus is on the oscillator's interaction with the shaded average range.
Details
The script enhances the standard MACD calculation (Fast EMA - Slow EMA) by tracking every peak and dip occurring at histogram crossovers. It maintains a running sum of these points to determine the "Average Top" and "Average Bottom" of the MACD signal line over the entire chart history. By filling the area between these two averages, the indicator creates a visual "value zone," making it easier to see when the current MACD signal is reaching historically significant extremes.
Settings
Visibility Settings
- Show right-side monitor?: Toggles the visibility of the information table on the top right of the chart.
MACD Settings
- MACD Fast MA Length: Sets the period for the fast Exponential Moving Average (default 12).
- MACD Slow MA Length: Sets the period for the slow Exponential Moving Average (default 26).
- MACD Signal Length: Sets the smoothing period for the MACD Signal line (default 23).
FAQ
How do I interpret the shaded area?
The shaded area represents the historical average range of the MACD signal peaks and dips. When the signal line moves outside this area, it suggests the market may be reaching an extreme state compared to its historical norm.
What do the colored triangles signify?
The upward-pointing green triangles indicate potential bullish divergence/momentum shifts near historical lows, while downward-pointing red triangles indicate potential bearish divergence/momentum shifts near historical highs.
How can I access MACD + Averages?
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.