Help!!! end_of_programme- unbalanced left parenthesis

 

Hello everyone,

i got this code uploaded by another member,but after i modified it, i got the error below

'\end_of_program' - unbalanced left parenthesis

i have attached the modified code.

kindly help me out.

thanks
Files:
 

Modify one section at the time and compile it,

that way you know where the error is


Good luck

 

Use the remark delimiters to block out large chunks at a time

/*

//// big chunk of code

*/


or just format your code like this - which will perform better, be easier to read and check, and actually then compile....

//+------------------------------------------------------------------+
//|                                                                  |
//|                      Copyright © 2010,                           |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright " www.Forexyangu.com"
#property link      "http://www.metaquotes.net"

//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
/*****************************************************-----READ THIS-------******************************************************
 *******************************************************************************************************************************/
 //-----------------------------------------------------------------------------------------------------------------------------
/*DONATE TO SUPPORT MY FREE PROJECTS AND TO RECEIVE NON OPEN PROJECTS AND ADVANCED VERSIONS OF EXISTING PROJECTS WHEN AVAILABLE: 
//------------------------------------------------------------------------------------------------------------------------------
__my moneybookers email is admin@forexyangu.com anyone can easily join moneybookers at www.moneybookers.com and pay people via their 
email through numerous payment methods__*/
//------------------------------------------------------------------------------------------------------------------------------
//SUPPORT AND INQUIRIES EMAIL:        admin@forexyangu.com
//------------------------------------------------------------------------------------------------------------------------------
/*******************************************************************************************************************************
 *************************************************--------END------*************************************************************/
extern string DonateTo ="Moneybookers: admin@forexyangu.com";
extern int RunIntervalSeconds =1; //Run EA in intervals of... seconds
extern double Step    =0.02;   //Parabolic setting
extern double Maximum =0.2;    //Parabolic setting
extern string ContactMe ="admin@forexyangu.com"; // support email

 
 

//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+


int start()
  {
  //alert criteria
   
   
 if (iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,1) <=iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_SIGNAL,1))
   if((iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,0)>iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_SIGNAL,0)) || (iStochastic(NULL,0,14,3,3,MODE_SMA,0,MODE_MAIN,1)>=iStochastic(NULL,0,14,3,3,MODE_SMA,0,MODE_SIGNAL,1)))
     if(Close[2]>=Open[2])
      if(Close[1]<Open[1])//Signal Buy
 {

   
   PlaySound("alert.wav");
   Alert("Alarm triggered by ",Symbol());
     // Alarm
 
 }



 
 if (iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,1)>=iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_SIGNAL,1))
  if ((iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,0) < iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_SIGNAL,0)) || (iStochastic(NULL,0,14,3,3,MODE_SMA,0,MODE_MAIN,1) <= iStochastic(NULL,0,14,3,3,MODE_SMA,0,MODE_SIGNAL,1)))
   if (Close[2]<=Open[2])
    if (Close[1]>Open[1])//Signal Sell
  {

   
   PlaySound("alert.wav");
   Alert("Alarm triggered by ",Symbol());
      // Alarm 
 

  }


Sleep(RunIntervalSeconds*1000);

//----------
return(0);
  }


Good Luck

-BB-

 

Get Notepad2.......its awesome for finding those missing brackets.

 
Thank you all, for your suggestions, i'm very grateful
 
Your unreadable code
 if ((iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,1)
<=iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_SIGNAL,1))
&&(iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,0)
>iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_SIGNAL,0))
||((iStochastic(NULL,0,14,3,3,MODE_SMA,0,MODE_MAIN,1)
>=iStochastic(NULL,0,14,3,3,MODE_SMA,0,MODE_SIGNAL,1))
&&Close[2]>=Open[2]&&Close[1]<Open[1])//Signal Buy
Simple cleanup
double  m5.1    = iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,1),
        s5.1    = iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_SIGNAL,1),
        m5.0    = iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,0),
        s5.0    = iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_SIGNAL,0),
        m14.1   = iStochastic(NULL,0,14,3,3,MODE_SMA,0,MODE_MAIN,1),
        s14.1   = iStochastic(NULL,0,14,3,3,MODE_SMA,0,MODE_SIGNAL,1);
bool    b2.up   = Close[2] >= Open[2],
        b1.dn   = Close[1] < Open[1];
 if ((m5.1<=s5.1) && (m5.0>s5.0) || ((M14.1>=s14.1) && b2.up && b1.dn)//Signal Buy
    12          1    2         1    23            2                  1 missing )
 
      {// :1                  
         {// :2                                                                
            {// :3

            }// :3 
         }// :2 
      }// :1 

I found that numbering the brackets helps with what can be a very frustrating problem.

Reason: