Join waitlist
Strategies / Momentum / MACD Zero Line Cross

MACD Zero Line Cross

Buys when the MACD line, using 12 and 26 periods, crosses above zero and sells when it crosses back below zero. This long only strategy has no stop or target.

MomentumLong onlySwingNasdaq 100Daily
2.46Profit factor
20,995Net profit EUR
43.01%Win rate
186Trades
-3,422Max drawdown
113Avg trade

Best run of 24. Nasdaq 100, Daily, spread 3, from run pf:2026-10-10-NAS100-D.tsv:1.

Entry rules, long

Exit rules

  1. The MACD line crosses under 0 and the long is closed.

Test conditions

PeriodUp to 2026-10-10
InstrumentNasdaq 100, Daily
Spread3 points
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-10-11

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nasdaq 100Best runDaily2.46 18643.0120,995 EUR-3,422
GoldDaily2.31 24031.673,747 EUR-809
S&P 500Daily1.97 26035.384,069 EUR-735
Dow JonesDaily1.93 25536.0828,389 EUR-6,165
DAX 40Daily1.63 24037.9214,859 EUR-3,429
USD/JPY30 min1.14 3,34230.22695,470 USD-171,200
USD/JPYDailyn/a 21836.701,249,310 USD-485,700
USD/JPY1 hourn/a 2,34231.21635,650 USD-217,260
USD/JPY10 minn/a 3,53129.11186,980 USD-154,010
EUR/USDDailyn/a 20236.6392,076 USD-47,880
Nikkei 225Dailyn/a 19634.1838,984 USD-13,365
Nikkei 2254 hoursn/a 46732.9823,128 USD-15,009
Dow Jones4 hoursn/a 18135.9113,682 EUR-4,750
US Crude OilDailyn/a 19538.4611,018 EUR-7,512
Nasdaq 1001 hourn/a 2,01132.1710,970 EUR-3,846
Nasdaq 10030 minn/a 3,37332.2910,830 EUR-3,615
Nasdaq 1004 hoursn/a 57335.789,894 EUR-5,336
DAX 4030 minn/a 3,42330.188,828 EUR-4,179
DAX 401 hourn/a 1,92031.827,561 EUR-4,219
Gold4 hoursn/a 50835.043,264 EUR-1,051
Gold1 hourn/a 1,99730.453,015 EUR-921
S&P 5004 hoursn/a 54737.663,007 EUR-801
Gold30 minn/a 3,43629.251,932 EUR-913
Gold5 minn/a 3,51928.67652 EUR-557

Charts

Results by run

Top 10 of 24 runs. The full list is in the table above.

Above 1.0 made money, below 1.0 lost money.

The code

ProBuilder code, as tested

// ==============================================================
// MACD Zero Line Cross
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Long only
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

myMacd = MACDLine[12,26,9](close)

10 more lines: the entry and exit rules.

Setup

How to load it

  1. Copy the code with the copy button on the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Indicators used

MACD
Longer historyRe-run on up to 1,000,000 barsNasdaq 100 · Daily · older data 0.00 EUR

Nasdaq 100 had no history beyond the standard run, so both runs used 10,000 bars.

Nasdaq 100 · Daily

Bars available10,000
Net, standard 200,000-bar run20,994.60 EUR
Net, long run20,994.60 EUR
Net on the older data alone0.00 EUR
Read this firstKnown weaknesses2 points
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run MACD Zero Line Cross in ProOrder?

Yes. The code is ProBuilder and runs as an automated ProOrder system. Backtest it on your own account with your own spread and position size before trading it live.

Which markets was it tested on?

It was tested on 24 market and timeframe combinations. The best run was Nasdaq 100, Daily, with a profit factor of 2.46 over 186 trades.

How large was the drawdown?

The best run had a maximum drawdown of 3,422 EUR at the tested position size, against a net result of 20,995 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Slow MACD Slope

Uses the same indicator.

6.80 PF · 7,305 trades

Volatility Spike Regression Long

Best run on the same market, Nasdaq 100.

1.22 PF · 1,850 trades

Oscillator Cross With Hull Filter

Also a momentum strategy.

2.45 PF · 125 trades

See how ProRealAlgos combines strategies like this into one automated portfolio.

Copy trading on US indices is available to ProRealAlgos members as spots open.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs