Join waitlist
Strategies / Momentum / MACD Zero Line Upside Crossover

MACD Zero Line Upside Crossover

Buys when the MACD line, set to 12, 26 and 9, crosses above zero, and sells when it crosses back below zero. The position is held while the MACD line stays above zero.

MomentumLong onlySwingGoldDaily
1.82Profit factor
30,559Net profit EUR
31.67%Win rate
240Trades
-13,080Max drawdown
127Avg trade

Best run of 4. Gold, Daily, spread 0.6, from run pf:2026-10-11-GOLD-D.tsv:8.

Entry rules, long

Exit rules

  1. The MACD line crosses under 0, and the long position is closed at market.

Test conditions

PeriodUp to 2026-10-11
InstrumentGold, Daily
Spread0.6 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
GoldBest runDaily1.82 24031.6730,559 EUR-13,080
Brent CrudeDaily1.76 8535.2920,653 EUR-11,315
EUR/USDDaily1.55 20236.638,780 USD-3,425
US Crude OilDaily1.47 19538.4627,078 EUR-12,470

Charts

Results by run

Above 1.0 made money, below 1.0 lost money.

The code

ProBuilder code, as tested

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

DEFPARAM CumulateOrders = false
ONCE capital = 10000

19 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
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 Upside Crossover 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 4 market and timeframe combinations. The best run was Gold, Daily, with a profit factor of 1.82 over 240 trades.

How large was the drawdown?

The best run had a maximum drawdown of 13,080 EUR at the tested position size, against a net result of 30,559 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

CCI Breakout

Best run on the same market, Gold.

1.08 PF · 6,065 trades

Rate Of Change Momentum Trailing

Also a momentum strategy.

1.83 PF · 200 trades

Put your name on the ProRealAlgos waitlist to trade a tested portfolio instead of single strategies.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

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