Now a solution found. It must be: 

SetPositionSize(1,spsShares);

for backesting only with one contract.
Thanks for your help

Greetings

Beate

--- In [email protected], "beateclermont" <beateclerm...@...> 
wrote:
>
> Hi Mike,
> 
> thanks for your answer.
> 
> I  tried it already in the past with this code (SetOption
> ("MaxOpenPositions",1)), but this code limits only the number of 
open 
> trades at the same time and not the contract number in a trade. :(
> 
> There must be an other solution....
> 
> Greetings 
> 
> Beate
> 
> 
> --- In [email protected], "Mike" <sfclimbers@> wrote:
> >
> > Beate,
> > 
> > See Max Open Positions setting.
> > http://www.amibroker.com/guide/h_portfolio.html
> > 
> > Mike
> > 
> > --- In [email protected], "beateclermont" 
<beateclermont@> 
> > wrote:
> > >
> > > Hallo @ all,
> > > 
> > > at the moment I'm backtesting different strategies with 
> historical 
> > data 
> > > e.g. S&P. Now I'm lokking for settings where for hole test the 
> > number 
> > > of contracts is limited to 1, equal how big is the initial 
equity 
> or 
> > > how my "virtual account" has developed.
> > > 
> > > Example: The S&P has developed from 400 points in 1990 to 1600 
in 
> > 2000 
> > > and 2007 and is now at 800 points. If I want to test all 
> quotations 
> > at 
> > > once and I has a start initial equity of 1600 (for the high in 
> 2000) 
> > > the system starts trading with 4 contracts ....
> > > 
> > > Is there any solution how to limit contract number in settings 
> for 
> > > backtesting?
> > > 
> > > Many thanks for your help.
> > > 
> > > Greetings 
> > > Beate
> > >
> >
>


Reply via email to