The system buys when a 20-period stochastic-based close reversal agrees with price closing more than 1% above a 14-period linear regression line, and sells short on the mirror condition. Positions close when the states no longer agree.
Best run of 7. Gold, 10 min, spread 0.6, from run sweeps:2026-10-12-GOLD-10m-opt.tsv:23.
| Period | Up to 2026-10-12 |
| Instrument | Gold, 10 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 | 10 min | n/a | 998 | 36.87 | 1,448 EUR | -632 |
| Silver | 4 hours | n/a | 772 | 38.47 | 38,530 USD | -14,927 |
| Brent Crude | Daily | n/a | 267 | 37.83 | 12,623 EUR | -9,957 |
| Dow Jones | 5 min | n/a | 939 | 36.53 | 7,137 EUR | -5,254 |
| Dow Jones | 3 min | n/a | 958 | 38.00 | 4,221 EUR | -3,593 |
| Gold | Daily | n/a | 442 | 37.33 | 1,574 EUR | -1,052 |
| Gold | 1 hour | n/a | 832 | 39.54 | 1,353 EUR | -953 |
Charts
The code
// ============================================================== // Reversal Pattern With Linear Regression Band // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 10 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE posrev = 0 ONCE sincebad = 1000 ONCE poscog = 0 ll = lowest[20](low) hh = highest[20](high)
51 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 7 market and timeframe combinations. The best run by trade count was Gold, 10 minutes, with 998 trades.
The best run had a maximum drawdown of 632 EUR at the tested position size, against a net result of 1,448 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.