MACD Crossover
A MACD crossover strategy enters when the MACD line crosses above its signal line — a momentum trigger that traders use to catch a trend turning upward.
The MACD crossover is a momentum strategy built on the MACD indicator (Moving Average Convergence Divergence). MACD tracks the relationship between two moving averages of price and turns it into a single line that swings above and below zero. The strategy's core rule is simple: enter when the MACD line crosses above its signal line, and treat the opposite cross as a signal that momentum is fading.
The three parts of MACD
- MACD line — the 12-day EMA minus the 26-day EMA. It rises when short-term price momentum outpaces the longer term.
- Signal line — a 9-day EMA of the MACD line. It is a smoothed version that the MACD line crosses through.
- Histogram — the gap between the MACD line and the signal line, drawn as bars. It grows as momentum strengthens and shrinks as it fades.
The standard settings — 12, 26, and 9 — give the strategy its other name, the 12/26/9 crossover. A common confirmation is to require the histogram to be above zero, which is just another way of saying the MACD line is above its signal line.
A worked example
The figures below are illustrative, not live prices:
| Day | MACD line | Signal line | Histogram | Signal |
|---|---|---|---|---|
| Mon | -0.40 | -0.20 | -0.20 | MACD below signal — bearish |
| Tue | -0.10 | -0.15 | +0.05 | Crossover — MACD rises above signal |
| Wed | 0.15 | -0.05 | +0.20 | Momentum building, histogram grows |
| Thu | 0.35 | 0.08 | +0.27 | Trend confirmed |
| Fri | 0.40 | 0.20 | +0.20 | Still positive, position held |
On Tuesday the MACD line (-0.10) rises above the signal line (-0.15), flipping the histogram positive. That crossover is the entry. The strategy stays in while the MACD line holds above the signal line and exits when it crosses back below.
Strengths and limitations
- Strength — responsive momentum read. MACD reacts faster than a 50/200 moving-average cross, so it can signal a turn earlier.
- Strength — the histogram adds nuance. A shrinking histogram warns that momentum is fading even before the lines cross, giving an early heads-up.
- Limitation — choppy in sideways markets. When a stock drifts flat, the MACD line can cross the signal line repeatedly, producing whipsaw trades.
- Limitation — still a lagging signal. MACD is built from moving averages, so it confirms a move rather than predicting it.
Build a MACD crossover strategy on PSX Algos
PSX Algos ships a MACD cross starter template wired with *MACD crosses above signal*. Add the histogram-above-zero confirmation, set your exit and stop-loss, then backtest the rule across a decade of PSX history to see how the crossovers would have performed before going live.
Open the MACD Crossover template →Frequently asked
What is a MACD crossover in simple terms?
It is when the MACD line crosses above its signal line, which traders read as upward momentum building. The opposite cross is read as momentum fading.
What do 12, 26 and 9 mean in MACD?
They are the standard settings: the MACD line is the 12-day EMA minus the 26-day EMA, and the signal line is a 9-day EMA of the MACD line.
What does the MACD histogram show?
The histogram is the gap between the MACD line and the signal line. It grows as momentum strengthens and shrinks as it weakens, often warning of a turn before the lines actually cross.
How is a MACD crossover different from a golden cross?
A MACD crossover uses two fast-moving momentum lines and reacts quickly, while a golden cross uses the slow 50-day and 200-day moving averages and confirms longer-term trend changes.