--- In [email protected], Graham <[EMAIL PROTECTED]> wrote:
>
> this automatically sizes the trade for current equity in a
backtest
> positionsize = -2*margindeposit/((BuyPrice - SL)*pointvalue);
> This is 2% of backtest equity adjusted for the risk of the trade,
which is> the (trade price/loss in real dollars) per contract
>
Hi Graham,
of course I completely trust your coding, but.... I don't understand
how it works
It seems to me that your formula's numerator takes 2% of current
equity, and multiplies it by margin deposit (in Dollars) before
dividing it for the 1lot risk in dollars ( formula's denominator)
Example:
Equity = 50000
Margin deposit = 1000
Max risk 2% of equity, that is 1000 $.
Buy price = 55
Stop loss = 50
Point value = 50
Isn't your formula doing (1000*1000)/((55-50)*50) = 4000 (instead of
4 lots)??
Why could not simply be:
PositionSize = -2/(BuyPrice-SL)*point Value);?
Many thanks,
Angelo.
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/
<*> 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:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/