Download MetaTrader 5

EA called for every single ticks

To add comments, please log in or register
Tamas Csabina
25
Tamas Csabina  

Hello Experts!

Is it possible to create an EA whose onTick() function is called whenever a new tick arrives, no matter what is the currency of that particular tick? Based on my limited mql knowledge, an EA is only 'listening' on the chart where it is connected to. So if I place an EA on the EURUSD chart, the EA's onTick() will be called whenever there is a new EURUSD tick comes.

Is there a way to create an kind of ultimate onTick() function, that will be called for every tick that comes into the terminal?


Thanks in advance.

Carl Schreiber
7355
Carl Schreiber  
I think you have to use an endless loop checking each symbol individually or you use OnTimer()
Simon Gniadkowski
Moderator
18035
Simon Gniadkowski  
tcsabina:

Hello Experts!

Is it possible to create an EA whose onTick() function is called whenever a new tick arrives, no matter what is the currency of that particular tick? 

No,  you cannot even do it for the currency pair that the EA is on let alone other currency pairs . . . your EA will miss some ticks sometimes,  perhaps very often.  Write some code and discover how many ticks you are missing,  you may be very surprised.
whroeder1
16077
whroeder1  
tcsabina: Is it possible to create an EA whose onTick() function is called whenever a new tick arrives, no matter what is the currency of that particular tick?
Yes, create an EA that processes the current chart only (OnTick.) Then put it on multiple pairs. Done.
To add comments, please log in or register