PureBytes Links
Trading Reference Links
|
Pablo wrote:
>I'm trying to code the following:
>"Size position so that risk to protective stop = 10% of current equity"
I don't know how you would size a position so that the stop is 10%
of your equity. You can size a position relative to equity, or size
your stop relative to equity, but not both.
Equity is simply startquity + NetProfit, where startequity is your
own value and NetProfit is Tradestation's internal number. A 10%
stop based on current equity would be
0.1 * (startequity + NetProfit).
A position size that's 10% of your equity is
IntPortion((startequity + NetProfit) * 0.1 / margin + 0.5)
--
,|___ Alex Matulich -- alex@xxxxxxxxxxxxxx
// +__> Director of Research and Development
// \ Unicorn Research Corporation -- http://unicorn.us.com
// __) HTML FORMATTED MAIL SENT HERE WILL BE REJECTED AS SPAM.
|