The system buys when a stochastic-based close reversal agrees with a double smoothed stochastic trigger line above 80 and above its main line, and sells short on the mirror condition below 20. Positions close when the states disagree.
Best run of 10. Gold, 30 min, spread 0.6, from run sweeps:2026-10-12-GOLD-30m-opt.tsv:9.
| Period | Up to 2026-10-12 |
| Instrument | Gold, 30 minutes |
| Spread | 0.6 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 |
|---|---|---|---|---|---|---|
| GoldBest run | 30 min | n/a | 4,007 | 38.31 | 1,776 EUR | -1,289 |
| USD/JPY | Daily | n/a | 254 | 42.13 | 1,288,390 USD | -533,800 |
| USD/JPY | 30 min | n/a | 3,994 | 42.06 | 388,220 USD | -309,000 |
| USD/JPY | 1 hour | n/a | 2,849 | 42.75 | 292,530 USD | -251,500 |
| Silver | 1 hour | n/a | 2,349 | 38.27 | 29,739 USD | -11,809 |
| Nikkei 225 | Daily | n/a | 213 | 38.97 | 23,266 USD | -14,976 |
| Brent Crude | Daily | n/a | 99 | 43.43 | 20,011 EUR | -5,088 |
| US Crude Oil | Daily | n/a | 205 | 45.85 | 19,117 EUR | -5,989 |
| GBP/USD | 1 hour | n/a | 3,558 | 41.60 | 9,163 USD | -2,696 |
| Gold | 1 hour | n/a | 2,477 | 39.69 | 2,056 EUR | -881 |
Charts
The code
// ============================================================== // Reversal Pattern With Smoothed Stochastic // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long & short // Timeframe tested: 30 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE posrev = 0 ONCE sincebad = 1000 ONCE postwo = 0 ONCE rawk = 50 ONCE stochb = 50 ll = lowest[14](low) hh = highest[14](high)
59 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 by trade count was Gold, 30 minutes, with 4,007 trades.
The best run had a maximum drawdown of 1,289 EUR at the tested position size, against a net result of 1,776 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.