Commodity Channel Index (CCI)

From FxCodeBaseWiki
Jump to: navigation, search

Commodity Channel Index (CCI) is an oscillator which measures the position of price in relation to its moving average. This can be used to define when the market is overbought/oversold or to signal when a trend is weakening.

Formula

Calculation of CCI is rather complicated but it can be understood if divided in steps.

  1. Calculate N-period Simple Moving Average using typical prices (averages of the High, Low and Close prices):
    <math>\operatorname{MVA}(TP, N)_i = \dfrac{{\sum_{j=i-N+1}^N} {TP_{j}}}{N}</math>
    where TP is typical price.
  2. Calculate the deviation of each typical price from the received MVA(TP, N):
    <math>\operatorname{D}_i = TP_i - \operatorname{MVA}(TP, N)_i</math>
  3. Calculate N-period Simple Moving Average of absolute values of deviations:
    <math>\operatorname{MVA}(D, N)_i = \dfrac{{\sum_{j=i-N+1}^N} {D_{j}}}{N}</math>
  4. Calculate the M value as the received MVA(D, N) multiplied by 0,015:
    <math>\operatorname{M}_i = \operatorname{MVA}(D, N)_i * 0,015</math>
  5. Calculate CCI dividing D by M:
    <math>\operatorname{CCI}_i = \dfrac{D_i}{M_i}</math>

where:
<math>\text{MVA}</math> is Simple Moving Average;

<math>\text{TP} = \frac{High + Low + Close}{3}</math>;
<math>\text{N}</math> is number of periods, used for calculation.

Usage

The line of CCI moves within a range of 100 and -100 about 80% of time. Values above 100 are considered to be in overbought area and indicate that a reversal in price is possible. Values below -100 are considered oversold and also indicate a possible reversal. In the overbought and oversold areas, buy and sell signals are generated.

CCI.png

CCI produces a number of signals.

  • Reversal in overbought and oversold areas:
    If CCI turns up from below -100, this can be interpreted as a signal to buy.
    If CCI turns down from above 100, this can be interpreted as a signal to sell.
  • Divergence between CCI and price:
    If CCI is above 100 and price makes a new High (is higher than the last high) but CCI fails to do so, this can be interpreted as a signal to sell.
    If CCI is below -100 and price makes a new Low (is lower than the last low) but CCI does not, this can be interpreted as a signal to buy. Divergences are stronger signals that occur less frequently.
  • Trend line breaks:
    Trend lines can be drawn connecting the price peaks and troughs. If the price breaks through an uptrend line and at the same time CCI above 100 goes down, this can be interpreted as a signal to sell. If the price breaks through a downtrend line and at the same time CCI below -100 goes up, this can be interpreted as a signal to buy.

See Also

Indicators

Simple Moving Average (MVA, SMA)

Articles

This Article in Other Languages

Language: English  • español • français • русский • 中文 • 中文(繁體)‎