[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] CCI Test



PureBytes Links

Trading Reference Links

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.

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___