In NT7 to match the strategy positions with the account positions I save the positions details in a database. When I restarted the stategy, before real-time data was executed, I submited an order to create the strategy position.
In NT8 I am doing exactly the same with the code:
MyOrder = SubmitOrderUnmanaged(0, OrderAction.Buy, OrderType.Market,MyQuantity, 0, 0, "", "MyOrder");
but the strategy position is not created. I execute this code in OnBarUpdate() when historical data is processed. The same than in NT7.
I also tried to read the Account Position and submit the order but it doesn't work.
What would be the solution for this?
Comment