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

Re: [amibroker] ZIG Error



PureBytes Links

Trading Reference Links

Brian,

I believe this is the formula conversion.

perc = 1;//enter percent from 0.2 to 10 //Input("Percent",0.2,100,10);

Z = Zig(Close,perc);

Last = ValueWhen((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),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 = IIf(pc>=perc , 1,0);

final=IIf(Hold(res,2) AND SD,1,res);

Plot(final,"",4,1);



Brian Elijah wrote:

> 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);
>
>
> Yahoo! Groups Sponsor
[Click here to visit our exclusive feature of ACUVUE2 Colours at LensExpress.com!]
Click here to find your contact lenses!
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.