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 7-bar stochastic %K above 20, and shorts need it at or below 20.
Best run of 3. Silver, 4 hours, spread 2, from run sweeps:2026-10-11-SILVER-4h-opt.tsv:36.
| Period | Up to 2026-10-11 |
| Instrument | Silver, 4 hours |
| Spread | 2 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 |
|---|---|---|---|---|---|---|
| SilverBest run | 4 hours | n/a | 2,599 | 30.09 | 21,086 USD | -18,705 |
| USD/JPY | Daily | n/a | 1,183 | 33.98 | 1,510,400 USD | -648,090 |
| DAX 40 | 4 hours | n/a | 2,441 | 33.27 | 8,332 EUR | -4,859 |
Charts
The code
// ============================================================== // Stochastic Reversal With Fast Stochastic // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false ONCE posrev = 0 ONCE sincebad = 1000 ONCE postwo = 0 ll = lowest[14](low) hh = highest[14](high)
52 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 3 market and timeframe combinations. The best run by trade count was Silver, 4 hours, with 2,599 trades.
The best run had a maximum drawdown of 18,705 USD at the tested position size, against a net result of 21,086 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.