Profile Picture

Position Allocation Issue

Posted By batttttt 6 Years Ago
Message
Posted Monday May 23 2011
I'm setting
PositionManager.AllocationType = PositionAllocationType.Percentage;
PositionManager.Allocation = 50;.
If a open signal is triggered, open a postion; if another open signal, then open again. If close signal, then close all.

In one case, for example, open 1st position at 10, using 5000 usd, than open 2nd position at 10 again, using 5000 usd; then the price went down to 9, and trigger a close signal, so close. Now I have 9000 usd. Later 1 open signal triggered at 9 usd, open 1st positon at 9. Then the price raise to 10 usd and another open signal, so open again. But the opening of 2nd position was failed by short of cash.

Is AllocationType.Percentage based on starting capital? or based on Current Account Value ?
Is there any way I can realize my trade?


BTW, is there any way to get current cash/balance I hold?

Edited: Monday May 23 2011 by batttttt
Posted Wednesday May 25 2011
The allocation is based on the current account value. However, RightEdge has to calculate the size of the order based on the target allocation. This is affected by the fill price, which isn't known when the order is submitted. So if the price changes between when the order is submitted and when it's filled, the actual allocation for the order may be higher or lower than requested. Also, profit and loss from other positions causes the account value to change, but the size of a position will remain the same. So a position opened with an allocation of 50% may end up being more than 50% of the value if other positions lose money in the meantime. Then when you try to open another position with a 50% allocation it goes over your available cash limit.

The current cash balance is available in the SystemData.CurrentCapital property. There are also other properties for the CurrentEquity, AccountValue, and some others.

Thanks,
Daniel


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems