I have opened many charts with 1 EA(the same magic number) and I want to have only 1 trade per 1 signal at any given time

 

due to different settings in these EA's I have 2 or more, even 5, 7 the same trade opened at exactly the same time. How to make a restriction in this case? All EA's have the same magic number.

I made restriction: "allows to open only 1 trade" in EA, but it doesn't works, because as I see all EA's works independently.  Please help me.

 
masterofhedge: due to different settings in these EA's I have 2 or more, even 5, 7 the same trade opened at exactly the same time. How to make a restriction in this case? All EA's have the same magic number. I made restriction: "allows to open only 1 trade" in EA, but it doesn't works, because as I see all EA's works independently.  Please help me.

Then add code to your EA so that it first check if any trades exist on any symbol that have same magic number, before placing its own order.

If you need more help, then show your code.

 
Your EA only works within the chart it is loaded in. 
You must use a global variable so that the EAs in the terminal can decide together.

You can send the process step

from my own code example

 

   if(!GlobalVariableSetOnCondition("NMinNum", 0, mincount > 60))
      ErrorCheck((string)__LINE__, __FUNCTION__);

 

 
Mustafa Damgaci #: Your EA only works within the chart it is loaded in. You must use a global variable so that the EAs in the terminal can decide together. You can send the process step

Not correct!

An EA can work on any symbol or time-frame irrespective of what chart it is on. Even services which are not attached to any chart at all can do that.

It can monitor (and interfere) with any trade on any symbol if programmed to do so.

They can communicate between MQL programs in various ways ... Global Terminal Variables, Custom Chart Events, Files, etc.

 
masterofhedge: due to different settings in these EA's I have 2 or more, even 5, 7 the same trade opened at exactly the same time. How to make a restriction in this case? All EA's have the same magic number.

If you have multiple EAs running, you must use lock a mutex, check for open trades, open the trade, and unlock a mutex.

See my Mutex.
          Prevent EA from opening trades at the same time across 2 or more pairs? - MQL4 programming forum - Page%nbsp;2 #11 (2022)

Reason: