PureBytes Links
Trading Reference Links
|
Sorry for the delayed response. That's not something that I've tried to do myself, so have not code to offer.
However, the low level API allows you to enter and exit trades programmatically within the custom backtester without need for any incoming generated signals.
The idea would be that, in the absence of any signals, you could check the open trades list and enter a full equity ETF position when no other positions are open. Similarly, upon receiving signals for a given bar, you could liquidate the ETF holdings. You could go all or nothing like that, or you could accumulate/liquidate to/from the ETF just enough to make available sufficient funds to trade incoming signals.
Mike
--- In amibroker@xxxxxxxxxxxxxxx, "gwantel" <gwantel@xxx> wrote:
>
> Thank you very much for the hint Mike.
> Maybe you have got an idea or a hint how this could be done with the custom backtester?
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Mike" <sfclimbers@> wrote:
> >
> > 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 amibroker@xxxxxxxxxxxxxxx, "gwantel" <gwantel@> 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?
> > >
> >
>
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
amibroker-digest@xxxxxxxxxxxxxxx
amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|