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 percent change state at +1, set by moves beyond 0.33 percent, and shorts need -1.
Best run of 9. DAX 40, 30 min, spread 3, from run sweeps:2026-10-11-DAX40-30m-opt.tsv:42.
| 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 | 4,139 | 38.17 | 7,058 EUR | -6,255 |
| USD/JPY | Daily | n/a | 1,776 | 36.54 | 1,447,820 USD | -695,380 |
| USD/JPY | 15 min | n/a | 1,291 | 38.57 | 464,550 USD | -170,260 |
| USD/JPY | 30 min | n/a | 1,485 | 37.58 | 377,890 USD | -280,980 |
| USD/JPY | 10 min | n/a | 1,261 | 37.03 | 309,650 USD | -161,680 |
| EUR/USD | 2 min | n/a | 1,225 | 34.86 | 150,569 USD | -101,942 |
| Dow Jones | 15 min | n/a | 1,913 | 39.73 | 14,590 EUR | -12,340 |
| Gold | 30 min | n/a | 3,202 | 40.85 | 2,763 EUR | -889 |
| Gold | 10 min | n/a | 1,665 | 37.24 | 1,553 EUR | -939 |
Charts
The code
// ============================================================== // Stochastic Reversal With Percent Change Filter // 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 ll = lowest[14](low) hh = highest[14](high)
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 9 market and timeframe combinations. The best run by trade count was DAX 40, 30 minutes, with 4,139 trades.
The best run had a maximum drawdown of 6,255 EUR at the tested position size, against a net result of 7,058 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.