 MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

 A B C D E F G H I J K L M N O P R S T U V W Y Z #

CCI - Donald Lambert

Commodity Channel Index

Description :
The CCI is a price momentum indicator that works well for commodities,stocks, and mutual funds.

Usage: CCI( Period1 )
Returns: Array

where:
Period1 = number of periods in the CCI calculation as shown below.

Mathematically:

CCI[i] = (M - A)/(X * D) percent

where:
i(nput,periods) =The user defined periods.
M(ean,Price) =Mean price of the current-day sample period.
A(verage,Mov.) =The p-period simple moving average of M.
D(eviation) =Mean deviation ofabsolute values of
the numerator over p periods.
X(known,unkown)=An adjusting factor, 0.15, which normalizes
the excursions to a trading range of +/- 100.
percent(%result) =The full formula's Return value

The CCI is a sort of "noise" filter, for which the random fluctuationsshould fall inside the +/- 100 percent range.

Excursions outside this range tend to be nonrandom and indicatetrading opportunities.

Suggested trading rules are:
1. Buy long when CCI goes above +100%.
2. Sell long when CCI subsequently returns below 100%.
3. Sell short when CCI goes below -100%.
4. Cover shorts when CCI subsequently returns above -100%.

- Selection of a large number of periods (p) will filter out much of the noise, but can mask trading opportunities and trends.
- A smaller number of periods can create false signals.

90 and 53 weeks as tentative starting periods for your analysis
are suggested.

Another way of using the CCI is to note when the security beinganalyzed rises dramatically, but the rise is not reflected by theoverall momentum represented by the CCI. Such a divergence isusually followed by a price correction for the security.



----- Original Message -----
From: "M. Robb" <robb@xxxxxxxxxxxx>
To: <metastock@xxxxxxxxxxxxx>
Sent: zaterdag 18 maart 2000 6:54
Subject: Re: CCI

> The appearance of MS CCI standard, and CCI-Equis diffe from the formula you
> sent.
>
> ((MP()-Mov(MP(),14,S))/
> (1.5*Stdev(Abs(MP()),14)))*100
>
> The "CCI -equis" seems a little closer to yours.
>
> Strangely, the MS "CCI -standard" is less smooth, but less useful at
> turning points.
>
> M.R.

Re: CCI

To: "Metastock-List" <metastock@xxxxxxxxxxxxx>

Subject: Re: CCI
From: "A.J. Maas" <anthmaas@xxxxxxxxx>
Date: Sun, 19 Mar 2000 02:54:09 +0100
Organization: Ms-IRB
References: <24FA77225FA5D111869F0000C025B6F20122E380@xxxxxxxxxxxxxxxxx>
Sender: owner-metastock@xxxxxxxxxxxxx

The appearance of theMSK's "CCI-Standard" and "CCI-Equis" indicators differs full stop. My mail'sCCI indicator is close to the CCI-standard.Andto topit off, the Achelis'TA from A to Z weblink version also "totaly differs".

Also note that in the CCI formula that I had send, a "large typo" mighthave been made, if the in the MSK's Help+Manual interpretation (see furtherbelow) explained "Equis formula developing for CCI" was to be used.

Original:
((MP()-Mov(MP(),14,S)) /(1.5*Stdev(Abs( MP()) ,14)))*100

Then the correct(ed) formula would be:

((MP()-Mov(MP(),14,S)) /(1.5*Stdev(Abs(Mov( MP()-Mov(MP() ,14,S),14,S)),14)))*100

here the adjusted large typo is than in the extra average:
"Mean deviation of absolute values of the average numerator over p periods." where in the previous formula the "Mean deviation of absolute values of the numerator over p periods." was used.

Please correct me, if I am wrong in the "interpretation" of this line.
Also correct me if you're being confused, as well as that perhaps Equis and its President are also being confused.

Regards,
Ton Maas
ms-irb@xxxxxxxxxxxxxxxx
Dismiss the ".nospam" bit (including the dot) when replying.
Homepage http://home.planet.nl/~anthmaas

===========MSK Help+Manual==================
CCI according to Equis

The Commodity Channel Index (CCI) is calculated byfirst determining the difference between the mean price of a commodityand the average of the means over the time period chosen(where Mean is the exact middle between 2 extremes, egMidPrice).

