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 smoothed RSI above 0.8, and shorts need it below 0.2.
Best run of 6. USD/JPY, Daily, spread 1, from run pf:2026-10-12-USDJPY-D.tsv:16.
| Period | Up to 2026-10-12 |
| Instrument | USD/JPY, Daily |
| 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 | Daily | 1.68 | 316 | 42.41 | 2,759,200 USD | -522,250 |
| USD/JPY | 1 hour | n/a | 3,647 | 37.81 | 419,610 USD | -279,120 |
| Nikkei 225 | Daily | n/a | 274 | 38.69 | 29,291 USD | -17,598 |
| Brent Crude | Daily | n/a | 133 | 36.84 | 11,933 EUR | -9,092 |
| Gold | Daily | n/a | 342 | 38.89 | 2,026 EUR | -809 |
| Gold | 1 hour | n/a | 3,258 | 35.97 | 1,448 EUR | -831 |
Charts
The code
// ============================================================== // Stochastic Reversal With Smoothed RSI // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE posrev = 0 ONCE sincebad = 1000 ONCE postwo = 0 ll = lowest[14](low) hh = highest[14](high)
58 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 6 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.68 over 316 trades.
The best run had a maximum drawdown of 522,250 USD at the tested position size, against a net result of 2,759,200 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.