Goes long on the bar after a bar closes in the top of its range (value above 70) following a recent low reading below 10. Closes a long on SMA(7) crossing under SMA(20), and a short on SMA(7) crossing over SMA(20).
Best run of 2. DAX 40, Daily, spread 3, from run sweeps:2026-10-11-DAX40-D-opt.tsv:108.
| Period | Up to 2026-10-11 |
| 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-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| DAX 40Best run | Daily | n/a | 1,730 | 45.55 | 7,535 EUR | -6,940 |
| Dow Jones | 4 hours | n/a | 1,549 | 45.84 | 25,012 EUR | -14,655 |
Charts
The code
// ============================================================== // Range Extreme Flip With SMA Exit // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE prevup = 0 ONCE prevdn = 0
47 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 2 market and timeframe combinations. The best run by trade count was DAX 40, Daily, with 1,730 trades.
The best run had a maximum drawdown of 6,940 EUR at the tested position size, against a net result of 7,535 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.