i need like this function

To add comments, please log in or register
saada
30
saada  

Hi,


i am beginner with mql5


i have this function in MQL4 

double get_Lot_from_last_ord(string SYM, int MAGIC)
{
   double LastLot=0;
   for(int i=OrdersHistoryTotal()-1; i>=0; i--)
   {
      if(OrderSelect(i, SELECT_BY_POS, MODE_HISTORY))
         if(OrderSymbol()==SYM && OrderMagicNumber()==MAGIC)   
         {
            if(OrderProfit()<0 )
            {
               LastLot=OrderLots();
            }
            break;
         }
   }
   return LastLot
}
        


and i need same function in MQL5


Thanks

William Roeder
19628
William Roeder  
saada
30
saada  

Thank you  William Roeder 

it is very helpful .

To add comments, please log in or register