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

Re: ZigZag Validity by Spyros Raftopoulus



PureBytes Links

Trading Reference Links

Theo,

I entered the codes of the ZigZag Validity indicator from TASC August
2002 and it seems ok.

ZigZag Validity :

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)

Pierre Tremblay


Theo Lockefeer a écrit :

> Hello friends, Did someone manage to get the formaula on page 30 of
> August Stocks and Commodities to work OK in Metastock 6.52 ? I get an
> error when i type the formula in IndicatorBuilder. Thanks  Theo