hi,
it could be due to rounding errors. Using "prec"
you can set the precision. Below works, rgds, Ed
Buy = IIf(Prec(frac(Year()/10),2) ==
0.60,1,0);
Filter =
1; AddColumn(Buy,"Buy");
or just simply:
Buy = Prec(frac(Year()/10),2) ==
0.60; Filter = 1; AddColumn(Buy,"Buy");
----- Original Message -----
Sent: Saturday, January 22, 2005 3:16
PM
Subject: [amibroker] Strange AB
formula
Can some one tell me why the following formula does not
generate any trade? It is supposed to generate a buy signal on all years
that end with the 6th. I have tried all other years. The only that works
is with 0.5.
Buy = (frac(Year()/10)==0.6)
;
Check AmiBroker web page at: http://www.amibroker.com/
Check
group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
|