The function onTick() is called by the local terminal when a new tick arrives. It can happen that for a certain period the broker (liquidity provider) does not offer any prices (e.g. news) or your pc/terminal is buzzy so that some ticks are ignored.
When and what ticks are sent or not is not in our hands.

- www.mql5.com
dear carl, thank you; but my doubt is around the definition of tick, in this case, and new price. I found diffent contextual definitions. what is a new price? A "market order" so when a new offer immediatly match a pending one in the ask/bid book? Or is it a new price put in the waiting orders in the book for which there where no other offers before? Or again, is it a new order placed in waiting condition in the book possibly adding it's required volume to a price for which there were other offers in waiting condition?
Thanks.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I newbie in metatrader 5 and I found documentation on onTick() function and newTick event is somehow ambiguous. My aim is to count the number of executed market orders provided that the broker gives data with this granularity. In other words, consider this example: you have a Seller of 10 contracts at $100 and those 10 contracts are bought by 3 Buyers (one buys 2 contracts, another buys 7 contracts and the 3rd buys 1 contract - all at $100); or by the same Buyer, but in three different moments. I would like to count 3 orders, not 1 order. I wonder if i can use onTick() for this. More particularly, I have not understood if the inTick event is triggered when
The MT5 manual says newTick is generated when "there are new quotes" but I cannot understand which of the 3 above case refers to and if i can use it for the purpose I described above.
Thanks.