MACD Overlay
Mar 15, 2017

The MACD Overlay indicator plots the Moving Average Convergence Divergence (MACD) components directly onto the price chart to help traders contextualize momentum relative to price action and filter out false signals.
Usage
The Usage of the MACD Overlay allows for a more intuitive reading of momentum by seeing how the MACD and Signal lines interact alongside price candles.
- Bullish Momentum: Occurs when the MACD line (fast) crosses above the Signal line (slow), typically accompanied by green-shaded regions between the lines.
- Bearish Momentum: Occurs when the MACD line crosses below the Signal line, typically accompanied by red-shaded regions.
- Trend Filtering: An included SMA line helps determine the primary trend direction. Traders may look for long setups when price and MACD components are above the SMA, and short setups when they are below.
Details
This script calculates the MACD and Signal lines based on standard exponential and simple moving averages but outputs them on the price scale rather than in a separate oscillator pane. This implementation uses the difference between the slow and fast lengths to calculate the core MACD value, providing a visual representation of momentum convergence and divergence directly on the candles.
Settings
- FAST: The period for the fast moving average used in the MACD calculation (default is 12).
- SLOW: The period for the slow moving average used in the MACD calculation (default is 26).
- SIGNAL: The smoothing period for the Signal line calculation (default is 9).
- SMA: The length of the supplemental Simple Moving Average used for trend identification (default is 89).
FAQ
How do I use the MACD Overlay for trade signals?
You can look for crossovers between the MACD and Signal lines. A crossover upward indicates rising bullish momentum, while a cross downward indicates rising bearish momentum.
What does the SMA line represent?
The SMA line acts as a long-term trend filter. It helps you stay on the right side of the market by indicating whether the general price trend is bullish or bearish.
How can I access this tool?
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.