OnTick() is it always complete process inside function?

 

Hi There,

I'm wondering something, now I'm developing EA that would normally check Daily Trend and calculate many things with H1,M15.

mostly data come from iClose(), iHigh() by multi Timeframe, then it will check with current opened order and process with some Indicator. 

I notice sometimes market move very fast like News event, etc, so our function inside OnTick() that I mentioned will it be ready for every time every Tick to execute my Order function?

If it not how can we know that? what it will happen?

Thank you.

 
You question is unintelligible. If a tick is received while OnTick is running it will be ignored.
 
whroeder1:
You question is unintelligible. If a tick is received while OnTick is running it will be ignored.


I'm a newbie, the last coming Tick will be proceed or the first Tick that is running incomplete function will be keep process? 

Thank you whroeder

 

OnTick() will run when a new tick is received.

If another tick arrives while OnTick() is still running, the new tick is ignored i.e. another OnTick() call does not get queued to run afterwards.

From the documentation:

NewTick

The NewTick event is generated if there are new quotes, it is processed by OnTick() of Expert Advisors attached. In case when OnTick function for the previous quote is being processed when a new quote is received, the new quote will be ignored by an Expert Advisor, because the corresponding event will not enqueued.

All new quotes that are received while the program is running are ignored until the OnTick() is completed. After that the function will run only after a new quote is received. The NewTick event is generated irrespective of whether automated trade is allowed or not ("Allow/prohibit Auto trading" button). The prohibition of automated trading denotes only that sending of trade requests from an Expert Advisor is not allowed, while the Expert Advisor keeps working.

The prohibition of automated trading by pressing the appropriate button will not stop the current execution of the OnTick() function.

 
honest_knave:

OnTick() will run when a new tick is received.

If another tick arrives while OnTick() is still running, the new tick is ignored i.e. another OnTick() call does not get queued to run afterwards.

From the documentation:

Thank you very much.

Reason: