Multicurrency - multitime advisor - page 8

 
Aleksey Vyazmikin:

Renat wrote earlier that when a new tick appears, the Expert Advisor performs calculations and waits for a new tick. If there were more ticks during the data processing period, they are not put in the queue, but are simply skipped, otherwise the terminal would just freeze.

Events of the client terminal

NewTick

The NewTickevent is generated when new quotes come in and is handled by the OnTick() function in attached Expert Advisors. If the OnTick function running on the previous quote is executed when a new one arrives, the incoming quote will be ignored by the Expert Advisor, because the corresponding event is not placed in the EA event queue.

All new quotes that come during the execution of the program are ignored by the program until the next execution of the OnTick() function is finished. After that, the function is started only when a new quote comes.

The NewTick event is generated regardless of whether auto-trading is enabled or disabled (the "Enable/Disable Auto-Trading" button). The prohibition of automatic trading only prohibits sending of trade requests from the Expert Advisor, the Expert Advisor's operation is not stopped.

Banning of automatic trading by pressing the specified button does not interrupt execution of the OnTick() function.

If the hardware did not have enough time to process a new tick, the next one will be skipped. This is known, the question was about intentional skipping of ticks by developers, which surprised me.

 
Valeriy Yastremskiy:

This has always been the case, if the EA's OnTick returnee has not returned, incoming ticks are skipped. The EA only tracks them in tick waiting mode. But I thought you were talking about deliberately missing ticks? It is a bug for me.

So this skipping is intentional, otherwise we could have queued the ticks and counted them far after the trading session was closed.

 
ElenaVVT:

If the iron did not have time to process a new tick, the next one is skipped, it is known, the question was about intentional skipping of ticks by developers, which surprised me.

This is done for any iron to cope and not to lag far behind the market, what's so surprising?

Reason: