PureBytes Links
Trading Reference Links
|
Jose
the validity percentage you've added is ok.
However the comment that the smaller the zig percent
the higher the validity could be a little missleading.
When you use a higher percent zig the time needed to cover
the "gray teritory" (from the last reversal to Validity's
threshold) is longer, simply because the distance is longer.
Also the probability of staying within the valid limits
is lower because the further the price moves away from a
swing point the greater the chances of retracing; hence the
higher percentages associated with lower zig percents!
What I want to underline is that this doesn't mean that
lower percents of zig offer better trading opportunities.
Neither the opposite of course..
Spyros
Message: 1
Date: Tue, 10 Jun 2003 16:54:12 -0000
From: "Jose" <josesilva22@xxxxxxxxx>
Subject: ZigZag validity revisited
Here is Spyros' (and some of Roy's) code, cleaned up, and with
additional features:
====================
ZigZag validity v2.1
====================
---8<----------------------------
{ZigZag validity engine by Spyros Raftopoulos}
{additional code by Jose Silva}
{1=ZigZag valid, 0=ZigZag invalid}
perc:=Input("ZigZag percent",.1,100,5);
plot:=Input("plot: signals=1, % of valid signals=2, ZigZag=3",1,3,
1);
x:=Input("use Open=1 High=2 Low=3 Close=4 Volume=5 P=6",1,6,4);
x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=5,V,If(x=6,P,C)))));
z:=Zig(x,perc,%);
z1:=Ref(z,-1);
z2:=Ref(z,-2);
last:=ValueWhen(1,z>z1 AND z1<z2
OR z<z1 AND z1>z2,z1);
pc:=Abs((x-last)*100/last);
SD:=z>z1 AND z1>z2 OR z<z1 AND z1<z2;
res:=pc>=perc;
valid:=If(Alert(res,2) AND SD,1,res);
validper:=Cum(valid)/Cum(valid>-1)*100;
If(plot=3,z,If(plot=2,validper,valid))
---8<----------------------------
Interesting to see how validity % decreases with higher value ZigZags.
jose '-)
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/zMEolB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|