Whistle AI

Coming soon

How to set a MACD crossover alert

The MACD is two lines made from moving averages, and the signal is one crossing the other. Here is what the lines are and how to be told when they cross.

The MACD sits in a panel under the price on a great many charts: two lines that wind around each other, and a row of bars between them. What traders watch for is one line crossing the other. On a daily chart it happens every few weeks, at no set time, which is a good reason to be told and not to keep looking.

What the MACD is

MACD stands for moving average convergence divergence. Gerald Appel devised it in the 1970s. It is built from the closing price in three steps.

  • The MACD line is a fast average of the price less a slow one: the 12-bar exponential average less the 26-bar. When the price has been rising, the fast average is above the slow one and the line is above zero.
  • The signal line is a 9-bar exponential average of the MACD line. It follows the MACD line, a little behind.
  • The histogram is the MACD line less the signal line, drawn as bars. It is above zero when the MACD line is above its signal.

The settings 12, 26 and 9 are the ones on nearly every chart, and they are the ones Whistle AI uses. Other settings cannot be asked for.

The crossover

The usual signal is the MACD line crossing its signal line. Crossing up means the gap between the fast and slow averages has started to widen upward. Crossing down means the reverse.

Tell me when the MACD on Apple crosses above its signal line

Tell me when the MACD on Tesla crosses below its signal line

A cross happens on one bar and is over, so you are told once each time.

Say which bars

A MACD on a daily chart and a MACD on a 15-minute chart are different things that happen to share a name. Neither sentence above names a bar, so you pick one before saving: 15 minutes, 30 minutes, an hour or a day. Or put it in the sentence:

Tell me when the daily MACD on Nvidia crosses above its signal line

The zero line

The other moment people watch is the MACD line itself going through zero, which is the 12-bar average crossing the 26-bar. "Turns positive" is read as crossing up through zero:

Tell me when the MACD on Bitcoin turns positive

The histogram can be asked about in the same way. It turning negative is the MACD line dropping under its signal:

Tell me when the MACD histogram on Microsoft turns negative

A cross with a condition

The MACD crosses up in falling markets as well as rising ones. A common way to narrow it is to ask for the cross only while the price is above a long average:

Tell me when the MACD on Apple crosses above its signal line and the price is above its 200-day average

That is counted in days, since the 200-day average says so. There is more on averages in the guide to moving average alerts.

As a rule with a buy and a sell

The two crosses make a pair:

Buy Amazon on the MACD cross up and sell on the cross down

Then the alert gives a buy signal on the cross up and a sell signal on the cross down. The pair is among the ready-made signals in the app, under the name MACD cross. Whistle AI places neither trade. It tells you when your rule says so, and what you do then is yours to decide, at your own broker.

Things to know before you rely on one

  • It is late by design. The MACD is made of averages of averages. By the time the lines cross, the price has already moved.
  • It crosses often in a flat market. When the price goes sideways, the two lines lie close together and cross back and forth.
  • A signal is a fact about a price, not a forecast. A cross says the short run has turned against the long one. It does not say for how long.
  • It is checked when a bar closes. Lines that touch in the middle of a bar and part again by its close have not crossed.
  • Alerts can be late or missing. Prices come from outside providers, and any service can fail.

Wording in general is covered in the guide to alerts in plain English.

Questions people ask

What settings does the MACD alert use?

12, 26 and 9, the standard ones. Whistle AI does not take others for the MACD. Two exponential averages of other lengths crossing can be asked for as averages.

What is the difference between the signal line cross and the zero line cross?

The signal line cross comes first and more often. The zero line cross is the 12-bar average crossing the 26-bar, and it comes later.

Does the MACD work on crypto?

It is arithmetic on closing prices, so it can be worked out for a coin as for a stock. What it is worth there is yours to judge.

Will I be told again while the MACD stays above its signal line?

No. A cross is one bar. You are told when it happens, and next when the lines cross again.

Keep reading