I am using OnMarketDepth event to build a coherent Order Book. I am using the SampleMarketDepth template.
My question is related to have coherent data in a particular Time.
In order to have a coherent OrderBook several instructions need to be processed (for example a change on a price level needs a Remove instruction and an Insert instruction). If in the meantime of these instructions, I perform some calculations they would be wrong because they must be done after the second instruction.
I know it is because race conditions but I wonder if there is any way to know if in a particular time data is coherent.
Related to this problem, I want to know, what is the purpose of MarketDepth member of MarketDepthEventArgs class? It seems to have MarketDepthRowCollection items. Is it up to date? Is it valid? Can I use them to have a coherent real time Order Book?
Thank you in advance
Comment