I'm trying to run 2 similar EA's in 2 separate EURUSD 1M charts, but they only pass 1 order at a time. I realized that to do this, I need to use the magic number.
But now I have another problem. I have code similar to this:
if OrdersTotal() > 0 //i am in a trade
do my calculation and OrderClose
if OrdersTotal() == 0 //i am out of a trade
then open a new trade OrderSend
My problem is that the OrdersTotal function, returns all open orders...therefore both charts. I need to know if an order is open only in the current chart.
Is there any way on doing this?