Buys when RSI(14) crosses above 50 while MACD(12,26,9) is above its signal line, or when MACD crosses above its signal with RSI at or above 50. Exits when RSI falls back below 50 or MACD crosses below its signal with a non-positive histogram.
Best run of 20. DAX 40, 4 hours, spread 3, from run pf:2026-10-12-DAX40-4h.tsv:2.
| Period | Up to 2026-10-12 |
| Instrument | DAX 40, 4 hours |
| 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 | 4 hours | 1.22 | 1,402 | 32.67 | 13,117 EUR | -2,222 |
| USD/JPY | Daily | n/a | 653 | 26.80 | 549,510 USD | -480,250 |
| EUR/USD | 3 min | n/a | 10,184 | 18.99 | 291,267 USD | -99,343 |
| EUR/USD | 2 min | n/a | 10,263 | 17.30 | 230,115 USD | -121,455 |
| EUR/USD | 5 min | n/a | 10,050 | 19.47 | 186,867 USD | -66,999 |
| Nikkei 225 | Daily | n/a | 550 | 32.91 | 33,377 USD | -9,507 |
| Silver | Daily | n/a | 609 | 24.14 | 23,005 USD | -8,018 |
| Dow Jones | Daily | n/a | 688 | 35.76 | 18,813 EUR | -5,486 |
| Nikkei 225 | 4 hours | n/a | 1,202 | 30.37 | 14,692 USD | -10,766 |
| DAX 40 | Daily | n/a | 719 | 34.35 | 10,426 EUR | -2,720 |
| Nasdaq 100 | 4 hours | n/a | 1,435 | 32.06 | 8,401 EUR | -3,510 |
| GBP/USD | Daily | n/a | 663 | 29.41 | 8,127 USD | -4,361 |
| Brent Crude | Daily | n/a | 272 | 30.15 | 7,312 EUR | -3,643 |
| Nasdaq 100 | Daily | n/a | 548 | 32.66 | 6,248 EUR | -5,126 |
| US Crude Oil | Daily | n/a | 560 | 28.21 | 5,811 EUR | -5,617 |
| Brent Crude | 4 hours | n/a | 827 | 30.83 | 3,805 EUR | -3,187 |
| US Crude Oil | 4 hours | n/a | 1,054 | 31.40 | 3,708 EUR | -3,077 |
| Gold | Daily | n/a | 678 | 28.47 | 2,063 EUR | -674 |
| Gold | 4 hours | n/a | 1,425 | 30.53 | 1,817 EUR | -1,251 |
| S&P 500 | Daily | n/a | 713 | 31.84 | 1,524 EUR | -869 |
Charts
Top 10 of 20 runs. The full list is in the table above.
The code
// ============================================================== // RSI MACD Midline Cross Long // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long only // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false ONCE inlong = 0 myRsi = RSI[14](close) myMacd = MACDline[12,26,9](close) signal = ExponentialAverage[9](myMacd) hist = myMacd - signal
22 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 20 market and timeframe combinations. The best run was DAX 40, 4 hours, with a profit factor of 1.22 over 1,402 trades.
The best run had a maximum drawdown of 2,222 EUR at the tested position size, against a net result of 13,117 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.