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

Re: [amibroker] Re: Buy next bar after EMA cross



PureBytes Links

Trading Reference Links

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 <erichtao@xxxxxxxxx> wrote:
> should it be
> Buy = Ref(Buy,1); ?
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Edward Pottasch" <empottasch@xxx>
> 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: amibroker@xxxxxxxxxxxxxxx
> >   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
>
>
>
>

Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.17.37/682 - Release Date: 2/12/2007 1:23 PM