I am storing bars to memory using BarsRequest objects by listening to the BarsRequest.Update event.
At the same time I'm listening to the Intrument.MarketData.Update event to receive Level1 type information and to be able to accumulate Bid and Ask information in each bar.
The main problem is that both listeners are out of sync. When a bar ends sometimes Level1 events have not arrived yet, and other times there are more.
Obviously, this problem is solved in the core of NinjaTrader. Please, could you give me some clue to solve this problem in my code? (I want to avoid developing a synchronization algorithm from scratch).
Thanks in advance.
Comment