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

[amibroker] Re: Setting number of positions to open per bar



PureBytes Links

Trading Reference Links

1. Write your logic to generate buy/sell independant of the number of 
positions (e.g. if using a crossover, just code the crossover as 
usual).

2. Calculate a PositionScore for each signal (i.e. what is your 
definition of "strongest")

3. Write custom backtester code to (on a bar by bar basis) sort 
signals by PositionScore and then set the PositionSize to zero for 
any remaining signals after the first 3.

See "AmiBroker Custom Backtester Interface.pdf" in Files section of 
this group.

Mike

--- In amibroker@xxxxxxxxxxxxxxx, "giggollo99" <giggollo@xxx> wrote:
>
> Thanks for the tip, but it doesnt do what im looking for. Say i have
> 100 stocks in database, at 9:30am i want to buy the strongest 3
> stocks, then at 9:31 i want to buy the strongest 3 stocks at that
> time, and at 9:32 i want to buy the strongest 3 stocks at that time 
etc. 
> 
> In other words, for every bar i want to buy exactly 3 stocks.
> 
> MaxOpenPositions/MaxOpenLong/MaxOpenShort will limit the TOTAL 
number
> of positions held, but how do i limit the number of positions that 
are
> opened per bar?
> 
> Thanks
> g
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "vlanschot" <vlanschot@> wrote:
> >
> > Not exactly clear what you want, but take a look at SetOption
> > ("MaxOpenLong") and ("MaxOpenShort"), available since version 5.11
> > 
> > PS
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "giggollo99" <giggollo@> wrote:
> > >
> > > How can i specify that i want a maximum of 3 positions to be 
opened
> > > per bar? Note this is not the same as "max open positions".
> > >
> >
>



------------------------------------

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

<*> 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:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto: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/