Download MetaTrader 5

Global variables in EA

To add comments, please log in or register
Improve your rating. Execute orders in Freelance service!
Andrew Ang
118
Andrew Ang 2015.09.22 13:43 

Hi, 

 I have written an EA and is running on 2 seperate charts GBP/USD and EURUSD, I assume that there will be 2 seperate instances of the EA running and that both do not share the same variables , global variables included.

One instance running on GBPUSD does not affect the one on EURUSD.

Any comments on this please. Thanks. 

Marco vd Heijden
Moderator
4708
Marco vd Heijden 2015.09.22 13:47  
Correct.
Stuart Browne
5820
Stuart Browne 2015.09.23 00:29  
Correct, if they are only EA global scope.

If they are terminal global scope then they would overwrite each other. 
To add comments, please log in or register