PureBytes Links
Trading Reference Links
|
Steve,
I picked this off the subscriber list for TA mag;
maybe it will help you? I didn't find any other Zigzags on the
list.
Doug
METASTOCK CODE FOR ZIGZAG VALIDITY{Zigzag validity by Spyros
Raftopoulos}perc:=Input("Percent",0.2,100,10);Z:=Zig(Close,perc,%);last:=ValueWhen(1,(
Z > Ref(Z,-1) AND Ref(Z,-1) < Ref(Z,-2))OR(Z < Ref(Z,-1) AND
Ref(Z,-1) > Ref(Z,-2)),Ref(Z,-1));pc:=(Close-last) * 100 /
last;pc:= Abs(pc);SD:=(z > Ref(z,-1) AND Ref(z,-1) >
Ref(z,-2))OR(z < Ref(z,-1) AND Ref(z,-1) <
Ref(z,-2));res:=If(pc >= perc ,1,0);If(Alert(res,2) AND
SD,1,res)
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
Steve
Grala
To: <A
title=Metastockusers@xxxxxxxxxxxxxxx
href="">Metastockusers@xxxxxxxxxxxxxxx
Sent: Tuesday, May 20, 2003 1:03 PM
Subject: [Metastockusers] Roy Larson
& zig zag formula
He Roy,Can you give me the details of how the zig
zag formula is created? Doesyour zipped MetaStock formula file
explain how the zig zag indicator iscreated in MetaStock? I have
been trying to recreate the indicator myself,but am unable to do so.
The built-in zig zag indicator in MetaStock plotsdata on the first day and
the last day. I really don't see how MetaStockcan do this. I
have not been able to find anyone who knows how the zig zagindicator is
written in MetaStock. I created a formula that draws a linearline
from the first day of data to the last day of data, but I am unable tohave
it switch back and forth at defined percent intervals. Basically,
Icreated a zig without the
zag.A:=If((C-PREV)/PREV<.1,PREV,C);slope:=(LastValue(C)-ValueWhen(1,Cum(1)=1,C))/LastValue(Cum(1));line:=ValueWhen(1,Cum(1)=1,C)+Cum(slope);line;Thanks,SteveTo
unsubscribe from this group, send an email
to:Metastockusers-unsubscribe@xxxxxxxxxxxYour use
of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Yahoo! Groups Sponsor
To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|