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

[amibroker] Re: Buy next bar after EMA cross



PureBytes Links

Trading Reference Links

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
>



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