[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: zig zag formula



PureBytes Links

Trading Reference Links








<span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy;mso-ansi-language:EN-GB'>TNX
Spyros and Bob..will
keep you informed on further results and the system.

<span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy;mso-ansi-language:EN-GB'>Greetings
igor

<span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy;mso-ansi-language:EN-GB'> 

<span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy;mso-ansi-language:EN-GB'> 

<span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy;mso-ansi-language:EN-GB'> 

<span
lang=EN-US style='font-size:10.0pt;font-family:Tahoma;mso-ansi-language:EN-US'>-----Original
Message-----
From:
owner-metastock@xxxxxxxxxxxxx [mailto:owner-metastock@xxxxxxxxxxxxx] <span
style='font-weight:bold'>On Behalf Of Bob
Sent: zaterdag 8 juni 2002 3:29
To: metastock@xxxxxxxxxxxxx
Subject: zig zag formula

<font size=3
face="Times New Roman"> 



<span
style='font-size:10.0pt;font-family:Arial'>This is a repost of the formula from
Spyros, taken from archives.





<font size=3
face="Times New Roman"> 





<span
style='font-size:10.0pt;font-family:Arial'>Formula Name: SR ZigZag Trend


{SR ZigZag Trend}
{by Spyros Raftopoulos}
{E-mail :  raftsp@xxxxxxxxx}

{This binary indicator is based on the Metastock's Zig Zag function.
1 = confirmed uptrend,   -1 = confirmed downtrend}

perc:=Input("percent",1,100,10);
tr:=ValueWhen(1,Zig(C,perc,%)>Ref(Zig(C,perc,%),-1) AND
Ref(Zig(C,perc,%),-1)<Ref(Zig(C,perc,%),-2),Ref(Zig(C,perc,%),-1));
tr:=If( (C-tr)*100/tr>= perc ,tr,0);
tr:=If( tr=0, ValueWhen(1,tr<>0,tr), tr);
pk:=ValueWhen(1,Zig(C,perc,%)<Ref(Zig(C,perc,%),-1) AND
Ref(Zig(C,perc,%),-1)>Ref(Zig(C,perc,%),-2),Ref(Zig(C,perc,%),-1));
pk:=If((C-pk)*100/pk <=-perc , pk, 0);
pk:=If( pk=0, ValueWhen(1,pk<>0,pk), pk);
res:=If(pk<>Ref(pk,-1), -1,
If(tr<>Ref(tr,-1), 1, 0));
res:=If(res=0,ValueWhen(1,res<>0,res),res);
res