Order information (type "balance")...

 

 Is it possible to avoid order history , type "balance" in my for next loop?  I've searched but found nothing enlightening.  I need to ignore results of type "balance":

// return last closed ticket (returns -1 if not found):
int LastClosedTicket;
{
   datetime last_closed = 0;           // close time of last closed order
   int last_ticket = -1;               // ticket number of last closed order  
     // loop on all orders in history pool and filter
   for (int i=0; i<OrdersHistoryTotal(); i++) {  
      if (!OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)) continue;
      //if (OrderMagicNumber() != MAGIC) continue;
   if (OrderType()<=1) {
         if (OrderCloseTime() > last_closed) {        // here we filter the last closed order
            last_closed = OrderCloseTime();           // save close time and ticket for next iteration
            last_ticket = OrderTicket();
         }
      }
   }

Thank you!!!!!!!!!!! Chika : ) 

 
ohoh7:

 Is it possible to avoid order history , type "balance" in my for next loop?  I've searched but found nothing enlightening.  I need to ignore results of type "balance":

Thank you!!!!!!!!!!! Chika : ) 


Already found answer, here: https://www.mql5.com/en/code/8271...
Reason: