MetaTrader-MACD
Sep 20, 2020

The MetaTrader-MACD indicator provides a revised version of the Moving Average Convergence Divergence (MACD) oscillator styled specifically to match the visual representation and calculation methods found on the MetaTrader platform.
Usage
The Usage section describes how traders can interpret the momentum and trend direction using this specific layout. Unlike the standard TradingView MACD, which often displays the MACD line and a histogram of the difference between the MACD and Signal lines, this version plots the MACD value itself as a histogram (columns) and overlays the Signal line.
- Trend Identification: When the histogram bars are above the zero line, the trend is generally considered bullish. When below, it is considered bearish.
- Momentum Changes: The color-coded histogram indicates momentum. Darker green bars show increasing upward momentum, while lighter green shows fading upward momentum. Conversely, dark red indicates increasing downward momentum, and lighter red suggests fading downward momentum.
- Crossovers: A bullish signal is generated when the histogram bars cross above the Signal line, while a bearish signal occurs when they cross below it.
Details
The MetaTrader-MACD calculates the difference between a fast and a slow moving average. By default, these are Exponential Moving Averages (EMAs), but this script provides the flexibility to switch to Simple Moving Averages (SMAs) for the oscillator calculation, which is a common variation in different trading environments. The "Signal" line is then calculated as a moving average of the resulting MACD histogram.
Settings
Oscillator Settings
- Fast Length: Sets the period for the shorter moving average (default is 12).
- Slow Length: Sets the period for the longer moving average (default is 26).
- Source: Determines which price data (Close, Open, High, Low, etc.) is used for the calculations.
- Simple MA(Oscillator): When enabled, the indicator uses SMAs instead of EMAs for the MACD calculation.
Signal Settings
- Signal Smoothing: Sets the period for the Signal line (default is 9).
- Simple MA(Signal Line): When enabled, the Signal line is calculated using an SMA; otherwise, an EMA is used.
FAQ
How do I use the MetaTrader-MACD for trade entries?
Traders typically look for histogram crossovers with the Signal line or zero-line crosses to identify potential entry or exit points in conjunction with other technical analysis tools.
What is the difference between this and the default MACD?
The primary difference is visual and structural; this script plots the MACD line as the histogram itself, whereas the default TradingView version plots the difference between the MACD and Signal lines as the histogram.
How can I access MetaTrader-MACD?
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.