Buys when the 2 period SMA dips more than 0.01 below the 10 period SMA, measured as a ratio. Closes the trade when the close rises more than 0.01 above the entry, falls more than 0.03 below it, or after 30 bars.
Best run of 24. DAX 40, Daily, spread 3, from run sweeps:2026-10-04-DAX40-D-opt.tsv:25.
| Period | Up to 2026-10-04 |
| Instrument | DAX 40, Daily |
| 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 | Daily | n/a | 936 | 65.60 | 10,321 EUR | -3,022 |
| USD/JPY | 4 hours | n/a | 115 | 64.35 | 204,530 USD | -119,500 |
| Nikkei 225 | Daily | n/a | 844 | 69.19 | 47,231 USD | -16,735 |
| EUR/USD | 1 hour | n/a | 41 | 56.10 | 29,402 USD | -13,891 |
| Dow Jones | Daily | n/a | 734 | 73.43 | 23,255 EUR | -6,437 |
| Nikkei 225 | 1 hour | n/a | 462 | 67.97 | 13,606 USD | -9,337 |
| Nasdaq 100 | Daily | n/a | 824 | 64.68 | 8,687 EUR | -5,065 |
| Nasdaq 100 | 4 hours | n/a | 627 | 72.09 | 8,370 EUR | -3,978 |
| FTSE 100 | Daily | n/a | 582 | 73.54 | 7,027 EUR | -1,971 |
| Nasdaq 100 | 1 hour | n/a | 672 | 62.05 | 5,409 EUR | -3,604 |
| Nikkei 225 | 15 min | n/a | 144 | 61.81 | 5,288 USD | -4,313 |
| Dow Jones | 30 min | n/a | 123 | 64.23 | 4,156 EUR | -2,928 |
| FTSE 100 | 30 min | n/a | 161 | 67.70 | 2,473 EUR | -756 |
| FTSE 100 | 4 hours | n/a | 402 | 70.40 | 2,254 EUR | -2,152 |
| S&P 500 | Daily | n/a | 773 | 70.25 | 1,697 EUR | -947 |
| Dow Jones | 5 min | n/a | 7 | 85.71 | 1,612 EUR | -424 |
| Silver | 1 min | n/a | 22 | 68.18 | 1,466 USD | -1,212 |
| Dow Jones | 3 min | n/a | 4 | 75.00 | 1,295 EUR | -444 |
| Nikkei 225 | 2 min | n/a | 6 | 66.67 | 1,038 USD | -630 |
| S&P 500 | 1 hour | n/a | 442 | 64.48 | 968 EUR | -787 |
| Gold | 3 min | n/a | 26 | 73.08 | 313 EUR | -236 |
| GBP/USD | 15 min | n/a | 5 | 80.00 | 243 USD | -125 |
| FTSE 100 | 5 min | n/a | 4 | 100.00 | 212 EUR | -101 |
| GBP/USD | 10 min | n/a | 3 | 66.67 | 182 USD | -88.30 |
Charts
Top 10 of 24 runs. The full list is in the table above.
The code
// ============================================================== // SMA Dip Buy With Exit Limits // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long only // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE bought = 0 ONCE entrybar = 0 smafast = Average[2](close) smaslow = Average[10](close)
14 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 24 market and timeframe combinations. The best run by trade count was DAX 40, Daily, with 936 trades.
The best run had a maximum drawdown of 3,022 EUR at the tested position size, against a net result of 10,320 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.