Trailingstop won't compile!!

 

Working on trailing stop..

  This doesn't compile for some reason! Been trying to figure it out for way too long and really would love this piece of code!

      The only thing that I was weary about was the use of parenthesis:

//+------------------------------------------------------------------+
//|                                                 trailingstop.mq4 |
//|                        Copyright 2013, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright 2013, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"
extern int TrailingStart=30;
extern int TrailingStop=5;
extern int Magic=1234;
string Order_Comment="";
extern color SellArrowColor=Blue;
extern color BuyArrowColor=Red;

//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//----
      int Cnt;
   double stoplossPT=35, takeprofitPT=150, 
          trailstopPT=5, trailstartPT=35, 
          openorderPT=1.04221,
          trailstopP;
     bool trailentry?=true, Debug=false;
     
   //point decimal
   if(Digits==3) { stoplossPT=stoplossPT * 0.010; takeprofitPT=takeprofitPT * 0.010; trailstartPT=trailstartPT * 0.010; trailstopPT=trailstopPT * 0.010;
      } /*0.35 & 0.150 & 0.050 & 0.350*/
   if(Digits==5) { stoplossPT=stoplossPT * 0.00010; takeprofitPT=takeprofitPT * 0.00010; trailstartPT=trailstartPT * 0.00010; trailstopPT=trailstopPT * 0.00010;
      } /*0.00350 & 0.01500 & 0.00050 & 0.00350*/ 
   if(Debug) {Print(stoplossPT+" "+trailstartPT+" "+trailstopPT+" "+trailstartPT);}
   
   //trail
   for(int h; Cnt = OrdersTotal() - 1; h >= 0; h--) 
      {
      if(OrderSelect(h, SELECT_BY_POS, MODE_TRADES) == True && TrailingStart > 0 || TrailingStop > 0) 
         {
         if(OrderMagicNumber() == Magic && OrderComment() == Order_Comment) 
            {//-- sell.
            if( OrderType()==OP_SELL && ( OrderOpenPrice() - Ask ) >= trailstartPT ) 
               { //-- sell open and able to trail it
               if(trailentry?) 
                  { //sl begins profitable
                  if(trailstopP != Ask + ( trailstartPT - trailstopPT) {return(0);}
                  OrderModify(OrderTicket(), OrderOpenPrice(), Ask + ( trailstartPT - trailstopPT ), OrderTakeProfit(), 0, SellArrowColor);
                  trailstopP = Ask + ( trailstartPT - trailstopPT );
                  }
               else 
                  { //sl begins loosing
                  if( trailstopP != OrderOpenPrice() - Ask) {return(0);}
                  OrderModify(OrderTicket(), OrderOpenPrice(), MathAbs(OrderOpenPrice() - Ask) + (trailstartPT - trailstopPT), OrderTakeProfit(), 0, SellArrowColor);
                  trailstopP = OrderOpenPrice() - Ask;
                  }
               }
            if( OrderType()==OP_BUY && ( Bid - OrderOpenPrice() ) >= trailstartPT ) 
               {//-- buy.
               if(trailentry?) 
                  { //sl begins profitable
                  if(trailstopPT != Ask + ( trailstartPT - trailstopPT) return(0);
                  OrderModify(OrderTicket(), OrderOpenPrice(), Ask + ( trailstartPT - trailstopPT ), OrderTakeProfit(), 0, SellArrowColor);
                  trailstopPT = Ask + ( trailstartPT - trailstopPT );
                  }
               else 
                  { //sl begins loosing
                  if( trailstopPT != (OrderOpenPrice() - Ask) ) {return(0);}
                  OrderModify(OrderTicket(), OrderOpenPrice(), MathAbs(OrderOpenPrice() - Ask) + (trailstartPT - trailstopPT), OrderTakeProfit(), 0, SellArrowColor);
                  trailstopPT = OrderOpenPrice() - Ask;
                  }
               }
            }
         }
      }
//----
   return(0);
  }
//+------------------------------------------------------------------+
Files:
 

So you have an error message

what did it say ??? 

Check if all your   '('     have been closed    with   ')'

2 lines wrong  in your code  

 
deVries:

So you have an error message

what did it say ??? 

Check if all your   '('     have been closed    with   ')'

2 lines wrong  in your code  


yes sir, you are exactly right because now it compiles.
thanks so much

Reason: