Global variable conflict with multiple EA's running simultaneously

 
If I run more than one instances of the same ea with the same code on my terminal, for example, one on the gbp/usd chart and another on the eur/usd chart, will the global variables declared at the beginning at the program cause a conflict with multiple instances of the ea running simulataneously? Will the ea's running on the gbp/usd chart get confused because it is using the the same global variables that are in the ea running on the eur/usd chart? If so, can I get around this problem by just compiling different versions of the same ea with just different global variable names?
 
forestmyopia wrote >>
If I run more than one instances of the same ea with the same code on my terminal, for example, one on the gbp/usd chart and another on the eur/usd chart, will the global variables declared at the beginning at the program cause a conflict with multiple instances of the ea running simulataneously? Will the ea's running on the gbp/usd chart get confused because it is using the the same global variables that are in the ea running on the eur/usd chart? If so, can I get around this problem by just compiling different versions of the same ea with just different global variable names?

This type of gobal variable is global only to the EA code, ie another EA running exactly the same code can have different global variable values.

Make sure that your code explicitily initialises all global variables such as in the snippet beow, because globals are not re-initialised with events such as chart period change or alteration of input parameters.

Paul

http://paulsfxrandomwalk.blogspot.com/

// global variable initialisation is not reliable
int g_Count=0;

init()
{
   // must initialise here
   g_Count=0;



}
 
phampton wrote >>

This type of gobal variable is global only to the EA code, ie another EA running exactly the same code can have different global variable values.

Make sure that your code explicitily initialises all global variables such as in the snippet beow, because globals are not re-initialised with events such as chart period change or alteration of input parameters.

ok. thanks for the info.

Reason: