Buys when MACD is above its signal line, smoothed stochastic %K is above 50 and RSI(14) is above 50. Closes on a MACD cross under the signal line or if the close falls 35% below the entry price.
Best run of 17. DAX 40, 4 hours, spread 3, from run pf:2026-10-13-DAX40-4h.tsv:3.
| Period | Up to 2026-10-13 |
| 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-13 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| DAX 40Best run | 4 hours | 1.24 | 1,059 | 41.45 | 14,113 EUR | -2,824 |
| USD/JPY | Daily | n/a | 448 | 36.38 | 712,300 USD | -534,150 |
| USD/JPY | 1 hour | n/a | 4,520 | 37.70 | 593,590 USD | -189,940 |
| USD/JPY | 4 hours | n/a | 1,154 | 41.25 | 465,950 USD | -238,900 |
| Silver | Daily | n/a | 406 | 35.22 | 31,480 USD | -21,316 |
| Nikkei 225 | 4 hours | n/a | 874 | 39.24 | 31,215 USD | -9,875 |
| Nikkei 225 | Daily | n/a | 407 | 41.52 | 26,363 USD | -10,262 |
| Silver | 4 hours | n/a | 1,030 | 36.12 | 20,465 USD | -13,812 |
| Dow Jones | Daily | n/a | 545 | 43.85 | 13,862 EUR | -6,990 |
| DAX 40 | Daily | n/a | 575 | 41.91 | 10,097 EUR | -3,683 |
| Nasdaq 100 | 4 hours | n/a | 1,137 | 38.96 | 8,586 EUR | -5,079 |
| DAX 40 | 1 hour | n/a | 3,714 | 38.88 | 6,954 EUR | -3,547 |
| Nasdaq 100 | Daily | n/a | 438 | 40.18 | 6,052 EUR | -5,285 |
| Gold | 4 hours | n/a | 1,048 | 41.03 | 2,680 EUR | -794 |
| Gold | Daily | n/a | 468 | 39.74 | 2,216 EUR | -1,170 |
| Gold | 1 hour | n/a | 3,953 | 35.34 | 1,265 EUR | -934 |
| S&P 500 | Daily | n/a | 574 | 39.90 | 1,227 EUR | -827 |
Charts
Top 10 of 17 runs. The full list is in the table above.
The code
// ============================================================== // MACD Stochastic RSI Long Exit // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long only // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false ONCE rawk = 50 myMacd = ExponentialAverage[12](close) - ExponentialAverage[26](close) sig = ExponentialAverage[9](myMacd) hh = highest[14](high) ll = lowest[14](low)
17 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 17 market and timeframe combinations. The best run was DAX 40, 4 hours, with a profit factor of 1.24 over 1,059 trades.
The best run had a maximum drawdown of 2,824 EUR at the tested position size, against a net result of 14,113 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.