Discussions
»
Product and Service Development
»
Formula Assistance
»
How create Standard CCI based on the close [RESOLVED]
Rank: Member
Groups: Registered, Registered Users Joined: 12/6/2005(UTC) Posts: 10
|
The traditional CCI is based on the (H+L+C)/3. It appears that the "CCI-Standard" included in Metastock
is the same, although I am new to the Formula and still learning.
Can anyone give me the modified formula that would create a CCI based on the close?
Thank you
:)
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
Try this indicator:
[code:1:50af716b25]
=====================
CCI - Standard (Close)
=====================
---8<------------------------------
pds:=Input("CCI periods",1,2600,14);
x:=C;
y:=Mov(x,pds,S);
z:=Mov(Abs(x-LastValue(y+PREV-PREV)),pds,S);
ZZI:=(x-y)/(z*0.015);
ZZI
---8<------------------------------
[/code:1:50af716b25]
jose '-)
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 12/6/2005(UTC) Posts: 10
|
Jose,
Thank you for the post.
I tried it, but got this error message:
"Expression too complex. (EXPRESSION STACK OVERFLOW)"
Does that make any sense to you?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/28/2004(UTC) Posts: 110
|
mmentors,
Here's the formula found in the formula section.
{CCI-STD cs}
{written by Corey Saxe}
V1:=Input("Periods",2,250,14);
x:=Typical();
y:=Mov(x,V1,S);
z:=Sum(Abs(x-LastValue(y+PREV-PREV)),V1)/V1;
A1:=z*0.015;
ZZI:=(x-y)/A1;
ZZI{end}
To convert it to what you want just change the x variable to C instead of Typical() like this:
{CCI-STD cs}
{written by Corey Saxe}
V1:=Input("Periods",2,250,14);
x:=C;
y:=Mov(x,V1,S);
z:=Sum(Abs(x-LastValue(y+PREV-PREV)),V1)/V1;
A1:=z*0.015;
ZZI:=(x-y)/A1;
ZZI{end}
or just use Jose's formula
Preston
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 12/6/2005(UTC) Posts: 10
|
Yes Sir, got it to work now.
Thank you Preston and Jose.
You guys are awesome.
What a great Forum. Such quick and helpful responses. Very impressive!
Thanks again.
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Discussions
»
Product and Service Development
»
Formula Assistance
»
How create Standard CCI based on the close [RESOLVED]
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.