Alan Ross

Alan Ross Forex

Free Forex Indicators, MetaTrader Tools and Honest Trading Guides

Indicators

MACD Zero-Line and Trend Filter Tested: 0 of 32 Runs Passed, and the Trades the Filters Threw Away Did Better in 15 of 28 Checks

Key takeaways

  • I took every MACD 12/26/9 signal-line cross on EURUSD and gold, M5 and M15: 3,302 crosses. Then I ran them through seven popular filters: the zero line both ways, the 200 EMA, ADX above 25, and their combinations. That is 32 runs and 8,137 trades with the same stop, target and cost.
  • 0 of 32 runs passed. 5 made money after cost, all on gold, 2 of them in both halves of the data, and none beat the best 5% of random entries.
  • The filters did not pick better trades. In 15 of 28 checks the crosses a filter threw away did better than the ones it kept. Only 2 of 28 gaps were bigger than noise, one each way.
  • Against 1,000 random cuts of the same size, no filter reached the 95th percentile. The best two sat at the 93rd, both on gold M15 and both using the 200 EMA.
  • The “trend side” cross, bullish above zero, came after 3.3 to 4.2 ATR of move. The textbook cross below zero came after 2.0 to 2.5.

Almost every MACD guide gives the same advice after the crossover: do not take every cross, filter it. Only buy below the zero line. Or only buy above it. Only trade with the 200 EMA. Only when ADX says there is a trend. The filters disagree with each other, and none of the guides I read showed a count of what the filter actually did.

So I counted. Same crosses, same exit, seven filters, two markets, two timeframes.

What is the MACD zero-line filter?

A price chart on a screen, where a MACD cross can happen above or below the zero line

MACD is the gap between a 12-period and a 26-period EMA. When it is above zero, the fast average is above the slow one. Crossing zero is the same event as an EMA 12/26 crossover, bar for bar, which I showed in MACD vs moving average crossover.

The usual entry is the cross of MACD over its 9-period signal line. The zero line then splits those crosses into two kinds:

  • Textbook side: a bullish cross below zero, or a bearish cross above zero. MACD turns while it is still on the wrong side, so you are catching a pullback early.
  • Trend side: a bullish cross above zero, or a bearish cross below zero. MACD is already on the side of the trade, so you are joining a move that is under way.

Both are taught as the “right” one. On my data 61% to 63% of all crosses were on the textbook side, and the median cross was only 0.43 to 0.51 ATR away from zero.

How was it tested?

A trader checking charts, deciding which MACD crosses to filter out
  • Data: EURUSD M5 from June 3 to August 26, 2026, 16,926 bars; gold M5 from June 16 to August 26, 13,736 bars. M15 built from the same bars: 5,642 and 4,577.
  • Signal: MACD 12/26/9 with an exponential signal line, cross on the close, entry at that close.
  • Filters: textbook side, trend side, price on the trade side of the 200 EMA, textbook plus 200 EMA, trend plus 200 EMA, ADX 14 above 25, trend side plus ADX.
  • Exit: stop 1.5 ATR, target 3 ATR, 48 bars at most, one trade at a time.
  • Cost: 1 pip on EURUSD, $0.30 an ounce on gold.
  • Pass: profit after cost, profit in both halves (split July 15) and above the 95th percentile of 200 random-entry runs with the same exit. The same three checks as in forex trading systems tested.

Did any filter pass?

FilterEURUSD M5EURUSD M15Gold M5Gold M15
No filter-1.38 (854)-1.25 (238)-0.39 (557)+0.82 (173)
Textbook side-1.37 (748)-1.61 (213)-0.29 (502)-0.92 (162)
Trend side-1.58 (432)-1.58 (118)-1.07 (298)-0.49 (86)
200 EMA-1.39 (572)-1.18 (163)-0.87 (388)+1.21 (117)
Textbook + 200 EMA-1.31 (271)-0.69 (78)-1.27 (186)-0.50 (58)
Trend + 200 EMA-1.51 (354)-1.56 (100)-0.85 (246)+2.17 (69)
ADX above 25-1.24 (340)-1.28 (102)+0.05 (317)+0.14 (116)
Trend + ADX-2.01 (106)-2.97 (24)-2.72 (109)-1.85 (40)

Profit per trade after cost: pips on EURUSD, dollars an ounce on gold. Trades in brackets. The trend side plus ADX on EURUSD M15 had too few trades to judge.

EURUSD lost on every line, between 0.69 and 2.97 pips a trade, which is about the spread and then some. Nothing in this table turned MACD into a positive EURUSD system. The best EURUSD lines were ADX above 25 on M5 at -1.24 pips and the textbook side plus 200 EMA on M15 at -0.69: still losses, and still inside the random range.

Gold M15 is the only chart where MACD made money without a filter: +$0.82 an ounce over 173 trades. Two filters raised that, both with the 200 EMA: +$1.21 and +$2.17. Both were positive in both halves. Neither beat the random-entry test: the 95th percentile of random entries with the same exit was +$3.76 and +$4.78. On 69 to 117 trades a lucky run of random entries does that well, and the gold trend in this period helped any long.

Did the filters pick better trades, or just fewer?

That is the real question about any filter. Cutting trades cuts the spread bill. That alone can make a filtered system look better. To separate the two, I scored every cross as its own trade and compared the crosses each filter kept with the crosses it threw away.

