It goes long after two consecutive higher closes while %K(14) is above 50 and below its 3-bar average, and shorts the mirror setup. Longs also need close above the 5-bar average plus 1.33 times the 15-bar ATR, shorts need close below the lower band.
Best run of 12. DAX 40, 30 min, spread 3, from run sweeps:2026-10-11-DAX40-30m-opt.tsv:33.
| 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 | 3,500 | 36.14 | 9,210 EUR | -4,929 |
| USD/JPY | Daily | n/a | 230 | 40.00 | 1,691,780 USD | -515,270 |
| USD/JPY | 30 min | n/a | 2,915 | 38.01 | 632,900 USD | -183,050 |
| USD/JPY | 1 hour | n/a | 2,042 | 39.03 | 536,650 USD | -215,850 |
| EUR/USD | 4 hours | n/a | 722 | 38.23 | 43,329 USD | -31,562 |
| Silver | 4 hours | n/a | 493 | 41.58 | 42,329 USD | -11,810 |
| Nikkei 225 | Daily | n/a | 202 | 42.57 | 28,394 USD | -22,190 |
| Brent Crude | Daily | n/a | 90 | 36.67 | 10,684 EUR | -5,924 |
| US Crude Oil | 1 hour | n/a | 1,555 | 38.71 | 5,621 EUR | -4,190 |
| Gold | Daily | n/a | 226 | 37.61 | 2,086 EUR | -896 |
| Gold | 30 min | n/a | 3,011 | 35.77 | 1,837 EUR | -801 |
| Gold | 4 hours | n/a | 508 | 41.34 | 1,545 EUR | -994 |
Charts
Top 10 of 12 runs. The full list is in the table above.
The code
// ============================================================== // Stochastic Reversal With Volatility Bands // ProRealAlgos Strategy Library | prorealalgos.com // Type: Volatility // Direction: Long & short // Timeframe tested: 30 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE posrev = 0 ONCE sincebad = 1000 ONCE postwo = 0 ll = lowest[14](low) hh = highest[14](high)
52 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 3,500 trades.
The best run had a maximum drawdown of 4,929 EUR at the tested position size, against a net result of 9,210 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.