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

Re: ZIG Error



PureBytes Links

Trading Reference Links

remove "1" of valuewhen
in Ami it is not valuewhen(1,patati,patata)
but valuewhen(oatati,patata,1)

stephane

> I get an error on this MS formula- How can I change it?
> 
> Thanks in Advance,
> Brian
> 
> perc = Input("Percent",0.2,100,10);
> 
> Z = Zig(Close,perc,%);
> 
> Last = ValueWhen(1,(Z>Ref(Z,-1)AND Ref(Z,-1) < Ref(Z,-1)) 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);