Download MetaTrader 5

EA called for every single ticks

To add comments, please log in or register
Find out the latest MQL5.community news!
Tamas Csabina
25
Tamas Csabina 2014.11.04 20:39 

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
6593
Carl Schreiber 2014.11.04 21:22  
I think you have to use an endless loop checking each symbol individually or you use OnTimer()
Simon Gniadkowski
Moderator
18001
Simon Gniadkowski 2014.11.04 22:33  
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
14519
whroeder1 2014.11.05 01:24  
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