How will it check the symbol?

 
   bool tradeOn=false;
   for (int pos=0; pos<OrdersTotal();pos++){
      if (!OrderSelect(pos, SELECT_BY_POS))  continue;
      if (OrderType()<2) {tradeOn=true;break;} else continue;
   }
    if (tradeOn){
      for (int pos=0; pos<OrdersTotal();pos++){
         if (!OrderSelect(pos, SELECT_BY_POS))  continue;
         if (OrderType()>1) if (OrderDelete(OrderTicket())==true)
             Print("Delete"," Ordertype:",OrderType());
      }
   }
 
MR.: >How will it check the symbol?

It's not, code it.