PureBytes Links
Trading Reference Links
|
Eqyuty is dynamic
You need to set the AA setting-Portfolio to Use the previous bar equity
Then to use 25% of equity
positionsize = -25;
PositionSize = round(PositionSize/BuyPrice/RoundLotSize)*BuyPrice*roundlotsize;
On 9/6/05, Mark H <amibroker@xxxxxxxxxxxxx> wrote:
> I agree with you that the position size should be rounded down. However, I
> am trying to duplicate the results of a trading system which uses "rounding
> to the nearest 50" instead. It uses dynamic position sizing: the position
> size is a percentage of the equity.
> The equation I thought of is:
> PositionSize($)= GivenPercent * equity() + 25 * BuyPrice; (This will force
> it rounded to the nearest 50).
> PositionSize(%)= GivenPercent + (25*BuyPrice)/equity().
>
> But equity() is not dynamic when used in PositionSize calculation and I
> can't use it.
> ----- Original Message -----
> From: Graham
> To: amibroker@xxxxxxxxxxxxxxx
> Sent: Monday, September 05, 2005 9:06 PM
> Subject: Re: [amibroker] round lot size
>
> I would say that roundlot sizes down to ensure you do not trade
> greater than your trade size limit, as this is the way most position
> size management techniques would work.
>
> to do it to round up or down you would need to first determine te
> posistion size, calculate the number of shares and round this, then
> move back to positionsize based on the num shares. Sounds more complex
> than it is. Here is a quick type in answer
>
> PositionSize = 10000; //however you normally calculate it
> PositionSize = round(
> PositionSize/BuyPrice/RoundLotSize)*BuyPrice*roundlotsize;
>
>
>
> On 9/6/05, Mark H <amibroker@xxxxxxxxxxxxx> wrote:
> > You may have misunderstood my question. I know the RoudLotSize setting. My
> > question was is there a way to "rounding to the nearest" instead of
> > "rounding down".
> > Since I use dynamic position sizing, and have to use percentage for
> > PositionSize, I can't just add "24.99* buyprice" to the PositionSize for
> > roundlotsize=50.
> > ----- Original Message -----
> > From: eric paradis
> > To: amibroker@xxxxxxxxxxxxxxx
> > Sent: Monday, September 05, 2005 7:22 PM
> > Subject: Re: [amibroker] round lot size
> >
> > use the RoundlotSize setting in your settings. When
> > set to 1, 10, 100, etc Amibroker will round all your
> > positions so that your backtested trades will all be
> > rounded to your selected size.
> >
> > example trades
> >
> > XY 550
> > AMAT 120
> > GOOG 10
> >
> > etc
> >
> > --- Mark H <amibroker@xxxxxxxxxxxxx> wrote:
> >
> > > I understand round lot size is used to "rounding
> > > down", from example, RoundLotSize=50, and position
> > > size 3042 is rounded to 3000.
> > > Is there a way to "round to the neast even number"?
> > > like to 3050 in the above example, which makes more
> > > sense.
> > >
> > > Thanks for any answers.
> > >
> > > - Mark
> >
> >
> >
> >
> >
> > ______________________________________________________
> > Click here to donate to the Hurricane Katrina relief effort.
> > http://store.yahoo.com/redcross-donate3/
> >
> >
> > 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
> >
> >
> >
> >
> > ________________________________
> > YAHOO! GROUPS LINKS
> >
> > Visit your group "amibroker" on the web.
> >
> > To unsubscribe from this group, send an email to:
> > amibroker-unsubscribe@xxxxxxxxxxxxxxx
> >
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
> > To unsubscribe from this group, send an email to:
> > amibroker-unsubscribe@xxxxxxxxxxxxxxx
> >
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
> > ________________________________
> >
>
>
> --
> 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
>
>
>
>
> ________________________________
> YAHOO! GROUPS LINKS
>
> Visit your group "amibroker" on the web.
>
> To unsubscribe from this group, send an email to:
> amibroker-unsubscribe@xxxxxxxxxxxxxxx
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
> To unsubscribe from this group, send an email to:
> amibroker-unsubscribe@xxxxxxxxxxxxxxx
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
> ________________________________
>
--
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
------------------------ Yahoo! Groups Sponsor --------------------~-->
Put more honey in your pocket. (money matters made easy).
http://us.click.yahoo.com/r7D80C/dlQLAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~->
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
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> 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/
|