The system buys when a stochastic-based close reversal agrees with the 10-period average of the CCI sitting above its 20-period average, and sells short on the mirror condition. Open positions close when the states no longer agree.
Best run of 4. Gold, Daily, spread 0.6, from run sweeps:2026-10-12-GOLD-D-opt.tsv:102.
| Period | Up to 2026-10-12 |
| Instrument | Gold, Daily |
| 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 | Daily | n/a | 701 | 41.51 | 1,298 EUR | -839 |
| Nikkei 225 | Daily | n/a | 542 | 44.65 | 35,507 USD | -13,838 |
| Dow Jones | 4 hours | n/a | 565 | 44.78 | 9,221 EUR | -7,696 |
| Brent Crude | Daily | n/a | 271 | 45.39 | 8,739 EUR | -8,607 |
Charts
The code
// ============================================================== // Reversal Pattern With CCI Average Crossover // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE stoch = 50 ONCE posrev = 0 ONCE postwo = 0 hh = highest[14](high) ll = lowest[14](low)
42 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 4 market and timeframe combinations. The best run by trade count was Gold, Daily, with 701 trades.
The best run had a maximum drawdown of 838 EUR at the tested position size, against a net result of 1,298 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.