how can I get an EA to trade on two pairs at the same time?

 
Please can someone give me a clue as to writing the code to make a n EA trade simulteanously on different pairs?
 
starlimit03:
Please can someone give me a clue as to writing the code to make a n EA trade simulteanously on different pairs?

All of the Technical Analysis and Order functions accept a Symbol parameter. The MarketInfo function and the Time Series Access functions will get you price info for off-chart pairs.



For example, if you pass 'EURJPY' instead of NULL to the OrderSend function it will try to order the 'EURJPY' pair regardless of the chart the EA is on.

 

SL


I wouldn't !

Complicates debugging, testing, etc...


You can always pass values between EA's by global variables, see https://book.mql4.com/variables/globals

  • r just get them to read each others orders state?

My 2c worth

-BB-

 
I a newbie with MT, so I was just wondering that why don't you just open those different pairs on their own charts, and then start the EA for both of them? Wouldn't that be the same anyway?
Reason: