Join waitlist
Strategies / Mean reversion / CCI Extreme Reversal With Trend Filter

CCI Extreme Reversal With Trend Filter

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.

Mean reversionLong & shortSwingS&P 5004 hours
2.08Profit factor
2,154Net profit EUR
67.39%Win rate
230Trades
-298Max drawdown
9.37Avg trade

Best run of 11. S&P 500, 4 hours, spread 1, from run pf:2026-10-04-USA500-4h.tsv:4.

Entry rules, long

  1. The close is at or above the 200 period SMA or the 200 period EMA.
  2. The contiguous run of CCI values below -100 over the three bars before the cross reached -200 or below.

Entry rules, short

  1. The close is below both the 200 period SMA and the 200 period EMA.
  2. The contiguous run of CCI values above 100 over the three bars before the cross reached 200 or above.

Exit rules

  1. A short closes when CCI (14) rises from below -100 to above -100.
  2. Exit signals take priority, and no new entry is opened on that bar.

Test conditions

PeriodUp to 2026-10-04
InstrumentS&P 500, 4 hours
Spread1 points
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-10-04

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
S&P 500Best run4 hours2.08 23067.392,154 EUR-298
USD/JPY4 hoursn/a 21963.93174,450 USD-163,070
Dow JonesDailyn/a 7373.9711,615 EUR-3,890
Dow Jones4 hoursn/a 6663.6410,234 EUR-2,962
DAX 40Dailyn/a 9368.829,183 EUR-2,012
GBP/USDDailyn/a 7968.358,666 USD-1,973
Nasdaq 1004 hoursn/a 21266.516,196 EUR-2,061
DAX 404 hoursn/a 19962.815,471 EUR-1,747
Nasdaq 100Dailyn/a 6170.494,072 EUR-2,292
GBP/USD4 hoursn/a 25061.202,860 USD-1,255
S&P 500Dailyn/a 8176.541,674 EUR-578

Charts

Results by run

Top 10 of 11 runs. The full list is in the table above.

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// 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

How to load it

  1. Copy the code with the copy button on the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Indicators used

CCISMAEMA
Longer historyRe-run on up to 1,000,000 barsS&P 500 · 4 hours · older data -6.68 EUR

S&P 500 had no history beyond the standard run, so both runs used 28,000 bars.

S&P 500 · 4 hours

Bars available28,000
Net, standard 200,000-bar run2,154.37 EUR
Net, long run2,147.69 EUR
Net on the older data alone-6.68 EUR
Read this firstKnown weaknesses2 points
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run CCI Extreme Reversal With Trend Filter in ProOrder?

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.

Which markets was it tested on?

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.

How large was the drawdown?

The best run had a maximum drawdown of 298 EUR at the tested position size, against a net result of 2,154 EUR.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

CCI Sign With EMA Alignment

Best run on the same market, S&P 500.

1.23 PF · 1,253 trades

Slow RSI Recovery With Trend Filter

Also a mean reversion strategy.

2.08 PF · 199 trades

Put your name on the ProRealAlgos waitlist to trade a tested portfolio instead of single strategies.

Copy trading on US indices is available to ProRealAlgos members as spots open.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs