It goes long after two consecutive higher closes while stochastic %K is above 50 and below its 3-bar average, and shorts the mirror setup. Longs also need the relative volatility index above 70, and shorts need it below 30.
Best run of 12. DAX 40, 30 min, spread 3, from run sweeps:2026-10-11-DAX40-30m-opt.tsv:40.
| Period | Up to 2026-10-11 |
| 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-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| DAX 40Best run | 30 min | n/a | 1,833 | 38.52 | 7,914 EUR | -5,436 |
| USD/JPY | Daily | n/a | 106 | 45.28 | 2,365,530 USD | -659,900 |
| USD/JPY | 30 min | n/a | 1,664 | 38.46 | 466,600 USD | -227,180 |
| USD/JPY | 10 min | n/a | 1,736 | 39.80 | 412,310 USD | -165,270 |
| Nikkei 225 | Daily | n/a | 89 | 44.94 | 37,762 USD | -13,443 |
| Silver | 4 hours | n/a | 264 | 39.77 | 23,652 USD | -16,316 |
| Dow Jones | 15 min | n/a | 1,519 | 39.37 | 15,546 EUR | -9,134 |
| Brent Crude | Daily | n/a | 41 | 36.59 | 9,549 EUR | -5,893 |
| Nasdaq 100 | Daily | n/a | 94 | 42.55 | 8,292 EUR | -8,193 |
| Gold | Daily | n/a | 96 | 41.67 | 2,280 EUR | -1,346 |
| Gold | 1 hour | n/a | 1,080 | 39.35 | 2,258 EUR | -1,296 |
| Gold | 30 min | n/a | 1,642 | 40.19 | 1,776 EUR | -753 |
Charts
Top 10 of 12 runs. The full list is in the table above.
The code
// ============================================================== // Stochastic Reversal With Relative Volatility // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long & short // Timeframe tested: 30 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE posrev = 0 ONCE sincebad = 1000 ONCE postwo = 0 ONCE nu = 0 ONCE nd = 0 ll = lowest[14](low) hh = highest[14](high)
62 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 12 market and timeframe combinations. The best run by trade count was DAX 40, 30 minutes, with 1,833 trades.
The best run had a maximum drawdown of 5,436 EUR at the tested position size, against a net result of 7,914 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.