A probleme with error processing !!

 

This code compiles with NO errors

When i add the error analysis cycle.




               else
               {//Trend DOWN
                  nbr_pos_EA++;
                  magic++;
                  tab_pos[nbr_pos_EA - 1] = OrderSend(SYMBOL,OP_SELL,LOTS,Bid,3,Bid-(TP*2*Point),Bid+(TP*Point),"FX-HEDGING-E/U-BUY",magic);
                                  if (ticket>0) // Got it!:)
                              {
                                 Alert("SELL");
                                 break; // Exit cycle
                              }
                           //------------------------------------------------------------------------- 8 --
                              int Error=GetLastError(); // Failed :(
                              switch(Error) // Overcomable errors
                              {
                                 case 129:Alert("Invalid price. Retrying..");
                                 RefreshRates(); // Update data
                                 continue; // At the next iteration
                                 case 135:Alert("The price has changed. Retrying..");
                                 RefreshRates(); // Update data
                                 continue; // At the next iteration
                                 case 146:Alert("Trading subsystem is busy. Retrying..");
                                 Sleep (500); // Simple solution
                                 RefreshRates(); // Update data
                                 continue; // At the next iteration
                              }
                                  switch(Error) // Critical errors
                                  {
                                         case 2 : Alert("Common error.");
                                         break; // Exit 'switch'
                                         case 5 : Alert("Outdated version of the client terminal.");
                                         break; // Exit 'switch'
                                         case 64: Alert("The account is blocked.");
                                         break; // Exit 'switch'
                                         case 133:Alert("Trading fobidden");
                                         break; // Exit 'switch'
                                         default: Alert("Occurred error ",Error);// Other alternatives 
                                  }
                              break; // Exit cycle
                  
               }//end else/if Trend analysis
               
            }//end if Time analysis
            else
            {
               return(0);
            }
            
         }//end else/if nbr_pos_EA > 0

      }// end if (status == true)
          else
      {
         Alert("the status is false");
         return(0);//end of special function start()
      }//end else /if status == true
  
  }// end special function start()


I get this errors:

Compiling 'FX-HEDGING-EURUSD.mq4'...
'break' - 'break' or 'continue' used within some cycle only C:\Program Files\MetaTrader\experts\FX-HEDGING-EURUSD.mq4 (228, 13)
'continue' - 'break' or 'continue' used within some cycle only C:\Program Files\MetaTrader\experts\FX-HEDGING-EURUSD.mq4 (236, 13)
'continue' - 'break' or 'continue' used within some cycle only C:\Program Files\MetaTrader\experts\FX-HEDGING-EURUSD.mq4 (239, 13)
'continue' - 'break' or 'continue' used within some cycle only C:\Program Files\MetaTrader\experts\FX-HEDGING-EURUSD.mq4 (243, 13)
'break' - 'break' or 'continue' used within some cycle only C:\Program Files\MetaTrader\experts\FX-HEDGING-EURUSD.mq4 (257, 10)
'else' - unexpected token C:\Program Files\MetaTrader\experts\FX-HEDGING-EURUSD.mq4 (262, 13)
'else' - unexpected token C:\Program Files\MetaTrader\experts\FX-HEDGING-EURUSD.mq4 (270, 4)
7 error(s), 0 warning(s)