I use Unmanaged = true option.
I noticed that during back testing OnBarUpdate is executed before the previous call OnExecution (or OnOrderUpdate) is processed. In other words, Position.MarketPosition and Position.Quantity did not get updated from the execution from the previous bar.
Is there a way to synchronize it automatically, and if not where should I insert a flag to prevent this?
Best regards,
Sergey.

Comment