Tool
Commodity Channel Index
market.cci
Inputs
No typed inputs.
Outputs
An oscillator line centered on zero. Readings above +100 flag an unusually strong move up; below -100 an unusually strong move down. The line is unbounded, so extremes can keep extending.
CCI (Commodity Channel Index) is a momentum oscillator that measures how far the current price has strayed from its recent average. Traders read high positive values as an unusually strong rally and large negative values as an unusually deep dip.
How it works
Over a rolling window (the period, default 14 bars) CCI compares the typical price to its moving average and scales the gap by the average deviation. The result swings around zero; +100 and -100 are the common reference zones, though the line is not capped and can run well beyond them.
Configuration
How many bars to average over when measuring the gap from the mean. Larger = smoother and slower to react; smaller = faster and noisier. 14 is the classic default.
Lambert's normalising constant. At the classic 0.015 roughly 70% of CCI values stay inside the -100..+100 band; smaller values stretch the scale.
Connects to
Examples
- Filter: only take long entries when CCI crosses back above -100 from below (a dip recovering).
- Use a CCI cross of the zero line as a simple momentum-direction gate.
Common mistakes
- Treating +100/-100 as hard buy/sell triggers — in a strong trend CCI can stay beyond them for many bars.
- Forgetting CCI is unbounded; a reading of +250 is not '2.5x more overbought' in any fixed sense.