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

SR ZigZag Trend v.3 Ignore the previous versions


  • To: <metastock@xxxxxxxxxxxxxxxxxx>
  • Subject: SR ZigZag Trend v.3 Ignore the previous versions
  • From: "raftsp" <raftsp@xxxxxxxxx>
  • Date: Mon, 24 Jun 2002 03:32:52 -0700
  • In-reply-to: <200206101331.HAA04200@xxxxxxxxxxxxxxxxxx>

PureBytes Links

Trading Reference Links

In my attempt to eliminate the previous bug I made a more serious mistake.
This version (let's name it version beta 3) corrects both of them. I hope it
doesn't introduce a new one. I tested it on about 50 stocks and I think it's
OK, but if I discover something I will let you know immediately. Sorry
again, but you will have to delete both the previous versions and try this
one. Please test it yourselves and let me know if you see anything
suspicious.

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

{It is based on the Zig Zag indicator and it returns 1 for a confirmed
uptrend, and -1 for a 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));
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));
res:=If(C>=tr+tr*perc/100 AND Zig(C,perc,%)>Ref(Zig(C,perc,%),-1),1,
If(C<=pk-pk*perc/100 AND Zig(C,perc,%)<Ref(Zig(C,perc,%),-1),-1,0));
res:=If(res<>0,res,ValueWhen(1,res<>0,res));
res

Spyros


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 19/04/02