Indicators
CCI (Commodity Channel Index) Explained
How the Commodity Channel Index measures price deviation from its average, how to read the ±100 levels, and how to automate CCI in Setup.Cash.
Featured image placeholder
/og/setup-cash-og.svg
The Commodity Channel Index (CCI) measures how far price has deviated from its statistical average. Despite the name, it works on any market — forex, crypto, and stocks.
How CCI Works
CCI compares the typical price to its moving average, scaled by mean deviation. The result oscillates around zero and is unbounded, though most action stays within ±100 to ±200:
- Above +100: price is unusually high (strong upward momentum or overbought).
- Below −100: price is unusually low (strong downward momentum or oversold).
- Crossing zero: a shift in momentum.
Two Ways to Trade CCI
1. Momentum/breakout. Treat a move above +100 as the start of strength (go long) and below −100 as weakness. This rides momentum rather than fading it.
2. Mean reversion. In ranges, fade extremes — buy when CCI turns up from below −100, sell when it turns down from above +100.
The right approach depends on the regime, which is why an ADX or trend filter pairs well with CCI.
Building It in Setup.Cash
Add the CCI indicator in the builder with its length (default 20), and condition on the ±100 cross or zero-line cross. Or describe it in text-to-strategy.
Tuning
- Length 20: standard.
- Shorter: more reactive, more signals.
- Longer: smoother, fewer signals.
- Wider thresholds (±150/±200): only extreme moves trigger.
Build a Custom CCI
In the Indicators Lab you can build a CCI-style deviation oscillator with sma and a deviation calculation, or generate one with AI.
CCI is a flexible momentum and deviation tool that can be used to ride strength or fade extremes. Decide which regime you are trading, confirm with a filter, and backtest before going live.
Related Posts
View allIndicators
RSI Indicator Explained: How to Use It in a Trading Bot
What the Relative Strength Index measures, how to read overbought and oversold levels, and how to wire RSI into an automated strategy in Setup.Cash.
2 min read · 342 words
Indicators
Stochastic Oscillator Explained for Trading Bots
How the Stochastic oscillator measures momentum relative to the recent range, how %K and %D crossovers work, and how to automate it in Setup.Cash.
2 min read · 278 words
Indicators
Stochastic RSI Explained: A Faster Momentum Oscillator
How Stochastic RSI applies the stochastic formula to RSI for earlier signals, when its speed helps or hurts, and how to use it in Setup.Cash.
2 min read · 303 words
Indicators
Williams %R Indicator Explained
How Williams %R measures overbought and oversold conditions on an inverted scale, and how to use it for momentum and reversals in Setup.Cash.
2 min read · 284 words
Start here
Build your trading bot workflow with structure
Use Setup.Cash to create, backtest, and paper trade rule-based strategies without relying on guesswork. Not financial advice. Trading involves risk.