If you don't find a simpler way, this could certainly be implemented using low level custom backtester API.
http://www.amibroker.org/userkb/2008/03/16/amibroker-custom-backtester-interface-2/ Mike --- In [email protected], "gwantel" <gwan...@...> wrote: > > Hi, > > if my system is flat I would like to have a stock in the Equity instead of > the linear line that comes from e.g. 2% interest. > Does anyone know how I could tell Amibroker for the case that the system is > flat to take an ETF (e.g. TLT) as the equity? > > I need an extension for e.g. this system: > Buy = Cross( MACD(), Signal() ); > Sell = Cross( Signal(), MACD() ); > > // trade on next bar open > SetTradeDelays( 1, 1, 1, 1 ); > BuyPrice = SellPrice = Open; > > // trade size: 25% of current portfolio equity > SetPositionSize( 25, spsPercentOfEquity ); > > What can I write that this system takes the ETF TLT when it is flat? >
