Discrepancy in MarketSeries.TickVolume versus counted tick volume
28 Apr 2019, 02:34
Just thought I'd throw this out there as I'm unsure why this difference in value exists. In a cBot I have the following code where the bot manually counts each tick and then prints the result on the next bar, compared with the last result from MaketSeries.TickVolume:
int tickcount;
protected override void OnTick()
{
tickcount++;
}
protected override void OnBar()
{
int tickwrite = tickcount;
tickcount = 0;
double tickmarket = MarketSeries.TickVolume.Last(1);
Print("Market: {0} | Manual: {1}", tickmarket, tickwrite);
}
The results are below, where the reported values from MarketSeries.TickVolume and manually counted ticks are different:

This is in the latest public beta v3.5, backtested on tick data from server (not the default m1 bars).
Am I mistaken or should these values be the same?
