Boris Kanevsky wrote:

//Hi !
//I try to calculate CCI indicator, but I receive different result.
//My calculation :
Period = 14;
Price = (H + L + C)/3;
Av = MA(Price, Period);
Diff = abs(Price - Av);
MeanDiv = MA(Diff,Period);
MyCCI = (Price - Av)/MeanDiv/0.015;
CCIDiff = MyCCI/CCI(14);//??????
Plot(CCIDiff,"CCI Diff",colorBlue,styleDashed|styleOwnScale,-2,2);

//What's Wrong ?
Boris.


I follow this definition :


     CCI - Commodity Channel Index

A price momentum indicator developed by Donald R. Lambert - it measures price excursions from the mean price as a statistical variation. The indicator works quite well with commodities, stocks and mutual funds. It keeps trades neutral in a sideways moving market, and helps get in the market when a breakout occurs.

A description of the CCI formula is as follows:

First, Calculate each periods mean. This is the high, plus the low, plus the close, divided by 3.

Second, calculate the n period simple moving average of these means.

Third, from each periods mean price, subtract the n period simple moving average of mean prices.

Fourth, Compute the mean deviation. This is the differences between each period's mean price and the n period simple moving average of those mean prices.

Fifth, Multiply the mean deviation by .015.

Sixth, the mean price, which we calculated in step three, is divided by .015 times the mean deviations from step 5.
Boris.

Reply via email to