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
>


Reply via email to