Using multiple Expert Advisors without conflict

 
I was wondering if you can help me with a problem I am having
with Expert Advisors. My problem is this -
I have designed some EA's which were programmed by a programmer with MQ4
experience. All has turned out fine and EA's are working perfectly
except for one huge problem...I can only run 1 at a time because when
placing more than that on the platform, conflicts occur. I realize that
you can only attach one to a chart at a time but when opening multiple
charts you could put a different EA on each chart which will then run
independently of each other without conflicting just like TradeStation
2000i. Each EA then independently manages only the trades that it has
originally initiated. I'm sure it is just a line or two of code that needs to be inserted someplace but this is beyond me. I have designed these systems from scratch due to the fact I am a trader
but I am not a programmer so please, when you reply, put it into words I
will understand or perhaps a format that I can then send to my
programmer.....he just needed a hint of where to start.
Somebody in tech support elsewhere mentioned something about 'magic numbers'? Make any sense?

Thanks
 
E.g.
int MagicNumber = 220606; // global variable

int putOrder(...)
{
...
    int ticket = OrderSend(Symbol(), op, lots, price, slip, sl, tp, comment, MagicNumber, 0, colour);
...
}

int start()
{
    int cnt = OrdersTotal();
    while(cnt > 0)
    {
        cnt--;
        OrderSelect(cnt, SELECT_BY_POS);
        if (OrderMagicNumber() != MagicNumber)
            return (0);
        if (OrderSymbol() != Symbol())
            return (0);
        ...
    }

   ...

}


The error handling is missing from the example for the sake of simplicity.
You may want to contact me directly at gmailDOTcom, account name is 'mqlexpert'.

 
Thanks Irtron, youre a legend.

I have forwarded it to my programmer who can hopefully sort it out from there.

Kind regards.

FXNorth


E.g.
int MagicNumber = 220606; // global variable

int putOrder(...)
{
...
    int ticket = OrderSend(Symbol(), op, lots, price, slip, sl, tp, comment, MagicNumber, 0, colour);
...
}

int start()
{
    int cnt = OrdersTotal();
    while(cnt > 0)
    {
        cnt--;
        OrderSelect(cnt, SELECT_BY_POS);
        if (OrderMagicNumber() != MagicNumber)
            return (0);
        if (OrderSymbol() != Symbol())
            return (0);
        ...
    }

   ...

}


The error handling is missing from the example for the sake of simplicity.
You may want to contact me directly at gmailDOTcom, account name is 'mqlexpert'.

Reason: