The strategy buys at market when the stochastic reversal state is bullish and a weighted sum of four smoothed rate of change readings is positive, and sells short when both are bearish with that sum negative. Positions close when the two states disagree.
Best run of 13. USD/JPY, Daily, spread 1, from run pf:2026-10-12-USDJPY-D.tsv:33.
| 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.87 | 299 | 41.47 | 3,039,770 USD | -497,700 |
| USD/JPY | 1 hour | n/a | 3,237 | 37.13 | 625,610 USD | -303,370 |
| USD/JPY | 30 min | n/a | 4,564 | 35.56 | 535,400 USD | -203,970 |
| USD/JPY | 10 min | n/a | 4,709 | 34.53 | 226,120 USD | -174,860 |
| Brent Crude | Daily | n/a | 114 | 37.72 | 13,884 EUR | -8,523 |
| US Crude Oil | Daily | n/a | 255 | 38.43 | 11,840 EUR | -9,683 |
| DAX 40 | 30 min | n/a | 4,670 | 35.29 | 10,885 EUR | -5,773 |
| US Crude Oil | 1 hour | n/a | 2,057 | 36.51 | 6,729 EUR | -4,652 |
| Gold | 1 hour | n/a | 2,799 | 34.41 | 2,490 EUR | -793 |
| Gold | 4 hours | n/a | 709 | 36.39 | 2,126 EUR | -846 |
| Gold | Daily | n/a | 315 | 39.37 | 1,814 EUR | -971 |
| S&P 500 | Daily | n/a | 332 | 35.84 | 1,721 EUR | -1,583 |
| Gold | 30 min | n/a | 4,650 | 33.18 | 1,529 EUR | -1,265 |
Charts
Top 10 of 13 runs. The full list is in the table above.
The code
// ============================================================== // Stochastic Reversal With KST Momentum // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE posrev = 0 ONCE postwo = 0 ONCE sincebad = 1000 ll = lowest[14](low) hh = highest[14](high)
61 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 13 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.87 over 299 trades.
The best run had a maximum drawdown of 497,700 USD at the tested position size, against a net result of 3,039,770 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.