Build your own signal ›

MACD alerts in MetaTrader 5

A MACD alert tells you when the gap between two moving averages turns — crossing its signal line, or crossing zero. MetaTrader 5 draws MACD but cannot alert on it. fx-alert reads the MACD already on your chart and notifies you on the candle close. One thing to know before you pick a level: MT5 builds and draws its MACD differently from most other platforms, so what you see in your terminal will not match what you saw elsewhere. That is explained below.

What MACD is measuring

The distance between a fast and a slow exponential moving average of the close. When the fast average pulls away from the slow one, the MACD line moves away from zero; when they converge, it returns toward zero. A second line — the signal — is a smoothed version of the first, and the two crossing is the event most traders set an alert on. Crossing zero is the other: that is the moment the two underlying averages themselves cross.

When traders reach for it

As a trend-turn marker rather than a level. Three events are usually watched: MACD crossing its signal line, MACD crossing zero, and MACD turning while price does not — the last of which is read by eye and cannot be alerted, by anyone, because it is a comparison of two shapes rather than two numbers.

How to set it in fx-alert

  1. Put MACD on your MT5 chart with the fast, slow and signal periods you use. fx-alert reads all three from the chart.
  2. On that chart, press + Alert, then choose Indicator.
  3. Pick which line to watch: MACD or Signal.
  4. Choose the other side — the other line, for a signal crossing, or a number you type, with 0 being the usual one.
  5. Choose On close, pick your channels, and press Set alert.

MACD has a scale of its own, so it cannot be compared with a price or with your drawn line inside one alert. Pairing it with a level means two alerts.

Common mistakes

⚠ Expecting MT5's numbers to match another platform's. MetaTrader 5's built-in MACD builds its signal line as a SIMPLE moving average of the MACD line:

MACD   = EMA(close, 12) − EMA(close, 26)
Signal = SMA(MACD, 9)

Most other platforms, and most textbooks, use an exponential average there instead. Both are called "MACD(12, 26, 9)", and they cross at different moments. You can see it without taking anyone's word for it: open the indicator's properties in MT5 and read the third field. It is labelled "MACD SMA", not "Signal EMA".

⚠ Expecting the bars to mean what they mean elsewhere. MT5 draws the MACD line itself as the histogram, and the signal line as a dashed line over it. On most other platforms the histogram is something else entirely — the DISTANCE between MACD and its signal — and MACD is drawn as a line.

The consequence is not cosmetic. "The bars crossed zero" means:

on MT5          MACD crossed zero — the two EMAs themselves crossed
elsewhere       MACD crossed its signal line

Two different events, same picture. Open MT5's Data Window on a MACD subwindow and it lists exactly two values, MACD and Signal — there is no third number, because there is no separate histogram.

So if the event you actually want is the one the bars show you on another platform, set the alert as MACD against Signal. Setting it against 0 gives you the other event — which is a perfectly good one, just not that one.

Typing a level from another symbol. MACD is measured in the price units of the pair it runs on. A level of 0.0010 means something on EURUSD and nothing on gold. Zero is the only level that transfers.

Setting it where it is already true. If MACD is already below its signal line, fx-alert holds the alert until it crosses back above, then arms it, and tells you on the crossing after that.

Changing the periods and keeping the level. The fast and slow periods set the whole range the MACD line moves in. Change them and any typed level has to be rethought.

Pair it with

The usual partner is a second trend measure built on different arithmetic — Parabolic SAR — or your own line, which costs the second alert. Both patterns are on thecombinations page.

fx-alert is an alert tool, not investment advice. It reports that a condition you set became true; what to do about it is always your decision. Trading forex and CFDs carries a high risk of losing money.