Skip to content

CCI (Commodity Channel Index)

What it shows: how far the typical price (average of high, low and close) is from its recent average, scaled so that most values fall between -100 and +100.

How people use it: below -100 is read as oversold, above +100 as overbought. Some traders use the opposite: a move above +100 as the start of a strong trend.

Pairs well with: a moving average for the trend, and ATR to size stops, since CCI says nothing about how big the moves are.

Settings

Setting Default What it does
Length 20 How many candles are averaged. Shorter goes past ±100 more often.
Oversold -100 The "low" line. Lower (like -200) gives fewer, more extreme signals.
Overbought 100 The "high" line.

You set the defaults on the Indicators page. A condition can use its own settings, which override the defaults for that condition only.

Ready-made conditions

For Condition Fires when
Buy CCI below -100 every candle CCI is below -100
Buy CCI crosses above -100 the one candle CCI moves from below -100 to above it
Sell CCI above 100 every candle CCI is above 100
Sell CCI crosses below 100 the one candle CCI moves from above 100 to below it

"Above", "below", "is" and "rising" / "falling" stay true on every candle the state lasts, so they can fire many candles in a row. "Crosses" and "flips" fire once, on the candle it happens, so you get one signal per move. Numbers in the condition names follow your settings on the Indicators page.

Warnings you may see

  • "It can never be true: a cross happens on one candle, so it cannot happen on N candles in a row. Use 'within the last N candles' instead.": a "crosses" condition with a "… in a row" lookback of 2 or more. Switch the lookback to Within the last.
  • "Length must be between 1 and 1000" / "Length must be a whole number": shown in the condition editor when a condition's own value is out of range. Fix the number; the condition can't be saved until then.

Where they show: on the Strategies page, open Create entry conditions / Edit entry conditions (or the exit ones). Each condition's messages appear right under it. The setting messages ("must be between", "whole number", "must be one of", "must be smaller than") start with the indicator's short name, for example "MACD: Fast must be between 1 and 1000", and keep the conditions from being saved until fixed. The other warnings never block saving and are repeated in the strategy's Entry or Exit section, starting with the condition's name.

Good to know

  • It is worked out from each candle's high, low and close (not volume).
  • CCI has no upper or lower limit; in strong moves it can go far past ±100.
  • It needs some history before its value settles: the length in candles (20 at length 20). Apathia loads that history for you.