Skip to content

CCI

Indicators

  • Price
  • High
  • Low
CCI

20 candles

  • CCI
  • oversold
  • overbought
This is how the node looks on the board: inputs on the left, outputs on the right.

How far the price strays from its average. Measures how far the typical price, the mean of high, low and close, is from its average over the last candles, relative to its usual swings. Most of the time the CCI stays between −100 and 100. Above 100 the price has risen unusually far, often at the start of a strong rise, below −100 it has fallen unusually far. The “overbought” and “oversold” outputs report this, and you drag the thresholds in the chart below the price. Example: “CCI 20 crosses above 100” reports a strong upside breakout, “CCI 20 below −200” a very sharp sell-off.

BTC/USDT price and CCI 20Dots mark where the CCI rises above 100.Price BTC/USDT85,00086,00087,000CCI 20-1000100Oct 3Oct 4Oct 5Oct 6
  • Price (close of each candle)
  • CCI 20
  • crosses above 100
Top: the price; bottom: the CCI 20 of the same 1-hour candles. It mostly swings between −100 and 100. At the dots it rises above 100: the price climbs unusually strongly.

Properties of the CCI node: at the top the price of the last 150 candles, below it CCI with the zone between the thresholds and two handles at the right edge, dots at the hits, below that the Oversold below and Overbought above fields.

The properties show the price of the last 150 candles at the top and CCI below it, with the zone between the thresholds. Drag a threshold or type it; the number in the field follows in whole steps. Dots on the price show where “oversold” or “overbought” would be true, the top line shows how often.

More under Chart below the price.

The settings appear on the right under “Properties” once you click the node on the board. Below each field you find the same explanation as here.

Default: 20 · from 2 to 200, whole number

How many candles the average and the swings are measured over. 20 is the usual value. With 14 the CCI reacts faster, with 50 it shows more of the bigger trend.

Default: -100 · from -500 to 500

Below this line the price has fallen unusually far, and the “oversold” output is true. −100 is usual; with −200 it only reports very sharp sell-offs.

Default: 100 · from -500 to 500

Above this line the price has risen unusually far, and the “overbought” output is true. 100 is usual; with 200 it only reports very strong rallies.

Notifies you when the CCI 20 rises above 100: the price breaks out unusually strongly to the upside.

Example chain: Candle, CCI, Compare, TelegramConnections: Candle → CCI, Candle → CCI, Candle → CCI, CCI → Compare, Compare → Telegram.CandleBTC/USDT · 1hCCI20 candlesCompareCCI 20 crosses above 100Telegramlinked chat · at most every4 h

How to connect the nodes:

  1. Candle (Price) → CCI (Price)
  2. Candle (High) → CCI (High)
  3. Candle (Low) → CCI (Low)
  4. CCI (CCI) → Compare (Value)
  5. Compare (true/false) → Telegram (Trigger)

On the board it reads: 20 candles

Chain as JSON

To try it, copy it and paste it in the editor under “Import”. Importing creates a new chain.

cci.json
{
"name": "Example: CCI",
"version": 1,
"nodes": [
{ "id": "c1", "type": "core.candle", "position": { "x": 40, "y": 40 }, "settings": { "pair": "BTC/USDT", "timeframe": "1h" } },
{ "id": "i1", "type": "core.cci", "position": { "x": 260, "y": 40 }, "settings": {} },
{ "id": "k1", "type": "core.compare", "position": { "x": 480, "y": 40 }, "settings": { "operator": "crossesAbove", "value": 100 } },
{ "id": "t1", "type": "core.telegram", "position": { "x": 700, "y": 40 }, "settings": {} }
],
"edges": [
{ "from": "c1.close", "to": "i1.close" },
{ "from": "c1.high", "to": "i1.high" },
{ "from": "c1.low", "to": "i1.low" },
{ "from": "i1.out", "to": "k1.in" },
{ "from": "k1.out", "to": "t1.in" }
]
}

Only matching types connect: number series to number series (round pin), signal to signal (square), message to message (diamond).

Direction Pin Type Note
Input Price Number series required
Input High Number series required
Input Low Number series required
Output CCI Number series –
Output oversold Signal (true/false) –
Output overbought Signal (true/false) –
  • In messages the value is called “CCI 20”.
  • Warm-up with the default settings: 20 candles (this many extra candles are loaded by the replay before the value is reliable).
  • Search also finds it under: cci, commodity channel index, deviation, overbought, oversold, momentum.

Typical price (high + low + close) / 3, CCI as (typical price − SMA) / (0.015 · mean absolute deviation) over the candles, empty without deviation; the same formula as ta.cci in TradingView, like the built-in CCI with the source hlc3.

  • Type in the chain: core.cci · Version 1.0.0 · Category key ind
  • Settings in the chain: length (Candles), oversold (Oversold below), overbought (Overbought above)
  • Pins in the chain: Input close, high, low · Output out, oversold, overbought
  • Reference tests in the manifest: 2 (with fixed price data: 500 candles of 1h)
  • How a node is built

Version 2026.10.21.23 · Changelog