Join waitlist
Strategies / Momentum / MACD Histogram Signal Crossover (long only) 3

MACD Histogram Signal Crossover (long only) 3

Buys when the MACD histogram crosses above its own 9 period EMA and closes when it crosses back below. This long only strategy has no stop or target.

MomentumLong onlySwingGold4 hours
1.26Profit factor
3,075Net profit EUR
42.04%Win rate
1,753Trades
-657Max drawdown
1.75Avg trade

Best run of 12. Gold, 4 hours, spread 0.6, from run pf:2026-10-13-GOLD-4h.tsv:3.

Entry rules, long

  1. The MACD histogram is the MACD line, 12 and 26 periods, minus its 9 period EMA signal.

Exit rules

  1. The MACD histogram crosses under its own 9 period EMA and the long is closed.

Test conditions

PeriodUp to 2026-10-13
InstrumentGold, 4 hours
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-13

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest run4 hours1.26 1,75342.043,075 EUR-657
Dow JonesDailyn/a 83442.5728,243 EUR-7,278
Silver4 hoursn/a 1,76339.4225,425 USD-14,635
Nikkei 2254 hoursn/a 1,46840.8013,727 USD-12,548
Dow Jones4 hoursn/a 58943.4612,340 EUR-10,025
DAX 40Dailyn/a 86941.8910,942 EUR-3,217
DAX 404 hoursn/a 1,73442.1610,424 EUR-5,102
Nasdaq 1004 hoursn/a 1,84341.358,367 EUR-4,835
Nasdaq 100Dailyn/a 68540.736,442 EUR-4,535
Brent Crude4 hoursn/a 1,01141.256,065 EUR-4,375
S&P 500Dailyn/a 88441.062,484 EUR-1,180
GoldDailyn/a 80339.731,777 EUR-1,519

Charts

Results by run

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

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// MACD Histogram Signal Crossover (long only) 3
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Long only
// Timeframe tested: 4 hours
// ==============================================================

DEFPARAM CumulateOrders = false

myMacd = ExponentialAverage[12](close) - ExponentialAverage[26](close)
signal = ExponentialAverage[9](myMacd)
macdas = myMacd - signal
signalas = ExponentialAverage[9](macdas)

9 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

MACDEMA
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 Histogram Signal Crossover (long only) 3 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 12 market and timeframe combinations. The best run was Gold, 4 hours, with a profit factor of 1.26 over 1,753 trades.

How large was the drawdown?

The best run had a maximum drawdown of 657 EUR at the tested position size, against a net result of 3,075 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

EMA Swing Limit Entry

Also a momentum strategy.

1.26 PF · 253 trades

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

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