momentum indicator
CCI backtesting — Commodity Channel Index
The Commodity Channel Index (CCI) measures how far the typical price has strayed from its recent average, scaled by average deviation, so extreme readings can in theory extend well beyond a fixed range. Despite the commodities-era name it is used across markets, including crypto, as an overbought/oversold and trend-strength tool.
How CCI works
CCI starts from the typical price (the average of each candle’s high, low, and close), then measures how far the current typical price sits from its moving average, divided by a constant fraction of the mean absolute deviation over the same window. That scaling is why CCI is not bounded to a fixed range the way RSI or Stochastic are — it can swing well past 100 or -100 in a strong move. CandleTest computes CCI with TradingView-parity math. Traders read crosses above 100 or below -100 as strength signals, and crosses back through zero as trend-direction changes — both testable as no-code rules.
CCI settings
The lookback window for both the moving average and the deviation calculation. Shorter lengths make CCI swing further and more often; longer lengths produce a smoother, less extreme line.
Example CCI strategies to backtest
Enter long when CCI crosses above 100 (signaling unusually strong upward deviation). Exit when CCI crosses back below 100.
Enter long when CCI crosses above 0 and exit when it crosses back below 0 — a broader directional rule than the ±100 extreme levels.
Enter long when CCI crosses above -100 (leaving oversold territory). Exit when CCI crosses back below -100 (falling back into oversold), treating the failed bounce as the invalidation signal.
Every rule above is buildable in the no-code strategy builder — pick conditions, press run, and get win rate, drawdown and equity curve on real exchange data with fees and leverage modeled.
CCI FAQ
What do CCI readings above 100 or below -100 mean?
They indicate price has moved unusually far from its recent average relative to typical deviation — originally read as overbought/oversold, but in strong trends CCI can stay beyond those levels for extended stretches rather than reverting. Backtesting shows which behavior dominates on your market.
Is CCI a bounded indicator like RSI?
No — CCI has no fixed ceiling or floor, since it scales price deviation by a statistical measure rather than compressing it into a 0–100 range. That means ±100 are conventional reference levels, not hard limits, and treating them as guaranteed reversal points without testing can be misleading.
What CCI length works best for crypto?
There is no single best length — it trades off responsiveness against noise like any lookback-based indicator, and the right balance depends on the pair and timeframe. Sweep a few lengths in a backtest before settling on one.
Can I use CCI with other indicators?
Yes — the strategy builder supports combining conditions, for example only taking a CCI zero-line cross long when price is above a moving average, to filter momentum signals by broader trend direction.