I noticed this a day I backtested a bot which is tick sensitive. At every tick, desitions based on global P/L are made. For example: close trade if there's a 0.50 profit and open another again... or vice versa if its a loss then close and open another again. If there's a movement which changes my P/L to .40 then .55 then .45 there would exist a closed trade in profit and a trade opened. but if the data doesn't inlude the 2nd tick then the trade will still be open (.4->.45) the close trigger will never be executed. That's why ticks does affect the performance of the equity curve.
So i backtested it and i had an unusual result for just a period of time... This was somepoint between June 2015 and August 2015
So I did a similar procedure Cysecbin did... I exported the difference between the Ticks processed by the bot vs the MarketSeries.TickVolume to a .txt and i got interesting results...
Statistically the results are these, seems like all the time ticks processed are only the 80%-60% of the real ticks existed. The only moment the majority of real ticks were processed (90%-100%) happened during these 2 months at 2015, which reproduced almost 20k trades resulting in a huge profit for my algorithm, affecting the results dramatically...
I would like to know how to respond to this situation...
By design OnTick() will trigger only once if both bid and ask change. However TickVolume will add to the volume two ticks for both bid and ask price changes. A more accurate way to calculate and compare tick volume is the following
private int TickVolume;
private decimal LastBid;
private decimal LastAsk;
protected override void OnTick()
var bid = (decimal)Symbol.Bid;
var ask = (decimal)Symbol.Ask;
if (bid != LastBid)
if (ask != LastAsk)
LastBid = bid;
LastAsk = ask;
protected override void OnBar()
Print(MarketSeries.TickVolume.Last(1) + " vs " + TickVolume + " counted.");
TickVolume = 0;