Camovia Tray™

Moving Average Convergence Divergence

MACD measures trend direction and momentum through the gap between two EMAs of different speeds — the classic trend-momentum oscillator.

What it is

MACD (Moving Average Convergence Divergence) consists of three parts: the MACD line (difference between a fast and a slow EMA), a signal line (a smoother of the MACD line), and a histogram (the gap between the two). It compresses trend direction and momentum strength into one sub-window: the MACD line above zero means the fast EMA is above the slow one (bullish), while the histogram shows whether momentum is accelerating or fading.

Origin

MACD was created by American trader Gerald Appel in the late 1970s and published in his market letter Systems and Forecasts. Originally applied to stocks, it became one of the most widely used trend-momentum indicators on every market. The 12/26/9 settings are Appel's originals and remain the platform defaults to this day.

Download Camovia Tray free — check quotes, manage positions, and hide in one click from your system tray.

Download Free

The formula

The three MACD components:

MACD line = EMA(12) − EMA(26)
Signal line = SMA(9) of the MACD line (MT5 convention)
Histogram = MACD line − Signal line

EMAs weight recent prices more heavily, so the fast line reacts sooner. Note an MT5-specific detail: MT5 computes the signal line as a 9-period simple average (SMA) of the MACD line, while TradingView and many other platforms use an EMA(9). Readings differ slightly — check the convention before comparing charts across platforms.

Worked example

A plain-language example of what MACD watches:

  1. Price rallies for a week: EMA(12) pulls above EMA(26) and the gap (MACD line) widens — the histogram is positive and growing: momentum is building.
  2. Price keeps rising but slows down: the gap between the EMAs starts to shrink — the histogram is still positive but shrinking: trend intact, momentum fading.
  3. Price turns down and the fast EMA crosses below the slow one: the MACD line drops below zero and the histogram flips negative — bears take over.

The histogram's waxing and waning flags momentum shifts earlier than signal-line crosses — many traders read a shrinking histogram as the first sign of a tired trend, instead of waiting for the cross to confirm.

How to read it

Standard reading of each component:

Range Common interpretation
MACD line > 0 EMA(12) above EMA(26) — short-term momentum dominates, bullish trend
MACD line < 0 Bearish trend; a turnaround from deeply negative territory often marks momentum repair
Bullish cross (MACD above signal) Momentum turning up; crosses below zero are weak, crosses above zero are strong
Bearish cross (MACD below signal) Momentum fading; same logic — location relative to zero matters more than the cross itself
Histogram Shrinking bars (on either side of zero) are the earliest hint of decelerating momentum

MACD is built from two EMAs, so it lags by design — it confirms trends, it does not predict turning points. Where a cross happens (above or below zero) matters more than the cross: crosses near zero are noise, the first cross after a strong directional move tends to be more meaningful.

Common signals & usage

Zero-line cross

The MACD line crossing zero is the EMA12/EMA26 bull-bear swap — the heaviest trend confirmation and the slowest signal. Use it to confirm trends, not to time entries.

Signal-line cross

Bullish cross = momentum up, bearish cross = momentum down. Filter: only take crosses in the direction of the larger trend (e.g. above MA200 take bullish crosses only) — this removes most chop-market noise.

MACD divergence

Price makes a higher high while MACD (or its histogram) does not → bearish divergence; lower low without a lower MACD low → bullish divergence. MACD divergences on higher timeframes (4H/daily) are far more reliable than on minutes.

Histogram momentum turn

Bars stop growing (without changing color) — the current push is losing steam. Commonly used as a take-profit / trim cue rather than a reversal signal.

Limitations & common mistakes

  • Cross machine in ranges: when the market chops, the EMAs tangle and every cross is noise. Filter with ADX > 25 or a clear trend structure before trusting MACD crosses.
  • Lag is a feature, not a bug: double-EMA construction means MACD always trails price turns. Its value is trend confirmation and momentum comparison — not catching tops and bottoms.
  • Divergence is not reversal: price can keep running long after a divergence. Wait for price structure (break of the prior low/high) to confirm.
  • Cross-platform conventions differ: MT5 uses an SMA signal line, many platforms use EMA. What looks like a "slightly different cross" across platforms can flip your divergence read.
  • Parameter superstition: 12/26/9 are defaults, not optima. Match parameters to your holding period — the parameters serve the timeframe, not the other way round.

MACD in MT5

MACD is a built-in MT5 indicator (histogram plus signal line). The MQL5 function for programmatic use is iMACD:

int iMACD(string symbol, ENUM_TIMEFRAMES period, int fast_ema, int slow_ema, int signal, ENUM_APPLIED_PRICE applied_price);
MQL5 function iMACD()
Default parameters fast_ema=12, slow_ema=26, signal=9
Default applied price PRICE_CLOSE
MT5 signal algorithm SMA(signal) of the MACD line (not EMA)
Display window Sub-window (zero line + histogram + signal line)

MT5 draws MACD as a solid histogram (the gap between MACD and signal lines) with the signal line overlaid. iMACD returns two buffers: 0 = main (MACD) line, 1 = signal line.

Behavior across timeframes

15-minute

Crosses fire constantly and noise dominates — take trend-direction crosses only

1-hour / 4-hour

The swing-trading workhorses: divergence + zero-line crosses carry the most value here

Daily

All classic uses apply; weekly MACD is the heaviest trend confirmation of all

Weekly

Crosses are rare but when they appear they usually mark multi-month trend confirmation or turning points

Indicator combinations

Common pairings for MACD:

  • With RSI: MACD sets direction (trend momentum), RSI finds extremes (overbought/oversold) — a MACD bullish cross + RSI recovering from oversold is a classic double confirmation. RSI
  • With MA: use a long MA (e.g. MA200) for the macro direction and take MACD entries only with the trend — trend filter plus momentum timing. MA
  • With ADX: trust MACD crosses only when ADX > 25; when ADX < 20, MACD crosses are mostly range noise. ADX

Symbols commonly watched with MACD

Symbol pages that list this indicator as a common tool:

FAQ

Q What do the 12/26/9 MACD parameters mean?

12 and 26 are the periods of the fast and slow EMAs (Gerald Appel's originals); 9 smooths the signal line. They are defaults, not optima — tune them to your trading timeframe: slightly faster for intraday, larger for swing.

Q How is MACD different from RSI?

Both are momentum indicators with different engines: MACD is built on EMA differences, so it carries trend information and excels at confirming trend momentum; RSI is built on gain/loss ratios and excels at marking overbought/oversold extremes. MACD shines in trends, RSI in ranges — many traders use both and look for agreement.

Q What is the MACD histogram?

The histogram is the MACD line minus the signal line. Bars above zero and growing = bullish momentum building; shrinking = fading (even if price still rises). The histogram is the earliest momentum component — it turns before signal-line crosses do.

Q Why does MT5's MACD signal line differ from TradingView's?

MT5 computes the signal line as a 9-period SMA of the MACD line; TradingView uses a 9-period EMA. Values differ slightly, so cross points appear at slightly different places. Align conventions before comparing analyses across platforms.

Q Should I buy every MACD bullish cross?

No. Filter at minimum by: (1) the larger trend — take crosses only in its direction; (2) location — crosses above zero are higher quality than below. Adding a price-structure confirmation (break of resistance/support) makes it sturdier still.

Turn MT5 / MT4 into a Tray Tool

Check quotes, manage positions, and hide in one click.

Download Camovia Tray

This page is educational content about a technical indicator. It is not investment advice. Indicator signals can and do fail — always combine them with your own risk management.