Buys when CCI(14) crosses back above -100 after a deep oversold run, while price is above its 200 period SMA or EMA. Sells short on the mirrored overbought setup when price is below both averages.
Best run of 11. S&P 500, 4 hours, spread 1, from run pf:2026-10-04-USA500-4h.tsv:4.
| Period | Up to 2026-10-04 |
| Instrument | S&P 500, 4 hours |
| 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-04 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| S&P 500Best run | 4 hours | 2.08 | 230 | 67.39 | 2,154 EUR | -298 |
| USD/JPY | 4 hours | n/a | 219 | 63.93 | 174,450 USD | -163,070 |
| Dow Jones | Daily | n/a | 73 | 73.97 | 11,615 EUR | -3,890 |
| Dow Jones | 4 hours | n/a | 66 | 63.64 | 10,234 EUR | -2,962 |
| DAX 40 | Daily | n/a | 93 | 68.82 | 9,183 EUR | -2,012 |
| GBP/USD | Daily | n/a | 79 | 68.35 | 8,666 USD | -1,973 |
| Nasdaq 100 | 4 hours | n/a | 212 | 66.51 | 6,196 EUR | -2,061 |
| DAX 40 | 4 hours | n/a | 199 | 62.81 | 5,471 EUR | -1,747 |
| Nasdaq 100 | Daily | n/a | 61 | 70.49 | 4,072 EUR | -2,292 |
| GBP/USD | 4 hours | n/a | 250 | 61.20 | 2,860 USD | -1,255 |
| S&P 500 | Daily | n/a | 81 | 76.54 | 1,674 EUR | -578 |
Charts
Top 10 of 11 runs. The full list is in the table above.
The code
// ============================================================== // CCI Extreme Reversal With Trend Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false myCci = CCI[14](TypicalPrice) sma = Average[200](close) ema = ExponentialAverage[200](close)
52 more lines: the entry and exit rules.
Setup
S&P 500 had no history beyond the standard run, so both runs used 28,000 bars.
| Bars available | 28,000 |
| Net, standard 200,000-bar run | 2,154.37 EUR |
| Net, long run | 2,147.69 EUR |
| Net on the older data alone | -6.68 EUR |
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 11 market and timeframe combinations. The best run was S&P 500, 4 hours, with a profit factor of 2.08 over 230 trades.
The best run had a maximum drawdown of 298 EUR at the tested position size, against a net result of 2,154 EUR.
It trades both long and short.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.