MACD crossover strategy: trading the signal line with the trend
The MACD crossover is the first indicator signal most traders learn: MACD crosses its signal line, so buy or sell. On its own it fires constantly. Add a trend filter and a rule about where the cross happens, and it becomes a usable pullback strategy.
At a glance
- Style
- Momentum pullback inside a trend
- Timeframes
- 4-hour for entries, daily for direction
- Markets
- Major forex pairs, gold, indices
- Holding time
- 1 to 7 days
- Works when
- A trending market with clear pullbacks
- Level
- Beginner
A MACD crossover happens when the MACD line (the 12-period EMA minus the 26-period EMA) crosses its signal line (a 9-period EMA of the MACD line). A cross up is bullish and a cross down is bearish. To trade it, first decide the trend, for example price above the 200-period EMA for longs only. Then wait for a pullback that pushes MACD below its signal line, and enter when MACD crosses back up, ideally while still below zero. Put the stop beyond the pullback's swing low and exit at twice the risk or on the opposite cross.
Key takeaways
- MACD is the gap between two moving averages; the signal line is an average of that gap. A crossover means momentum has turned.
- It lags twice: once in the moving averages, once in the signal line. The cross confirms a turn, it does not predict one.
- Trade crosses only in the trend direction. A 200-period EMA or the daily chart decides which side you are on.
- The best crosses come from the far side of zero: a bullish cross below zero in an uptrend marks a pullback ending.
- In a range, MACD crosses every few bars near zero. That is the market to leave alone.
How MACD works: three parts, one idea
MACD stands for moving average convergence divergence. Despite the name, it is simple arithmetic built from exponential moving averages of the closing price, and the default settings, 12, 26 and 9, describe all three parts.
- The MACD line is the 12-period EMA minus the 26-period EMA. When the faster average is above the slower one, the line is positive; when it is below, negative. The further apart they are, the larger the number.
- The signal line is a 9-period EMA of the MACD line itself, a smoothed copy that trails behind it.
- The histogram is the MACD line minus the signal line, drawn as bars around zero. It grows when MACD pulls away from its signal line and shrinks as they converge.
The single idea underneath is momentum. When price accelerates upwards, the 12-period average climbs faster than the 26, the MACD line rises, and it moves above its slower signal line. When the advance slows, the MACD line flattens and turns, and eventually crosses back below the signal line. A crossover is therefore a statement that short-term momentum has changed direction relative to its recent average.
Two kinds of cross
The signal-line cross is the MACD line crossing the signal line, the fast and frequent one, and the subject of this page. The zero-line cross is the MACD line crossing zero, which is identical to the 12 and 26 EMAs crossing each other. It is slower, rarer and closer to a trend signal than a timing signal. The academy lesson on MACD for trend and momentum covers both in depth.
Settings and lag: what MACD can and cannot tell you
MACD is built from averages of averages, so it lags twice. The 12 and 26-period EMAs already trail price. The signal line is a further 9-period average of their difference, which trails again. By the time the MACD line crosses its signal line, price has usually turned several bars earlier.
That is the trade-off every indicator makes. Faster settings, such as 5, 13 and 5, react sooner and cross more often, including on noise. Slower settings, such as 19, 39 and 9, ignore more noise and arrive later. The default 12, 26, 9 is a compromise that suits the 4-hour and daily charts reasonably well, and it is the version almost every platform and tutorial uses. There is little to gain by fine-tuning the numbers on past data; a setting that fits last year exactly tends to fit next year poorly.
What MACD does well is confirm. It tells you, without opinion, that the pullback has stopped falling and buyers are pushing again. What it cannot do is tell you where the trend is. On its own, a bullish cross in a downtrend is as likely to be a pause before the next leg lower as a reversal. That is why the strategy below adds a trend filter before it reads a single cross.
The setup: trend filter, pullback, cross
This is a trend-pullback strategy that uses the MACD crossover as its trigger. All three parts have to be present.
1. The trend filter
On the 4-hour chart, price is above a rising 200-period EMA for longs, or below a falling one for shorts. If you prefer structure to averages, use the daily chart: higher highs and higher lows for longs. Trade only in that direction and ignore every cross against it.
2. The pullback, seen on MACD
In an uptrend, wait for price to pull back. As it does, the MACD line falls below its signal line and the histogram turns negative. The strongest setups come when the pullback is deep enough to push the MACD line below zero, because that means the short-term average has dropped under the longer one: the pullback is real, not a pause of a few bars.
3. The trigger
Enter when the MACD line crosses back above the signal line on a closed candle. A cross that happens below zero while price is still above the 200-period EMA is the textbook version: momentum has turned back in the trend's direction from a washed-out level. A cross high above zero, after a long run, is late and often marks exhaustion rather than a fresh start.
In the chart above, price holds above a rising 200-period EMA. The pullback drags the MACD line below its signal line; when it crosses back up, the trade is taken with the stop under the pullback low and a target at twice the risk.
Stops, exits and position size
The stop goes beyond the swing low of the pullback (or the swing high for a short), plus a buffer for the spread. That is where the trade idea is wrong: if price makes a new low after momentum turned, the pullback is not over. Avoid placing the stop at a fixed number of pips or using the opposite MACD cross as the only stop; a cross can take many bars to arrive after price has already moved against you.
On a 4-hour EUR/USD chart the stop is often 25 to 60 pips. Size the position so that distance costs your fixed risk, such as 1% of the account, using the position size calculator.
Two exits are easy to define and test:
- A fixed target at twice the risk, or at the previous swing high if that is nearer.
- The opposite cross. Exit when the MACD line crosses back below the signal line. This lets strong moves run, but it gives back some profit because the cross is late by design.
A useful compromise is to take half at the first target and exit the rest on the opposite cross. Watch the histogram while you hold: bars that shrink for several candles in a row warn that momentum is fading before the cross arrives.
The rules, as a checklist
MACD crossover strategy, written so you can test it before trading it.
Setup
What has to be true before you look for an entry
- On the 4-hour chart, price is above a rising 200-period EMA (below a falling one for shorts).
- A pullback has pushed the MACD line below its signal line, ideally below zero.
- No high-impact release for either currency in the next few hours.
Entry
The trigger
- A candle closes with the MACD line crossed back above the signal line (below it for shorts).
- Enter at that close; skip the cross if price is already far from the pullback low.
Stop-loss
Where the idea is wrong
- Beyond the pullback's swing low (long) or high (short), plus the spread and a small buffer.
- Lot size set so the stop costs your fixed risk, for example 1% of the account.
Exit
How the trade ends
- First target at twice the risk or the previous swing high, whichever is nearer.
- Optional: close half there and exit the rest when MACD crosses back below its signal line.
Skip it when
Conditions that void the setup
- The 200-period EMA is flat and price keeps crossing it.
- MACD and its signal line are both hugging zero with tiny histogram bars.
- The cross is against the trend filter, however convincing it looks.
When MACD crossovers fail: the flat market
MACD needs a market that moves. In a sideways range, the 12 and 26-period averages converge, the MACD line sits near zero, and tiny wiggles in price push it back and forth across the signal line every few bars. Each cross looks valid on its own, and each one reverses before it gets anywhere.
You can see this coming. When the MACD line and the signal line are both hugging zero and the histogram bars are small, the market has no momentum to measure. The 200-period EMA usually goes flat at the same time, with price weaving across it, which means the trend filter is already telling you to stand aside.
The other failure is the cross against a strong trend. In a powerful downtrend, MACD produces bullish crosses on every bounce, and every one of them fails. The filter exists precisely to stop you taking those. If you find yourself wanting to take a cross against the 200-period EMA because it looks convincing, the right move is to wait for the next one with the trend. Divergence between MACD and price is a separate idea with its own rules, covered in the divergence trading strategy.
How to test a MACD crossover strategy
MACD rules are fully mechanical, which makes them a good first strategy to test properly.
- Pick one market and the 4-hour chart, with MACD at 12, 26, 9 and a 200-period EMA.
- Scroll back a year and step forward one candle at a time. Mark every signal-line cross, then keep only those in the trend's direction.
- Record each trade's entry, stop and exit. Note whether the cross came from below or above zero.
- Compare the two groups. If crosses from the far side of zero do better in your sample, keep that rule; if not, drop it rather than keep a filter that does nothing.
Count the spread on every trade and gather at least fifty before drawing conclusions. Look at the average win against the average loss and the longest losing streak, and check the streak against the drawdown calculator at your intended risk per trade. A strategy is only as good as your ability to keep following it through the bad run that will come.
More from the strategy archive
Golden cross trading
The 50-day average crossing the 200-day marks a change of trend. Use it as a filter, then buy pullbacks to the 50.
RSI divergence strategy
Price makes a new low, RSI does not. Wait for the break that confirms it, stop below the low, and respect strong trends.
Pullback trading
Join a trend after it pauses: find the retracement zone, wait for the pullback to break, stop under its low.
Frequently asked questions
What is a MACD crossover?
What are the best MACD settings?
Is a MACD crossover below zero better?
Which timeframe is best for MACD crossovers?
What is the difference between the MACD line and the signal line?
See strategies on live charts
Every MarketPro signal names its setup and timeframe, with the entry, stop and targets drawn on the chart. Free signals every week, and 320 lessons in the academy.
Same account as the app · No install · Free to start
Not investment advice. Past performance is not indicative of future results.