Skip to main content

CCI

Type: cci • Category: indicators

Description

Commodity Channel Index

Parameters

NameTypeDescriptionRequiredDefault
dataExpstringprices datano
highstringselect the column with highest pricesno
lowstringselect the column with lowest pricesno
closestringselect the column with closing pricesno
timeperiodnumberNumber of periods to use for CCI calculationno14

Help

CCI (Commodity Channel Index)

=====================================

Description


The Commodity Channel Index (CCI) is a popular technical indicator used in financial analysis to measure the difference between an asset's price change and its average price change over a given period. It was developed by Donald Lambert in the 1980s.

The CCI is a versatile indicator that can be used to identify overbought and oversold conditions, as well as to detect trends and divergences.

What does this worker do?


This worker calculates the Commodity Channel Index (CCI) for a given set of price data. It takes the following parameters:

  • dataExp: prices data
  • high: select the column with highest prices
  • low: select the column with lowest prices
  • close: select the column with closing prices
  • timeperiod: Number of periods to use for CCI calculation

The worker returns the calculated CCI values.

How to interpret the results


The CCI is typically plotted as a line graph below the price chart. The interpretation of the CCI is as follows:

  • Overbought: When the CCI rises above +100, it indicates that the asset is overbought, and a potential sell signal is generated.
  • Oversold: When the CCI falls below -100, it indicates that the asset is oversold, and a potential buy signal is generated.
  • Bullish divergence: When the CCI forms a higher low while the price forms a lower low, it indicates a potential buy signal.
  • Bearish divergence: When the CCI forms a lower high while the price forms a higher high, it indicates a potential sell signal.

Usage


To use this worker, simply provide the required parameters and run the calculation. The resulting CCI values can be plotted on a chart to visualize the indicator.

For a visual guide on how to use this worker, see the following GIFs:

Full GIF

[![Full GIF](https://pub-6c7cc7f707d94ca98153d59a039b9a3d.r2.dev/indicator_full.gif)](https://pub-6c7cc7f707d94ca98153d59a039b9a3d.r2.dev/indicator_full.gif)

Short GIF

[![Short GIF](https://pub-6c7cc7f707d94ca98153d59a039b9a3d.r2.dev/indicator_short.gif)](https://pub-6c7cc7f707d94ca98153d59a039b9a3d.r2.dev/indicator_short.gif)

Additional knowledge


The CCI is a momentum indicator that can be used in conjunction with other technical indicators to form a trading strategy. It is essential to note that the CCI is not a directional indicator and should be used in combination with other forms of analysis, such as trend analysis and risk management.

The CCI can be adjusted to suit different market conditions and trading styles by changing the timeperiod parameter. A shorter timeperiod will result in a more sensitive indicator, while a longer timeperiod will result in a less sensitive indicator.