info of pending orders.

 

hola.

please i need help.how can i get information of pending order as price.

is there a function to do that as OrderOpenPrice().


 

OrderSelect(orderTicket, SELECT_BY_TICKET);

double price = OrderOpenPrice();

 
forexCoder:

OrderSelect(orderTicket, SELECT_BY_TICKET);

double price = OrderOpenPrice();



thank you for your help

but the problem is that i have more than one pending order an how can i check one by one.

 
// Function checks existing open pending orders. To be used on program start / restart , reconnection and so on. Checks orders by magic number.
void CheckExistingOpenPendings(){

   for(int i = OrdersTotal() - 1; i >= 0 ; i--){
      if(!OrderSelect(i, SELECT_BY_POS))     continue;
      if(OrderSymbol() != Symbol())          continue;
      if(OrderMagicNumber() != PROGRAM_NUMBER) continue;
      if(OrderType() == OP_BUY || OrderType() == OP_SELL) continue;
      
      double price = OrderOpenPrice();
      // have fun with the price
      ...
   }
   
   return;
}

Program_number is a global int var that is unique to each EA.

Reason: