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 need the positive volume index above its EMA(255), shorts need it below, and no trades occur until after 260 bars.
Best run of 7. USD/JPY, 10 min, spread 1, from run sweeps:2026-10-11-USDJPY-10m-opt.tsv:31.
| Period | Up to 2026-10-11 |
| Instrument | USD/JPY, 10 minutes |
| Spread | 1 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 |
|---|---|---|---|---|---|---|
| USD/JPYBest run | 10 min | n/a | 3,347 | 29.55 | 296,990 USD | -150,230 |
| USD/JPY | 30 min | n/a | 3,125 | 30.30 | 358,870 USD | -224,400 |
| Silver | 4 hours | n/a | 550 | 30.18 | 36,364 USD | -12,320 |
| Gold | Daily | n/a | 75 | 34.67 | 1,521 EUR | -1,507 |
| Gold | 4 hours | n/a | 500 | 30.00 | 1,518 EUR | -1,092 |
| Gold | 1 hour | n/a | 1,682 | 30.26 | 1,436 EUR | -1,326 |
| Gold | 5 min | n/a | 3,209 | 27.42 | 1,185 EUR | -1,045 |
Charts
The code
// ============================================================== // Stochastic Reversal With Positive Volume Index // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long & short // Timeframe tested: 10 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE posrev = 0 ONCE sincebad = 1000 ONCE nres = 0 ONCE postwo = 0 ll = lowest[14](low) hh = highest[14](high)
54 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 7 market and timeframe combinations. The best run by trade count was USD/JPY, 10 minutes, with 3,347 trades.
The best run had a maximum drawdown of 150,230 USD at the tested position size, against a net result of 296,990 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.