///////////section1: MidPri:=((H-L)/2);
Diff:=MidPri-Mov(MidPri,14,S);

This difference is then compared to the average difference over the timeperiod
(this factors in the commodity's own inherent volatility).

///////////section2: AveDiff:=Mov(Abs(Diff),14,S);
EquationComp:=Diff/AveDiff;

The result is then multiplied by a constant that is designed to adjust the CCI
so that it fits into a "normal" trading range of +/-100.

Further details on the contents and interpretation of the CCI can be found inthe October 1980 issue of Commodities magazine (now known as Futures).The article was written by Donald Lambert.

CCI-Equis custom

MidPri:=((H+L+C)/3);
Diff:=MidPri-Mov(MidPri,14,S);
AveDiff:=Mov(Abs(Diff),14,S);
EquationComp:=Diff/AveDiff;
PercResult

Name: CCI-Standard custom

(Typ()-Mov(Typ(),14,S))/
(1.75*Stdev(Abs(Typ()),14))*125
{Note: this is the closest 'equal' to the
build-in version}

Note1:
The CCI indicator used in older versions of MetaStock is called "CCI (EQUIS)."

Note2:
"CCI (Standard)" is the recently modified version that is consistent with the
author's current calculation method.

Note3:
The interpretation of both methods is identical.

CCI according to Steve Achelis TA from A to Z book.

For Metastock v6.5+

CCI - Donald Lambert

{CCI according to Steve Achelis' TA from A to Zbook, of which an electronic version can be found http://www.equis.com/free/taaz/cci.html}
step1:=(H+L+C)/3;
step2:=Mov(step1,14,S);
step3:=Ref(step1,-1)-step2 AND
Ref(step1,-2)-step2 AND
Ref(step1,-3)-step2 AND
Ref(step1,-4)-step2 AND
Ref(step1,-5)-step2 AND
Ref(step1,-6)-step2 AND
Ref(step1,-7)-step2 AND
Ref(step1,-8)-step2 AND
Ref(step1,-9)-step2 AND
Ref(step1,-10)-step2 AND
Ref(step1,-11)-step2 AND
Ref(step1,-12)-step2 AND
Ref(step1,-13)-step2 AND
Ref(step1,-14)-step2;
step4:=Mov(Abs(step3),14,S);
step5:=step4*0.015;
step6:=step1-step2;
step7:=step6/step5;
step8:=step7/20;{for the +100, -100 scale}
step8 Re: CCI

To: <metastock@xxxxxxxxxxxxx>
Subject: Re: CCI
From: "M. Robb" <robb@xxxxxxxxxxxx>
Date: Sun, 19 Mar 2000 18:51:12 +0800
References: <24FA77225FA5D111869F0000C025B6F20122E380@xxxxxxxxxxxxxxxxx>
Sender: owner-metastock@xxxxxxxxxxxxx

Ton Mass:

Plotting this latest CCI from you yields values, for one example of an S&P 500, over a range of + 275 to -425, compared to the MS CCI standard of amuch tighter range of + 175 to - 150 approximately.

In addition to having a wider range, this last formula traces a some what differrent shape, in that it appears slightly more smooth, yet lesssensitive at tops... than the MS CCI standard.

((MP()-Mov(MP(),14,S)) /(1.5*Stdev(Abs(Mov( MP()-Mov(MP() ,14,S),14,S)),14)))*100

Please understand that I am not trying in any way to correct you. I am merely copying the formulas as you send them into my MS 6.51 EOD and viewing the plots.

Mike Robb


Source / From: TOP
http://purebytes.com/archives/metastock/

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.

TradeStation® Pro, TradeStation® 2000i, OptionStation®, SuperCharts®, PowerEditor® and EasyLanguage®
are registered trademarks of TradeStation Technologies, Inc. Other names and marks referred to are the property of their respective owners.

All information provided on this website is for educational purposes only. Trading involves risk, including possible loss of principal and other losses.

Ten i inne materiały na tej stronie zostały zamieszczone zostały jedynie w celach edukacyjnych, nie ponoszę żadnej odpowiedzialności za ich stosowanie.

Gra na giełdzie i rynkach walutowych (FOREX) niesie ze sobą ryzyko poważnych strat finansowych!