What is the MarketDataEventArgs.Time representing for Ask, Bid, and Last MarketDataTypes? Is it when the data was received by the exchange?
The reason I ask is that upon printing the times of the Ask, Bid, and Last events on live data, I observed that the timestamps are not chronological. Here is an example from today on NQ:
Bid: 2023-10-05 10:18:40:69
Ask: 2023-10-05 10:18:40:72
Bid: 2023-10-05 10:18:40:72
Ask: 2023-10-05 10:18:40:75
Bid: 2023-10-05 10:18:40:75
Ask: 2023-10-05 10:18:40:69
Bid: 2023-10-05 10:18:40:69
Last: 2023-10-05 10:18:40:69
Ask: 2023-10-05 10:18:40:70
Bid: 2023-10-05 10:18:40:70
Last: 2023-10-05 10:18:40:70
Last: 2023-10-05 10:18:40:70
Ask: 2023-10-05 10:18:40:71
{
if (e.MarketDataType == MarketDataType.Last)
{
Print("Last: " + e.Time.ToString("yyyy-MM-dd hh:mm:ss:ff"));
}
else if (e.MarketDataType == MarketDataType.Ask)
{
Print("Ask: " + e.Time.ToString("yyyy-MM-dd hh:mm:ss:ff"));
}
else if (e.MarketDataType == MarketDataType.Bid)
{
Print("Bid: " + e.Time.ToString("yyyy-MM-dd hh:mm:ss:ff"));
}
else
{
return;
}
}
Comment