Hi guys. Is there an opportunity to get value of Starting Capital from a code of strategy.
I want to use SetShareSize(contracts) method in code where contracts = 10% from Starting Capital. Then I will be changing the percent of new capital to calculate new size for every position. So I need to know Starting Capital from the code of my strategy to have the initial contract size. Could you please help me to get it.
Size:
Color:
Hi Pavel,
First, let me ask why not simply use Percent Equity? Or build a custom PosSizer if the built-in option doesn't cover some twist in your sizing logic?
Size:
Color:
Hi,
Thanks for a quick response. The reason is I need to change Percent Equity for each Position due to the strategy logic. So the option of constant Percent Equity doesn't work. No doubt I can build a custom PosSizer but the calculation logic of Percent Equity is uniquely defined by the Strategy. So this PosSizer will be applicable only for one Strategy. That's why I don't want to build a common PosSizer and want to include it into the code of my Strategy.
Size:
Color:
Size:
Color:
Hi Eugene,
Thanks a lot for your help. I looked into how GetPositionSize is built inside. It's very interesting.
Size:
Color: