EA Execution Behavior During Consecutive Ticks in MT5/MT4

[Deleted]  

Hello,

OnTick, the EA starts executing its code, but before it completes executing the full code, the next tick occurs. In this case, what will happen? Will the new tick be ignored until the EA completes the full code execution, or will the EA’s operation be interrupted in the middle by every new tick?

 
anuj71:

Hello,

OnTick, the EA starts executing its code, but before it completes executing the full code, the next tick occurs. In this case, what will happen? Will the new tick be ignored until the EA completes the full code execution, or will the EA’s operation be interrupted in the middle by every new tick?

Code is fully executed from top to bottom in OnTick() upon arrival of each tick unless interrupted by something else, e.g., a code error, disconnection, etc.

There is no default "stop-and-go-back" action in OnTick() for any tick.

[Deleted]  
Ryan L Johnson #:

Code is fully executed from top to bottom in OnTick() upon arrival of each tick unless interrupted by something else, e.g., a code error, disconnection, etc.

There is no default "stop-and-go-back" action in OnTick() for any tick.

You mean, Any new tick will get ignored until the EA complete it full OnTick() code execution and operation. 
 
anuj71 #:
You mean, Any new tick will get ignored until the EA complete it full OnTick() code execution and operation. 

If your code executes slower than the arrival of ticks, "skipped" is more accurate than "ignored until."

There is also OnTimer(), by the way.

[Deleted]  
Ryan L Johnson #:
"skipped" is more accurate than "ignored until."
Got it. So new tick get skipped until the EA OnTick full code execution is completed and ones completed, it will again start with next new tick. I am correct? 
 

Yes.

Just imagine a supermassive tick backlog that could accumulate in a hypothetical "ignored until" scenario.