Kept minus dropped, per tradeEURUSD M5EURUSD M15Gold M5Gold M15
Textbook side+0.02+0.00+0.72-1.54
Trend side-0.02-0.00-0.72+1.54
200 EMA+0.06+0.45-0.80+3.18
Textbook + 200 EMA+0.10+0.88-0.72-0.33
Trend + 200 EMA-0.01-0.13-0.40+3.93
ADX above 25+0.39+0.07-0.97-1.10
Trend + ADX-0.66-1.20-2.91+0.32

Positive means the kept crosses did better. Bold means the 5% to 95% bootstrap range of the gap, 2,000 resamples, was entirely on one side of zero.

The kept crosses did better in 13 of 28 checks, the dropped ones in 15. That is a coin toss. Two gaps were bigger than noise. On gold M15 the trend side plus 200 EMA kept the better crosses by $3.93 an ounce, and the range only just cleared zero (+$0.01 to +$7.87). On gold M5 the trend side plus ADX kept the worse crosses by $2.91, clearly.

The second check is harsher. For each filter I drew 1,000 random subsets of the crosses, the same size as the filter’s selection, and asked where the filter’s average landed among them.

Percentile among random cutsEURUSD M5EURUSD M15Gold M5Gold M15
Textbook side53528226
Trend side48521675
200 EMA57701493
Textbook + 200 EMA63752046
Trend + 200 EMA51473193
ADX above 259254831
Trend + ADX9290.253

50 is what a coin-flip filter scores. 95 or above would mean the filter picked better than 95% of random cuts.

Nothing reached 95. The zero line in either direction scored 48 to 53 on EURUSD: it threw away crosses at random as far as profit was concerned. ADX above 25 reached 92 on EURUSD M5 and 8 on gold M5, which is the same filter working on one chart and hurting on the next. I saw the same instability in the ADX 25 trend filter test.

Why is the trend-side cross so late?

Because to cross upward above zero, the fast EMA has to be above the slow one already. The move that put it there has happened.

Median, in ATREURUSD M5EURUSD M15Gold M5Gold M15
Textbook side: already moved2.522.242.012.00
Trend side: already moved4.173.773.443.31
Trend + ADX: already moved5.905.004.034.34
Trend side: share where more was gone than left74.9%67.1%67.6%63.8%

“Already moved” is the distance from the extreme of the last 24 bars to the cross. “Gone versus left” compares it with the furthest price went in the trade’s direction over the next 24 bars.

Stacking ADX on top made it worse. ADX only rises after a move, so trend side plus ADX entered 4.0 to 5.9 ATR into it, and it was the worst line in the first table on all four charts. Two late confirmations make one very late entry. The same timing problem appears in bar close vs live signal.

So what is worth keeping?

  • On EURUSD M5 and M15, no MACD filter changed the result. Every one of 16 runs lost 0.69 to 2.97 pips a trade. If MACD crosses lose, a zero-line rule does not rescue them. The raw crosses are measured in MACD crossover rules backtested.
  • Do not stack the trend side with ADX. It was the latest entry and the worst line on all four charts.
  • The only lead is the 200 EMA on gold M15. +$1.21 and +$2.17 a trade, positive in both halves, but below the random-entry bar on 69 to 117 trades. It needs more data before anyone should trust it.
  • The textbook and trend sides were mirror images. On EURUSD the gap between them was 0.02 pips a trade or less. Which side of zero the cross happened on told me nothing about the trade.

The head-to-head between the two sides of the zero line is in MACD cross above vs below the zero line. How to set the filter up in MetaTrader, and what happened across 120 settings, is in MACD zero line filter for MT4.

Frequently asked questions

Does the MACD zero-line filter work?

Not on this data. 0 of 32 filtered runs passed, and the crosses the filters threw away did better than the ones they kept in 15 of 28 checks.

Should I only buy MACD crosses above the zero line?

Those crosses came after 3.3 to 4.2 ATR of move, against 2.0 to 2.5 for crosses below zero, and they did no better: the gap was within noise on all four charts.

Does a 200 EMA filter improve MACD?

On EURUSD no: it still lost 1.18 to 1.39 pips a trade. On gold M15 it raised MACD to +$1.21 an ounce in both halves, but that stayed below the random-entry benchmark.

Is MACD with ADX better than MACD alone?

ADX above 25 alone was a coin flip that changed sign between charts. Combined with the trend-side cross it was the worst filter on all four charts.

Why do filters make a MACD backtest look better?

Mostly because they trade less and pay the spread less often. When I compared kept and dropped crosses directly, the filter usually had no edge.

Want a trend line that does not wait for two averages?

It is my own enhanced DeMARK Trend Line indicator for MetaTrader 4 and 5. Non repaint, clean, and free.

Download the Free DeMARK Indicator

Written by Alan Ross

Forex trader and MetaTrader indicator developer. I build and test MT4 and MT5 tools, then write the honest version of how they actually work. More about me.

Last reviewed October 2026
Alan Ross
Alan Ross

Forex educator and indicator developer. I build and trade my own MetaTrader tools, and share the ones that genuinely help.

Leave a comment

Your email address will not be published. Comments are reviewed before they appear.