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

Re: [amibroker] Backtest - Max Positions



PureBytes Links

Trading Reference Links

Thanks Graham
 
How silly of me not to think of your simple - elegant solution.
 
I must be at my desk too long!
 
 
Have a great day
 
A
----- Original Message -----
From: Graham
Sent: Saturday, November 12, 2005 3:33 PM
Subject: Re: [amibroker] Backtest - Max Positions

you do not seem to want the number of positions to be less than the maximum possible eg if equity 50,000 you can have 2x20k positions or if 110k the 5 positions.
 
Why not just use a maxposoition far greater than would be possible. eg numpositions =10000

 
On 11/13/05, Ara Kaloustian <ara1@xxxxxxxxxx> wrote:
I would like to compute Max number of positions based on Equity ,,, my attempts seem to produce erroneous results:
 
// Specify no value for Max_Pos ... assume only limit is amount of equity available,
//SetOption("MaxOpenPositions",Max_Pos);
//Make each Position Size $20,000
SetPositionSize(20000,spsValue);
 
Above code does not invest all available funds.
 
 
 
Also tried this:
Max_Pos = Round(SelectedValue(Equity(0,0)) / 20000);
SetOption("MaxOpenPositions",Max_Pos);
 
but looks like Equity() is evaluated at starting date only, so Max_Pos remains a constant
 
Thanks
 
Ara
 
 


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 other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS






--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm

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 other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS