help needed-'\end_of_program' - unbalanced left parenthesis C:\Program Files\MetaTrader 4\experts\dddd.mq4 (149, 1)

 

hello at this code i am taking error below,can you help me about it

'\end_of_program' - unbalanced left parenthesis C:\Program Files\MetaTrader 4\experts\dddd.mq4 (149, 1)

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

<SNIP>

 
pascalboy:

hello at this code i am taking error below,can you help me about it

'\end_of_program' - unbalanced left parenthesis C:\Program Files\MetaTrader 4\experts\dddd.mq4 (149, 1)

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

<SNIP>


Please edit your post . . .


Please use this to post code . . . it makes it easier to read.

 

Your code has many problems . . .

Why the { } braces ?

RefreshRates();

{

double satisfiyati2=MarketInfo("EURUSD",MODE_BID);

if satisfiyati1=>satisfiyati2-50

OrderModify(TicketSell,satisfiyati2,satisfiyati2+100,satisfiyati2-200);

}

return;

why the &&

if (iClose("NULL",0,i))>(iClose("NULL",0,(i+1))  &&    // <----  why the  &&

if (iClose("NULL",0,i))<(iClose("NULL",0,(i+1))

also "NULL" is incorrect . . .

Why RefreshRates() after you have tried to place a trade ?

TicketBuy=OrderSend(Symbol(),0,0.01,Ask,3,Ask-100*Point,Ask+TakeProfitBuy,"alış emri",1);

if(IsTradeAllowed())

RefreshRates();
 
what shall i do then ?
 
pascalboy:
what shall i do then ?
Edit your posts . . . click the SRC button, paste in your code, click Insert
 

This is also incorrect . . .

if (asagitrend=1 && zirve=1)

it should be . .

if (asagitrend == 1 && zirve == 1)
 

When you fix the braces you will get this list of errors . . . (see attached file)

Files:
omer.txt  8 kb
 

The braces issue is here . . . .

         {
         if (iClose("NULL",0,i)) < (iClose("NULL",0,(i+1)) dusen=dusen+1;
         }
         {
         if (iClose("NULL",0,i)) > (iClose("NULL",0,(i+1)) yukselen=yukselen+1;
         }  

and here . . .

if (iClose("NULL",0,i)) < (iClose("NULL",0,(i+1))&&
if (iClose("NULL",0,(i+1)) > (iClose("NULL",0,(i+2))
zirve=1;
if (iClose("NULL",0,i)) > (iClose("NULL",0,(i+1))&&
if (iClose("NULL",0,i)) < (iClose("NULL",0,(i+1))
 

There are a couple of ways of discovering where the unbalanced parenthesis or curly braces might be.

use /* */ to comment out large sections of code and see if it compiles then reduce the size of the commented out area untill you find a small area that has the error.

of you can put the open brace/bracket ( and close ) brace/bracket on separate lines - using a bit of the code *edit that was posted* above it would then look something like

{

if (
    iClose("NULL",0,i)
   )
   <
   (
    iClose("NULL",0,(i+1)  //<<<<<<<<Ooops
   )
    dusen=dusen+1;

}

{

if (
    iClose("NULL",0,i)
   )
   >
   (
    iClose("NULL",0,(i+1)) 
                              //<<<<<<<<Ooops
     yukselen=yukselen+1;

}