can i use these () {} so much ?? - page 4

 

come on, i post already...

becuz all the ppl around me cant help me ...

 
Just in case you idiot decide to delete it again: Here I place a copy of your stupid defunctional code for further reference that you can't delete:
//+------------------------------------------------------------------+
//|                                                   NightMare1.mq4 |
//|                                             Copyright 2012, Abu. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright 2012, Abu."
#property link      "http://www.metaquotes.net"

extern string Name_Expert = "NightMare";
extern double StartHour1 = 0000;
extern double StopHour1  = 0759;
extern double StartHour2 = 0800;
extern double StopHour2  = 1859;
extern double StartHour3 = 1900;
extern double StopHour3  = 2359;
extern double LongTP1  = 80;
extern double ShortTP1 = 80;
extern double longSL1  = 150;
extern double ShortSL1 = 150;
extern double LongTP2  = 180;
extern double ShortTP2 = 180;
extern double longSL2  = 150;
extern double ShortSL2 = 150;
extern double LongTP3  = 50;
extern double ShortTP3 = 50;
extern double longSL3  = 150;
extern double ShortSL3 = 150;
extern double LotSize = 0.1;
extern double MaxOrders = 5;
extern double SafetyPercent = 50;

//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
   if(AccountFreeMargin()<(SafetyPercent/100)*AccountBalance())
   {
   Print("We have no money. Free Margin = ", AccountFreeMargin());
   return(0);
   }
      if(Bars<50)
      {
      return(0);
      }
         if(OrdersTotal()>MaxOrders())
         {
         return(0);
         }
            double diClose0=iClose(NULL,5,0);
            double diMA1=iMA(NULL,5,5,0,MODE_EMA,PRICE_OPEN,1);
            double diClose2=iClose(NULL,5,0);
            double diMA3=iMA(NULL,5,4,0,MODE_EMA,PRICE_OPEN,1);
      
            if (TimeCurrent()>StartHour1())&(TimeCurrent()<StopHour1())
            {
                  if ((diClose0<diMA1))
                  {
                  OrderSend(Symbol(),LongTP1,0.1,Ask,3,Bid-15*Point,Bid+15*Point); //----
                  return(0);
                  }
                     else
                     if ((diClose2>diMA3))
                     {
                     OrderSend(Symbol(),ShortSL1,0.1,Ask,3,Bid-15*Point,Bid+15*Point); //----
                     return(0);
                     } 

            return(0);                      
            }
                     
            if (TimeCurrent()>StartHour2())&&(TimeCurrent()<StopHour2())
            {  
                  if ((diClose0<diMA1))
                  {
                  OrderSend(Symbol(),LongTP2,0.1,Ask,3,Bid-15*Point,Bid+15*Point) //----
                  return(0);
                  }
                     else
                     if ((diClose2>diMA3))
                     {
                     OrderSend(Symbol(),ShortSL2,0.1,Ask,3,Bid-15*Point,Bid+15*Point); //----
                     return(0);
                     }
            return(0);
            }        
            if (TimeCurrent()>StartHour3())&&(TimeCurrent()<StopHour3())
            {
                  if ((diClose0<diMA1))
                  {
                  OrderSend(Symbol(),LongTP3,0.1,Ask,3,Bid-15*Point,Bid+15*Point) //----
                  return(0);
                  }
                     else
                     if ((diClose2>diMA3))
                     {
                     OrderSend(Symbol(),ShortSL3,0.1,Ask,3,Bid-15*Point,Bid+15*Point) //----
                     return(0);
                     }
            return(0);                     
            }
   return(0);
   }
 

okay okay ...

there are 28 error there .. !!

 
anyone can help ??
 

There exist text editors that can highlight matching braces (notepad++ for example), this helps a lot.

And then there also exists software that can reformat the code (the indentation levels) based on the braces it counts, for example this: http://universalindent.sourceforge.net/index.php This helps even more because after proper formatting the structure of your code becomes more clear and prevents future errors. You should apply this after every code snippet you copy/paste from somewhere else into your code to have only one consistent formatting and this makes it easier to count the braces and see where the blocks begin and end.

 
7bit:
There exist text editors that can highlight matching braces (notepad++ for example), this helps a lot. And then there also exists software that can reformat the code (the indentation levels) based on the braces it counts. This helps even more.

what software you mean here?
 
albert_lim83:

what software you mean here?
I edited the above posting, needed a while to search for the link.
 
albert_lim83:
anyone can help ??

learn to code or pay someone. We're not going to code it FOR you. We are willing to HELP you.

People have been helping you to extremes. You have been ABUSING the help here. Asking such elementary questions. Find the missing parentheses on your own. It's above the OrderSend, and took me about 20 seconds with notepad2 to find it.

So I have put you in the troll category and won't help you.

 
7bit:
I edited the above posting, needed a while to search for the link.

the software really can solve my problem ?
 
albert_lim83:

the software really can solve my problem ?
If it were my job to fix your code and/or find the matching braces in your code then the very first thing I would do is to format it correctly in order to be able to actually read it.
Reason: