Mike, PHighPrice is the last pivot high. I shift it forward to insure a cross occurs, should the pivot high have occurred only 2 days ago. It does not look into the future. I have CI and a 5 day EMA of CI charted in a pane below price. CI is definitely above and below 5 day EMA of CI. In addition, when I drop the formula on the price chart, I am getting buy and sell arrows. Also, it gives me results on Gold, but no results on stock or bond futures. These contracts are defined. Again, they work when the symbol is > and quit working when I change the sign. I know it is operator error, but I am not sure what it could be.
James ________________________________ From: Mike <[EMAIL PROTECTED]> To: [email protected] Sent: Wednesday, November 26, 2008 1:23:58 AM Subject: [amibroker] Re: Problem is back- Can't figure this AA problem out 1. Do you really intend to look into the future like that? Note that Ref(PHighPrice, 1) is looking at tomorrow's PHighPrice. 2. Are you sure that Ref(CI, -1) actually is ever greater than Ref(EMA (CI, 5), -1)? For these types of problems, it's often useful to add a Plot statement to see what's happening. Mike --- In [EMAIL PROTECTED] ps.com, James <jamesmemphis@ ...> wrote: > > I can't figure it out. If I change those two less than signs to greater than and rerun the AA, I get 0 trades. I thought it was a problem with the settings, because it seems to work when I changed something, but now it is not working again. > > > > > ____________ _________ _________ __ > From: James <jamesmemphis@ ...> > To: [EMAIL PROTECTED] ps.com > Sent: Tuesday, November 25, 2008 11:05:46 PM > Subject: [amibroker] Can't figure this AA problem out > > > I have this code in AFL: > > Buy = Cross(H, Ref(PHighPrice, 1)) AND Ref(CI,-1) < Ref(EMA(CI,5) ,- 1);Short > > CI is a customer indicator defined in the code. When I change the code to this, simply changing > to <: > > > > Buy = Cross(H, Ref(PHighPrice, 1)) AND Ref(CI,-1) > Ref(EMA(CI,5) ,- 1);Short > > I get no trades in the Automatic Analysis window. I get trade arrows in a chart pane and they are right, but for some reason changing those arrows > causes 0 trades in AA. Any idea what could be causing this. > > TIA, > James= Cross (Ref(PLowPrice, 1), L) AND Ref(CI,-1) > Ref(EMA(CI,5) ,- 1);= Cross (Ref(PLowPrice, 1), L) AND Ref(CI,-1) < Ref(EMA(CI,5) ,-1); >
