Hi - Just looking at your code...did you mean for g = (e-f)/e
to be g = (e-f)/f ( ie, same formula as used for reference index? ) Steve ----- Original Message ----- From: "Robert" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Friday, May 25, 2007 12:18 PM Subject: [amibroker] need guidance with the following formula >I have a question on the following formula: > > a = Foreign("^ixic","Close"); > b = Ref(a,-252); > d = (a-b)/b; > e = Close; > f = Ref(e,-252); > g = (e-f)/e; > k = LLV(g,-252); > r = g-k; > s = Ref(r,-1); > t = (d+k)/2; > u = Ref(t,-1); > > Cond1 = Cross(g,t); > Cond2 = g < T; > Cond3 = Close < 10.00; > Cond4 = Volume * Close >= 500000; > > > Buy = Cond1 AND Cond3 AND Cond4; > > > Filter = Buy; > > AddColumn(Buy,"buy"); > AddColumn(Close,"close"); > AddColumn(d,"D"); > AddColumn(g,"G"); > AddColumn(k,"k"); > AddColumn(s,"s"); > AddColumn(r,"r"); > > > Plot(d,"D",colorYellow,styleLine); > Plot(g,"G",colorWhite,styleLine); > Plot(k,"k",colorBlue,styleLine); > Plot(t,"t",colorRed,styleLine); > > The question is if you run the exploration to locate stocks meeting > the condition listed why does it return stock where cond1 is not > correct. It will not give stocks where the g cross above above t on > the day of the exploration. I would appreciate any help in correcting > this problem if it is indeed possible to explore for this condition. > > Disq > > > > > Please note that this group is for discussion between users only. > > To get support from AmiBroker please send an e-mail directly to > SUPPORT {at} amibroker.com > > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: > http://www.amibroker.com/devlog/ > > For other support material please check also: > http://www.amibroker.com/support.html > > Yahoo! Groups Links > > > >
