Join today
Strategies / Momentum / CCI Breakout

CCI Breakout: Trading CCI(20) Crosses of Plus and Minus 100

The strategy goes long when CCI(20) on typical price crosses above 100 and short when it crosses below -100. It exits when CCI returns through 0, with a 1% stop loss as protection. Only one position is open at a time and there is no profit target.

MomentumLong & shortSwingGold1 hour
1.08Profit factor
2,101Net profit EUR
32.04%Win rate
6,065Trades
-861Max drawdown
0.35Avg trade

Best run of 16. Gold, 1 hour, spread 0.6, from run pf:2026-09-15-GOLD-1h.tsv:1.

Entry rules, long

  1. Members only
  2. No position is open

Entry rules, short

  1. Members only
  2. No position is open

Exit rules

  1. Stop loss at 1% from entry
  2. Members only
  3. Close a short when CCI rises above 0

Test conditions

PeriodUp to 2026-09-15
InstrumentGold, 1 hour
Spread0.6 points
Contracts1
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-09-15

Parameters

positionSize
Contracts per trade
1
cciPeriod
CCI length
20
cciLongLevel
Long when CCI crosses above this
100
cciShortLevel
Short when CCI crosses below this
-100
cciExitLevel
Close when CCI falls back through this
0
stopLossPct
Protective stop, percent of entry price
1

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest run1 hour1.08 6,06532.042,101 EUR-861
DAX 401 hourn/a 5,83232.36578 EUR-8,240
Gold30 minn/a 10,30830.24-1,030 EUR-4,667
Gold5 minn/a 10,21428.83-3,305 EUR-3,725
Gold15 minn/a 10,12627.92-3,985 EUR-5,465
S&P 5001 hourn/a 6,57330.17-8,105 EUR-8,479
S&P 50030 minn/a 10,57829.18-8,925 EUR-10,914
S&P 5005 minn/a 10,27627.13-9,427 EUR-9,447
S&P 50015 minn/a 10,10528.82-9,875 EUR-9,932
DAX 4030 minn/a 10,08029.97-15,728 EUR-19,144
Nasdaq 1001 hourn/a 6,58529.69-16,221 EUR-16,309
Nasdaq 10015 minn/a 9,95530.72-18,904 EUR-19,692
Nasdaq 10030 minn/a 10,47828.55-19,390 EUR-23,058
Nasdaq 1005 minn/a 10,24829.01-27,220 EUR-27,275
DAX 4015 minn/a 10,05729.70-28,696 EUR-28,765
DAX 405 minn/a 10,30828.36-30,572 EUR-30,769

Charts

Results by run

Net profit against max drawdown

Net profitMax drawdown
0-50K-25K1K3KGold · 1 hourDAX 40 · 1 hourGold · 30 minGold · 5 minGold · 15 minS&P 500 · 1 hourS&P 500 · 30 minS&P 500 · 5 minS&P 500 · 15 minDAX 40 · 30 minNasdaq 100 · 1 hourNasdaq 100 · 15 minNasdaq 100 · 30 minNasdaq 100 · 5 minDAX 40 · 15 minDAX 40 · 5 min

The code

ProBuilder, rewritten to house standard

Every file in the library uses the same header, the same section order and the same variable names. The numbers above were produced by the original version before the rewrite, and the rewrite has not yet been compiled in ProRealTime.

// ============================================================
// CCI Breakout
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Long & short
// Timeframe tested: 1 hour
// ============================================================

// --- Settings ---
DEFPARAM CumulateOrders = false

// --- Parameters ---
positionSize = 1          // contracts per trade
cciPeriod = 20            // CCI length
cciLongLevel = 100        // long when CCI crosses above this
cciShortLevel = -100      // short when CCI crosses below this
cciExitLevel = 0          // close when CCI falls back through this
stopLossPct = 1           // protective stop, percent of entry price

// --- Indicators ---
cciValue = CCI[cciPeriod](TypicalPrice)

25 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • Only the best run, Gold 1 hour, shows a real edge, with a thin profit factor of 1.08 and an average trade of EUR 0.35. Most other rows in the table lost money.
  • On DAX 40 the losses were large, for example EUR -30,572.2 on 5 minutes with a EUR 30,768.9 drawdown.
  • The win rate is only 32.04% on the best run, so profits rely on a minority of trades that ride the CCI move.
  • With 0.6 points of spread and a small average trade, higher real costs could erase the Gold result.

Indicators used

CCI

How to load it

  1. Copy the code with the copy button above 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.

Questions

About this strategy

Can this CCI strategy run in ProOrder?

Yes, the rules are simple and use a percent stop that ProOrder supports. Given how many markets lost money, test it on demo before risking capital.

Which markets were tested and how did they do?

It was tested on Gold, DAX 40, S&P 500 and Nasdaq 100. Gold 1 hour made EUR 2,100.5 and DAX 40 1 hour made EUR 578.4, while Gold 30 minutes lost EUR -1,030.1 and the DAX 40 15 minute run lost EUR -28,696.3.

What drawdown came with 1 contract?

The best run on Gold had a max drawdown of EUR 861.22 with 1 contract. The DAX 40 1 hour run needed to sit through EUR 8,239.8 of drawdown to end up EUR 578.4 ahead.

Why does the 1 hour chart work better than faster ones here?

On shorter charts the CCI crosses 100 far more often, and the extra trades mostly added costs. The Gold 5 minute run lost EUR -3,305.1 on 10,214 trades.

Related

Strategies like this one

SuperTrend CCI

Uses the same indicator.

1.72 PF · 561 trades

Triple Band Market Model

Best run on the same market, Gold.

2.27 PF · 203 trades

Previous Day Breakout

A similar profit factor.

1.08 PF · 3,742 trades

Compare notes on indicator strategies that hold up and those that fail. Join the ProRealAlgos waitlist.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

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