Can make grid orders for currency pairs groups with each own pip distance

 

I try to make a grid orders I have currency pairs group

string EUR[7] = {"EURAUD","EURCAD","EURCHF","EURGBP","EURJPY","EURNZD","EURUSD"};

I send order all of them as follow

void buy(string &pairs[])
{
   int i;
   int ticket;
   
   for(i=0;i<ArraySize(pairs);i++)
   {
      ticket=OrderSend(pairs[i],OP_BUY,0.01,MarketInfo(pairs[i],MODE_ASK),3,0,0,NULL,98765,0,clrNONE);
      if(ticket <=0)
      {
         Alert("Error on buying " + pairs[i]);
      }
   }

}

buy(EUR)

So one time order open in all currency by calling function

I also want to open grid orders when they go their opposite directions example if one pair go against direction by pip distance 15 So need to count orders and make orders whenever at this distance reach Problem is Can MQL4 call this pairs definitely to open grid orders How can do this thanks

How can select exactly one or two pairs which gone opposite direction by some pip distance and only want to open grid orders for them.

my problem is that

plz help

Timeline for Can make grid orders for currency pairs groups with each own pip distance
Timeline for Can make grid orders for currency pairs groups with each own pip distance
  • stackoverflow.com
Stack Overflow | The World’s Largest Online Community for Developers
 
Remember the ticket numbers for each symbol. For each ticket, test your condition.
 
William Roeder:
Remember the ticket numbers for each symbol. For each ticket, test your condition.
 if(OrderSelect(12470, SELECT_BY_TICKET)==true)

How can mention each order tickets.they all opened by group.

      ticket=OrderSend(pairs[i],OP_BUY,0.01,MarketInfo(pairs[i],MODE_ASK),3,0,0,NULL,98765,0,clrNONE);
need to select each ticket by its symbol ?
 
LONNV: How can mention each order tickets.they all opened by group.need to select each ticket by its symbol ?

What part of "remember" was unclear? Create an array, just like pairs[].

 
William Roeder:

What part of "remember" was unclear? Create an array, just like pairs[].

thanks I got solution