Download MetaTrader 5

Execution of EA between Ticks

To add comments, please log in or register
jan100
145
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! 

Osama Shaban
1586
Osama Shaban  
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. 

Buddha
6
Buddha  
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.
whroeder1
16820
whroeder1  
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
GBWT094114
3377
GBWT094114  
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.
To add comments, please log in or register