Same EA to different charts

 

I have this issue with my EA , it is working perfectly wen attached to a single chart

but when attached to several charts like (EURUSD, AUDUSD,USDCAD...)

it only excute the first triggered one , and if signal came to another chart it is making it hold until the first on closed.

If someone can help me to figure it out 

I need the EA to work independtly on each chart  

 
sherif abdrabou :

I have this issue with my EA , it is working perfectly wen attached to a single chart

but when attached to several charts like (EURUSD, AUDUSD,USDCAD...)

it only excute the first triggered one , and if signal came to another chart it is making it hold until the first on closed.

If someone can help me to figure it out 

I need the EA to work independtly on each chart  

Please attach your MQL5 code using the button Attach file

 
sherif abdrabou:

I have this issue with my EA , it is working perfectly wen attached to a single chart

but when attached to several charts like (EURUSD, AUDUSD,USDCAD...)

it only excute the first triggered one , and if signal came to another chart it is making it hold until the first on closed.

If someone can help me to figure it out 

I need the EA to work independtly on each chart  

Maybe you are using the same magic number for all the symbols?

 

I would like to add to Keith's statement above ...

  • Possibly using the same magic number (and not checking/filtering for the current symbol in your code), and/or ...
  • waiting for zero positions in the current trade history before placing an order (many newbie coders do this).

It is totally reasonable to use the same magic number across multiple charts as long as your code also checks and filters against the current symbol. If it does not, you will have to use separate magic numbers for each instance.

As for the zero current positions, that is totally wrong, and you should count how many positions are opened filtered by magic number and symbol and decide based on that count.


    Reason: