PositionAccount.MarketPosition and PositionAccount.Quantity don't work as expected(on SIM or IB TWS).
Case 1 to reproduce:
- OnBarUpdate Add Print status
Code:
" Print(PositionAccount.MarketPosition.ToString() + " " + PositionAccount.Quantity.ToString());"
- When start strategy I don't have opened position on account.
- When strategy is running I open position via broker terminal or NT ChartTrader
- Code print always that market Position is flat and Quantity is 0
Case 2 to reproduce:
- When start strategy I have opened position on account.
- Code print correct information about position
- When strategy is running I close position via broker terminal or NT ChartTrader
- Code print always that market Potion is previous status and previous quantity
Seems like PositionAccount for Strategy Updated only when strategy started, after does not updated.
How can I retrieve real data in real-time?
Comment