SetTradeDelays(1,1,1,1); Buy = Cross( ema(close,10), ema(close,20) ); BuyPrice = O;
-- Cheers Graham AB-Write >< Professional AFL Writing Service Yes, I write AFL code to your requirements http://www.aflwriting.com On 13/02/07, eric tao <[EMAIL PROTECTED]> wrote: > should it be > Buy = Ref(Buy,1); ? > > --- In [email protected], "Edward Pottasch" <[EMAIL PROTECTED]> > wrote: > > > > what I would do is set > > > > SetTradeDelays(0,0,0,0); > > > > on top of the code. Then: > > > > Buy = Cross( ema(close,10), ema(close,20) ); > > BuyPrice = O; > > Buy = Ref(Buy,-1); > > > > > > rgds, Ed > > > > > > > > ----- Original Message ----- > > From: dralexchambers > > To: [email protected] > > Sent: Sunday, February 11, 2007 4:17 PM > > Subject: [amibroker] Buy next bar after EMA cross > > > > > > Hi, > > > > I am backtesting this trading system on the FX: > > > > Buy = Cross( ema(close,10), ema(close,20) ) > > > > The sell is a trailing stop of the EMA(10). > > > > How do I tell the backtester to buy on the open of the next bar after > > the buy signal is signalled. > > > > Thanks - alex > > > > > > > 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 > > > >
