Buys when the MACD line crosses over its 9-period signal line after RSI(14) was at or below 30 within the last five prior bars. Closes the long on a MACD cross under the signal after RSI was at or above 70, with a 99% stop.
Best run of 37. DAX 40, 30 min, spread 3, from run sweeps:2026-10-04-DAX40-30m-opt.tsv:33.
| Period | Up to 2026-10-04 |
| Instrument | DAX 40, 30 minutes |
| 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-04 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| DAX 40Best run | 30 min | n/a | 520 | 65.38 | 7,897 EUR | -5,407 |
| USD/JPY | 4 hours | n/a | 93 | 70.97 | 350,500 USD | -313,510 |
| USD/JPY | 15 min | n/a | 456 | 66.45 | 264,060 USD | -227,470 |
| Nikkei 225 | 30 min | n/a | 507 | 64.10 | 35,864 USD | -10,358 |
| Nikkei 225 | 1 hour | n/a | 278 | 70.86 | 27,465 USD | -9,798 |
| Silver | 4 hours | n/a | 92 | 63.04 | 24,929 USD | -10,196 |
| Dow Jones | Daily | n/a | 32 | 78.12 | 24,392 EUR | -7,927 |
| Nikkei 225 | 4 hours | n/a | 70 | 72.86 | 23,859 USD | -9,991 |
| Dow Jones | 4 hours | n/a | 33 | 72.73 | 21,677 EUR | -8,850 |
| Nikkei 225 | 5 min | n/a | 508 | 66.14 | 19,999 USD | -7,865 |
| DAX 40 | 4 hours | n/a | 94 | 72.34 | 17,225 EUR | -4,247 |
| Nasdaq 100 | 1 hour | n/a | 359 | 70.19 | 17,029 EUR | -4,854 |
| Nasdaq 100 | 30 min | n/a | 507 | 67.65 | 15,591 EUR | -5,770 |
| Dow Jones | 30 min | n/a | 215 | 66.98 | 14,918 EUR | -9,058 |
| Nasdaq 100 | 4 hours | n/a | 101 | 78.22 | 13,540 EUR | -4,101 |
| Dow Jones | 15 min | n/a | 417 | 64.75 | 13,278 EUR | -7,873 |
| Nikkei 225 | 15 min | n/a | 505 | 60.59 | 13,068 USD | -12,758 |
| Dow Jones | 10 min | n/a | 497 | 62.37 | 10,880 EUR | -7,670 |
| DAX 40 | Daily | n/a | 36 | 77.78 | 10,141 EUR | -4,661 |
| Nasdaq 100 | 10 min | n/a | 497 | 61.57 | 9,359 EUR | -5,437 |
| Nasdaq 100 | 15 min | n/a | 518 | 62.36 | 9,159 EUR | -4,633 |
| US Crude Oil | Daily | n/a | 29 | 65.52 | 8,320 EUR | -7,501 |
| Brent Crude | 30 min | n/a | 323 | 66.87 | 6,811 EUR | -4,695 |
| Dow Jones | 1 min | n/a | 438 | 65.53 | 6,767 EUR | -3,379 |
| Nasdaq 100 | 3 min | n/a | 463 | 65.44 | 5,284 EUR | -4,260 |
| S&P 500 | 4 hours | n/a | 92 | 75.00 | 4,253 EUR | -1,200 |
| FTSE 100 | Daily | n/a | 22 | 81.82 | 3,449 EUR | -3,381 |
| S&P 500 | 1 hour | n/a | 353 | 70.25 | 2,351 EUR | -1,299 |
| FTSE 100 | 5 min | n/a | 487 | 64.48 | 2,213 EUR | -1,287 |
| S&P 500 | 30 min | n/a | 484 | 67.15 | 1,931 EUR | -1,261 |
| Gold | 1 hour | n/a | 314 | 61.15 | 1,866 EUR | -855 |
| S&P 500 | Daily | n/a | 34 | 79.41 | 1,843 EUR | -1,134 |
| FTSE 100 | 10 min | n/a | 475 | 62.74 | 1,780 EUR | -1,321 |
| S&P 500 | 10 min | n/a | 494 | 62.96 | 1,455 EUR | -971 |
| Gold | 4 hours | n/a | 92 | 70.65 | 955 EUR | -800 |
| S&P 500 | 2 min | n/a | 411 | 60.34 | 614 EUR | -452 |
| S&P 500 | 1 min | n/a | 378 | 62.96 | 550 EUR | -392 |
Charts
Top 10 of 37 runs. The full list is in the table above.
The code
// ============================================================== // MACD Crossover With RSI Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long only // Timeframe tested: 30 minutes // ============================================================== DEFPARAM CumulateOrders = false myMacd = ExponentialAverage[12](close) - ExponentialAverage[26](close) signal = ExponentialAverage[9](myMacd) myRsi = RSI[14](close) wasdown = 0 wasup = 0 FOR myI = 1 TO 5 DO
20 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 37 market and timeframe combinations. The best run by trade count was DAX 40, 30 minutes, with 520 trades.
The best run had a maximum drawdown of 5,407 EUR at the tested position size, against a net result of 7,897 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.