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 20-period RSI of the 20-bar rate of change above 70, and shorts need it below 30.
Best run of 10. USD/JPY, 10 min, spread 1, from run pf:2026-10-12-USDJPY-10m.tsv:4.
| Period | Up to 2026-10-12 |
| 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-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | 10 min | 1.20 | 1,434 | 39.68 | 547,430 USD | -99,540 |
| USD/JPY | Daily | n/a | 93 | 40.86 | 1,744,710 USD | -448,700 |
| USD/JPY | 30 min | n/a | 1,435 | 38.82 | 441,170 USD | -249,630 |
| Silver | 4 hours | n/a | 235 | 41.70 | 42,052 USD | -14,357 |
| Nikkei 225 | Daily | n/a | 82 | 42.68 | 39,123 USD | -26,869 |
| DAX 40 | 30 min | n/a | 1,524 | 39.90 | 12,018 EUR | -5,359 |
| US Crude Oil | 1 hour | n/a | 699 | 40.77 | 6,457 EUR | -5,538 |
| S&P 500 | Daily | n/a | 104 | 45.19 | 3,685 EUR | -1,273 |
| Gold | 30 min | n/a | 1,412 | 40.08 | 1,939 EUR | -637 |
| Gold | 5 min | n/a | 1,456 | 36.47 | 1,496 EUR | -803 |
Charts
The code
// ============================================================== // Stochastic Reversal With RSI Momentum // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long & short // Timeframe tested: 10 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE posrev = 0 ONCE sincebad = 1000 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 10 market and timeframe combinations. The best run was USD/JPY, 10 minutes, with a profit factor of 1.20 over 1,434 trades.
The best run had a maximum drawdown of 99,540 USD at the tested position size, against a net result of 547,430 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.