Can 1 EA monitor & trade multiple currency pairs from within one chart?

 

I am wondering is it's possible to have a single EA running on any currency pair, but have it monitor multiple currency pairs and respond to triggers as they arise in each pair.

Essentially I want a EA that will poll all pairs of interest, test pre-configured criteria on each one and respond with buy/sell/close/alerts as required.

I suspect this cannot be done, but would be interested to hear if anyone has any ideas as to how to achieve this without having to open a lot of charts and applying the EA to each chart separately mainly in the interest of efficiency (better to have 1 block of code instead of a dozen?)


Thx.

 
in this century everything is possible
 

you can do whatever you want to, but you will get no tick events for currency pairs other then the one you attached your EA to.

i don't know if there is possibility to use timer event in MT4. in MT5 there is.

 
graziani:

you can do whatever you want to, but you will get no tick events for currency pairs other then the one you attached your EA to.

Not true, there is a way to get ticks from all charts, and use it on the chart with EA. I let you find how.

i don't know if there is possibility to use timer event in MT4. in MT5 there is.

Yes, OnTimer() is now implemented for mql4.
 
xennon: I am wondering ... I suspect ...
RTFM, learn to code, and you would know that it's been possible for years.
 
xennon:

I am wondering is it's possible to have a single EA running on any currency pair, but have it monitor multiple currency pairs and respond to triggers as they arise in each pair.


Yes. It is possible.


xennon:

Essentially I want a EA that will poll all pairs of interest, test pre-configured criteria on each one and respond with buy/sell/close/alerts as required.


If you know how to check and test the criteria for one pair, then you can test it on multiple pairs.


xennon:

I suspect this cannot be done, but would be interested to hear if anyone has any ideas as to how to achieve this without having to open a lot of charts and applying the EA to each chart separately mainly in the interest of efficiency (better to have 1 block of code instead of a dozen?)



You suspect it cannot be done? I suspect you are just being lazy and haven't taken the time to read the documentation.

However, I will give you a some help on this subject.

You need to read and study the information on the following pages.

https://book.mql4.com/basics/functions

https://book.mql4.com/variables/arrays

https://docs.mql4.com/basis/operators/for

https://docs.mql4.com/marketinformation

https://docs.mql4.com/trading/ordersend


The problem here isn't that it cannot be done, it's that you haven't bothered to even try and do it.

If you still cannot figure it out after putting forth a serious effort using the information on those pages, then you will probably need to hire someone to do it for you.

 
WHRoeder:
RTFM, learn to code, and you would know that it's been possible for years.

Dude! Do me (and everyone else on this forum) a favour, XXXXX. Alternatively, just XXX and ignore my posts and move on, your comments and opinions are not welcome or even useful. Your attitude and responses to posts, not just my posts, and nearly everyone you make is always the xxx same -- "Learn to code .. BS BS BS". I am however most curious - were you born an xxxx
 
xennon:

...

Please watch your language.

Although I agree with you that the answers of WHRoeder are sometimes inappropriate that gives you no right to insult him and use such language on this forum.

 
WHRoeder:
RTFM, learn to code, and you would know that it's been possible for years.

WHRoeder, I suggest you to change the way you are replying. Not everyone is so experienced and knowledgeable than you about coding. Try not to offend people please.

Thank you.

 
angevoyageur:

xennon: is registrated from januari 2012 and now comes here with this Question ??

looks to me it's time for him to do some research by reading and learning

if he wants to make that EA then he has to come with his attempt if he gets problems making it

it is possible .... after more then 2 years he knows that now for sure

 
deVries:

xennon: is registrated from januari 2012 and now comes here with this Question ??

looks to me it's time for him to do some research by reading and learning

if he wants to make that EA then he has to come with his attempt if he gets problems making it

it is possible .... after more then 2 years he knows that now for sure

If you don't want to reply to his question, don't reply, it's simple. No need to offend people.

And believe me, it's available for me too, if I posted everything I want to post, I have 1000 rating points more, at least.

Reason: