Buys when the MACD line crosses above its 9-period average and closes the long when it crosses back below. Only long positions are taken, with a fixed size of 1 contract.
Best run of 13. DAX 40, 1 hour, spread 3, from run sweeps:2026-10-12-DAX40-1h-opt.tsv:14.
| Period | Up to 2026-10-12 |
| Instrument | DAX 40, 1 hour |
| Spread | 3 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-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| DAX 40Best run | 1 hour | n/a | 4,577 | 38.19 | 7,682 EUR | -5,358 |
| USD/JPY | 4 hours | n/a | 1,476 | 40.58 | 599,600 USD | -225,090 |
| Silver | Daily | n/a | 535 | 37.38 | 33,397 USD | -25,481 |
| Nikkei 225 | Daily | n/a | 491 | 40.73 | 33,109 USD | -10,468 |
| Nikkei 225 | 4 hours | n/a | 1,088 | 40.17 | 18,572 USD | -9,799 |
| Dow Jones | Daily | n/a | 639 | 41.78 | 17,036 EUR | -6,351 |
| DAX 40 | Daily | n/a | 667 | 40.63 | 12,266 EUR | -4,263 |
| Nasdaq 100 | 4 hours | n/a | 1,368 | 39.91 | 9,569 EUR | -4,976 |
| DAX 40 | 4 hours | n/a | 1,336 | 40.49 | 6,293 EUR | -4,845 |
| Brent Crude | 4 hours | n/a | 734 | 42.64 | 5,151 EUR | -4,853 |
| Gold | 4 hours | n/a | 1,336 | 39.45 | 2,722 EUR | -802 |
| Gold | Daily | n/a | 573 | 39.27 | 2,294 EUR | -1,499 |
| S&P 500 | Daily | n/a | 683 | 38.21 | 2,013 EUR | -1,085 |
Charts
Top 10 of 13 runs. The full list is in the table above.
The code
// ============================================================== // MACD Signal Crossover Long // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long only // Timeframe tested: 1 hour // ============================================================== DEFPARAM CumulateOrders = false myMacd = ExponentialAverage[12](close) - ExponentialAverage[26](close) signal = Average[9](myMacd)
10 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 13 market and timeframe combinations. The best run by trade count was DAX 40, 1 hour, with 4,577 trades.
The best run had a maximum drawdown of 5,358 EUR at the tested position size, against a net result of 7,682 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.