Rank: Member
Groups: Registered, Registered Users, Unverified Users Joined: 5/8/2010(UTC) Posts: 28 Location: Mumbai (India)
Thanks: 1 times
|
Hi,
Below mentioned is the code used in Advanced Get XTL formula.
tgt = 35;
a = CCI(20) < -tgt;
b = CCI(20) > tgt;
state = If(a>b,-1,If(a==b,0,1));
Color = If(state == 0, colorBlack, If(state == 1, colorBlue, IIf(state == -1, colorRed, 0)));
It uses the Comodity Channel Index (CCI) for 20 periods and the target is 35. So the value is higher then 35, it is bullish and if the CCI(20) is less than -35, it is berrish.
Now how do I use it in Metastock so as to get the same effect as XTL in Advanced Get.
We can use either CCIE or CCI standard.
Thanks
|
|
|
|
Rank: Advanced Member
Groups: Moderators, Registered, Registered Users, Subscribers Joined: 10/8/2010(UTC) Posts: 1,960
Thanks: 92 times Was thanked: 155 time(s) in 150 post(s)
|
The only way to do that in MetaStock is as a histogram. Use this formula:
tgt:= 35; pl:= CCI(20); If(pl>tgt, pl, 0); If(pl<-tgt, pl, 0); If(pl<=tgt AND pl>=-tgt, pl, 0)
after plotting it in a chart, set the line style and desired colors
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
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.