In OnMarketData, NT provides temporary values for coders for volume and price, for
bid, ask and last.
These values are accessed with the following code.
-----------------------------------------------------------------
e.MarketData.Ask.Price
e.MarketData.Bid.Price
e.MarketData.Last.Price
e.MarketData.Ask.Volume
e.MarketData.Bid.Volume
e.MarketData.Last.Volume
----------------------------------------------------------------
If you are using any of these coding queries in your indicators, your indicators are displaying bad data!!!
Here are a few examples of what is going wrong:
When several ticks arrive at the same time, NT tends to assign all of those trades the same volume even though the trades all had different volumes.
Also, When the market trends strongly in one direction, the
bid and ask prices offered fall behind the live market. This
results in last trades for both the bid and the ask, to be tallied, either, all for the bid, or all for the ask.
This really screws up stuff like volume
delta calculations!!!!
This problem is persistent in both NT 6.5 and NT7.
The workaround for this problem is to create your own temporary store values from
e.Volume and
e.Price.
Below are the lines of code that I now use in my indicators.
---------------------------------------------------------------------------------------------------
if (e.MarketDataType == MarketDataType.Ask)ePriceAsk = e.Price;
if (e.MarketDataType == MarketDataType.Bid)ePriceBid = e.Price;
if (e.MarketDataType == MarketDataType.Last)ePriceLast = e.Price;
if (e.MarketDataType == MarketDataType.Ask)eVolumeAsk = e.Volume;
if (e.MarketDataType == MarketDataType.Bid)eVolumeBid = e.Volume;
if (e.MarketDataType == MarketDataType.Last)eVolumeLast = e.Volume;
---------------------------------------------------------------------------------------------------
After I made these changes and put the temporary patch for the CurrentBar/FirstTickOfBar bug into my indicators, my NT7 indicators are now matching the Time & Sales display window tick for tick.
I plan to post a problem report on the NT forum this Monday and hope they will take steps to resolve this issue.
I am also building an indicator that will send all of the bad data mismatches to the output window to help NT confirm the problem.
Comments and feedback are appreciated,
RJay
FYI, All the Bid/Ask volume indicators I have posted here, on this forum, have this problem. I will update them when NT7 is finally released.