This code is using the PullStack code as a baseline.
The only things I've changed are
1. Instead of rendering Tuple.Item2 (which stores the calculation for the difference between the previous and current depth) I'm rendering Item1 which is simply the current depth.
2. Color the background red if the data stored in the askPriceDepthMap or bidPriceDepthMap does not match the row.BidVoume or row.AskVolume respectively
All of the thread saftey mechanisms are in place as they are in the OnMarketData and OnMarketDepth functions so this isn't a threading issue.
If this column code is giving inaccurate output then so does the PullStack column (only it's not as noticible sinced the value presented is a rapidly changing calculated value)
I'm assuming the OnMarketDepth is the source of truth here. However, this is troubling since the dictionary objects mentioned above are utilizing OnMarketDepth i.e. under the covers the maps should be the nearest source of truth. However, what's presented ot the user as a baseline on a naked DOM is divergenent from the data stored in the data structures. In other words, it seems like when using the DOM we're not actually seeing liqudity as it stands at times.
Lastly, I also want to note, that when the Ninjascript code is refreshed or the column addon loaded initially, the data starts out matching. Then over time, the longer it runs the more out of sync it
becomes.
.

Comment