Why this isn't compiling? only few lines of code..

 
int start()
  {
  
  int ABUY;
  int ASELL;
  int pos;
  
     if ( ABUY== 2 ) {
             if ( ASELL>0 ){
             for(pos = OrdersTotal()-1; pos >= 0 ; pos--) if (
             OrderSelect(pos, SELECT_BY_POS)                 
             &&  OrderMagicNumber()  == 2                    
             &&  OrderSymbol()       == Symbol() ) {        
             if (!OrderDelete(OrderTicket()) 
             Alert("OrderDelete(",OrderTicket(),") failed: ", GetLastError());
             }
             }
             }
//----
   return(0);
   }

Hi this is a sample of code that I want to use.

Do you know why this isn't compiling?

 
The compiler will tell you what is wrong. Just look at the error messages.
 
int start()
{
  
  int ABUY;
  int ASELL;
  int pos;
  
   if(ABUY== 2) 
   {
      if(ASELL>0)
      {
         int i=OrdersTotal()-1;
         for(pos=i;pos>=0;pos--) 
         {
            if((OrderSelect(pos, SELECT_BY_POS)==true)&&(OrderMagicNumber()==2)&&(OrderSymbol()==Symbol()))                  
            {        
               if (!OrderDelete(OrderTicket()))
               {  
                  //Alert("OrderDelete(",OrderTicket(),") failed: ", GetLastError());
               }
            }
         }
      }
   }

   return(0);
}
Enjoy .
Reason: