How to open only one order when two graphs give the same signal??

 

Hello I run the same EA on multiple graphics, it executes and order when the conditions are met at the open of a new candle. But sometimes more than one pair gives the signal at the same time resulting in two open order at exactly the same time, as shown in the picture.

Is there anyway to remedy this and prevent one of the orders from happening?

Files:
twoentries.JPG  26 kb
 
Modify the code. Use a mutex, check for open order, open, and release.
          Prevent EA from opening trades at the same time across two or more pairs? (Steve) - MQL4 programming forum
 
William Roeder:
Modify the code. Use a mutex, check for open order, open, and release.
          Prevent EA from opening trades at the same time across two or more pairs? (Steve) - MQL4 programming forum

ok thank you.

But should I need these files as well?


 
ovatsug:

ok thank you.

But should I need these files as well?


There is no problem if you are including libraries that you are not going to use.