The system buys when a stochastic-based close reversal agrees with three shifted averages of the median price in bullish order, and sells short on the bearish mirror. Open positions close when the states no longer agree.
Best run of 6. DAX 40, 30 min, spread 3, from run sweeps:2026-10-12-DAX40-30m-opt.tsv:44.
| Period | Up to 2026-10-12 |
| 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-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| DAX 40Best run | 30 min | n/a | 4,252 | 35.04 | 13,177 EUR | -6,463 |
| Nikkei 225 | Daily | n/a | 224 | 40.18 | 21,494 USD | -19,805 |
| Brent Crude | Daily | n/a | 102 | 38.24 | 15,060 EUR | -6,966 |
| Gold | 1 hour | n/a | 2,582 | 35.94 | 2,441 EUR | -734 |
| Gold | Daily | n/a | 273 | 40.29 | 2,324 EUR | -809 |
| Gold | 4 hours | n/a | 653 | 38.13 | 1,228 EUR | -973 |
Charts
The code
// ============================================================== // Reversal Pattern With Shifted Averages // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 30 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE myK = 50 ONCE nabar = -100 ONCE posrev = 0 ONCE posbw = 0 hh = highest[14](high) ll = lowest[14](low)
49 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 6 market and timeframe combinations. The best run by trade count was DAX 40, 30 minutes, with 4,252 trades.
The best run had a maximum drawdown of 6,463 EUR at the tested position size, against a net result of 13,177 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.