The strategy buys when 10 bar price momentum minus a 12 and 26 period MACD line crosses above zero. It closes the long when that difference crosses below zero.
Best run of 8. Gold, 4 hours, spread 0.6, from run sweeps:2026-10-11-GOLD-4h-opt.tsv:14.
| Period | Up to 2026-10-11 |
| Instrument | Gold, 4 hours |
| Spread | 0.6 points |
| Starting capital | 1,000,000 |
| Costs | Spread only. Commissions and overnight financing are not included. |
| Bars | Up to 200,000 bars, fewer where the instrument has less history |
| Last tested | 2026-10-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GoldBest run | 4 hours | n/a | 2,534 | 34.96 | 1,286 EUR | -1,235 |
| USD/JPY | Daily | n/a | 1,121 | 37.82 | 916,380 USD | -457,050 |
| Silver | Daily | n/a | 980 | 34.18 | 41,244 USD | -18,538 |
| Nikkei 225 | Daily | n/a | 951 | 38.91 | 35,702 USD | -12,565 |
| Dow Jones | Daily | n/a | 1,168 | 41.52 | 17,238 EUR | -6,362 |
| DAX 40 | 4 hours | n/a | 2,500 | 38.56 | 6,768 EUR | -4,251 |
| Brent Crude | 4 hours | n/a | 1,415 | 38.23 | 6,555 EUR | -4,861 |
| Gold | Daily | n/a | 1,099 | 35.94 | 2,910 EUR | -1,084 |
Charts
The code
// ============================================================== // Momentum Minus MACD Zero Cross // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long only // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false mom = close - close[10] myMacd = ExponentialAverage[12](close) - ExponentialAverage[26](close) delta = mom - myMacd
9 more lines: the entry and exit rules.
Setup
Questions
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.
It was tested on 8 market and timeframe combinations. The best run by trade count was Gold, 4 hours, with 2,534 trades.
The best run had a maximum drawdown of 1,234 EUR at the tested position size, against a net result of 1,286 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.