Download MetaTrader 5

Global variables in EA

To add comments, please log in or register
Andrew Ang
118
Andrew Ang  

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
5119
Marco vd Heijden  
Correct.
Stuart Browne
6097
Stuart Browne  
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