Execution of EA between Ticks

 

Hello,

I want my EA to be executed on every tick and, if there is no new tick for several seconds, to be executed every xxx ms (for example 500ms).

What is the best way to code this in MQL?

Thanks in advance! 

 
jan100:

Hello,

I want my EA to be executed on every tick and, if there is no new tick for several seconds, to be executed every xxx ms (for example 500ms).

What is the best way to code this in MQL?

Thanks in advance! 

New tick means new price change.

Logically, you can't generate your own price. 

 
You can't generate your own price but you may be able to execute parts of your EA by using the OnTimer method. It won't be able to run anything in OnTick unless you can specify it outside of that... like a custom function.
 
jan100: I want my EA to be executed on every tick and, if there is no new tick for several seconds,
Don't double post. Already answered Execution of EA between Ticks (jan100) - MQL4 forum

Execution of EA between Ticks (jan100) - MQL4 forum
Execution of EA between Ticks (jan100) - MQL4 forum
  • www.mql5.com
Execution of EA between Ticks (jan100) - MQL4 forum
 
jan100:

Hello,

I want my EA to be executed on every tick and, if there is no new tick for several seconds, to be executed every xxx ms (for example 500ms).

What is the best way to code this in MQL?

Thanks in advance! 

Exactly, Here is a good question for HFTs, and Dynamic Programming Languages.