Download MetaTrader 5
To add comments, please log in or register
Join MQL5 Cloud Network. Improve your rating!
el3reef
178
el3reef 2016.08.23 14:08 
double last_order_Type(int magic){
 
   for(int i=OrdersHistoryTotal();i >= 0;i--)
     {
     
         OrderSelect(i,SELECT_BY_POS,MODE_HISTORY); 
         if (OrderMagicNumber() == magic){
             
           break;
         }
 
     }
 
   return OrderType();
}
Keith Watford
Moderator
7969
Keith Watford 2016.08.23 14:19  
Do you have a question?
/
To add comments, please log in or register