Home  ›  block algo flex  ›  Documentation  ›  CCI

CCI

Commodity Channel Index (CCI)

The CCI measures how far the current price deviates from its statistical average. Despite the name, it works on any asset — not just commodities. It is effective for identifying overbought/oversold conditions, trend changes, and divergences.

How it works: CCI calculates the difference between the current typical price (HLC/3) and its simple moving average, then divides by the mean deviation. The result is an unbounded oscillator centered on zero.

Resources: TradingView CCI docs

Settings in block algo flex

SettingDescriptionDefault
Use CCI?Enable/disable the indicatorOff
InpCCI_lengthNumber of periods for calculation20
SourcePrice data source (hlc3 = average of High, Low, Close)hlc3
TimeframeTimeframe for calculationChart
Buy ConditionCondition for buy signal (e.g., "Crossing -100")Crossing -100
Sell ConditionCondition for sell signal (e.g., "Crossing 100")Crossing 100

How to Interpret

  • CCI > +100 — Price is significantly above its average; potentially overbought or in a strong uptrend
  • CCI < -100 — Price is significantly below its average; potentially oversold or in a strong downtrend
  • Crossing above -100 — Momentum shifting from bearish to neutral/bullish
  • Crossing below +100 — Momentum shifting from bullish to neutral/bearish

Pro Tip: Unlike bounded oscillators (RSI, Stochastic), CCI has no fixed upper or lower limit. Values can reach +300 or -300 in extreme moves. Use the crossing conditions rather than fixed thresholds for more reliable signals.

This is a static view of a single section. For full search and interactivity visit the docs app. Open interactive docs →