Unbalanced Parenthesis - page 2

 
WHRoeder:

thank you for helping but the code itself has changed since the first hit on this topic. anyways very kind to anyone to help out I can code but when it comes to find these things I just don't see my own errors it's good to have someone to help out on it.
 
I have the unbalanced error and parentheses error kindly someone help me in this it's really urgent also have OnCalculate error 
Files:
 
Simon Gniadkowski #:

Check this (

im having a similar problem with my code can you help me?

i wrote a code and then under that i just added a code that i will show now and it gives me unexpected end of program and semicolon expectd at the end where it says monitor tp after it

     int start()


  {   int StopMultd=10;

   double TP=NormalizeDouble(TakeProfit*StopMultd,Digits);

   

   

 //-------------------------------------------------------------------+

//Check open orders

//-------------------------------------------------------------------+

if(OrdersTotal()>0){

  for(int i=1; i<=OrdersTotal(); i++)          // Cycle searching in orders

     {

      if (OrderSelect(i-1,SELECT_BY_POS)==true) // If the next is available

        {

          if((MonitorTakeProfit==true)&&(TakeProfit>0)&&(OrderMagicNumber()==0)){ // monitor tp

          

                // Calculate take profit

                double tpb=NormalizeDouble(OrderOpenPrice()+TP*Point,Digits);

                double tps=NormalizeDouble(OrderOpenPrice()-TP*Point,Digits);

                    

                Comment("Modifying take profit");

                if((OrderType()==OP_BUY)&&(OrderTakeProfit()==0)&&(OrderSymbol()==Symbol()))

                if((OrderType()==OP_SELL)&&(OrderTakeProfit()==0)&&(OrderSymbol()==Symbol()))


          } // monitor tp

          

         

          Comment("");

        }

     }

}


     //+------------------------------------------------------------------+

                                                                        }

   


 
ToMaTo #:

im having a similar problem with my code can you help me?

i wrote a code and then under that i just added a code that i will show now and it gives me unexpected end of program and semicolon expectd at the end where it says monitor tp after it

This code seems Old; it is using the start() Event instead of OnTick(). You should change that and use #property strict.
You have 2 empty if statements that are preventing the program to compile.
Align your code and look. 

 
ToMaTo #:


1) read the rules for posting in the forum.
2) format with the CODE button.
3) DO NOT hijack another OP's thread.
4) post more of your code if you want help.

 
5) The last closing bracket closes the if(OrdersTotal()>0){. Delete that line, so it closes the start(). It is unnecessary, if the total is zero, the for loop does nothing.
Reason: