Preventing an EA for Relunch

 
EA can create a global variable in the form EAname_Pair_TF
 
Just a note, that reading a Global variable for getting another EA status may fail during terminal launch. As far as all the EAs perform concurrently, multiple of them may access the "free" status from the Global variable before its update. There is no "synchronized" function in MT4 to prevent concurrent access. So far the only solution I know about is using a thread safe method in a DLL.
 
Ovo:
Just a note, that reading a Global variable for getting another EA status may fail during terminal launch. As far as all the EAs perform concurrently, multiple of them may access the "free" status from the Global variable before its update. There is no "synchronized" function in MT4 to prevent concurrent access. So far the only solution I know about is using a thread safe method in a DLL.

Hi isn't that what GlobalVariableSetOnCondition provides? Atomic test and update?



 
ydrol:

Hi isn't that what GlobalVariableSetOnCondition provides? Atomic test and update?


Yes, it definitively could serve the purpose. I never mentioned the function.
 
Thank you Guys for the help, Global Variables Solved the problem.