protectedoverridevoid OnMarketDepth(MarketDepthEventArgs e)
{
Print(string.Format("Depth: {0} {1} {2} {3}", e.MarketDataType, e.Operation, e.Price, e.Volume));
which produces output:
Depth: Ask Insert 113.7 25
Depth: Ask Insert 113.72 20
Depth: Ask Insert 113.73 159
Depth: Ask Insert 113.74 185
Depth: Ask Insert 113.75 152
Depth: Ask Insert 113.76 196
Depth: Bid Insert 113.69 20
Depth: Bid Insert 113.71 16
Depth: Bid Insert 113.7 34
Depth: Bid Insert 113.69 191
Depth: Bid Insert 113.68 330
Depth: Bid Insert 113.67 282
113.69 comes twice. In the NT DOM it is 20. But in the code I have to replace with 191 as it came after.
DOM is pretty much static - after trading hours it doesnt move at all. 20 was before I reloaded my indicator and 20 after that.
But in my data it is 191.
I connected to IB.
I need this somehow fixed as I cant count volume in bid/ask ladders.
Thanks
Comment