PureBytes Links
Trading Reference Links
|
Thank you to all who contributed.
Pablo
On Fri, 23 Jun 2006 13:51:26 -0700, Alex Matulich <alex@xxxxxxxxxxxxxx> wrote:
> 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)
>
|