Download MetaTrader 5

Unbalance parenthesis

To add comments, please log in or register
Orann
8
Orann  

Hello, I've read a few posts about unbalanced parenthesis, but trying to apply it to my error didn't work!

 

This is my code


            if (Order == SIGNAL_CLOSEBUY && ((EachTickMode && !TickCheck) && (!EachTickMode && (Bars!== BarCount)) 


               OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, MediumSeaGreen);


                + DoubleToStr(Bid, Digits) +

               

            if (!EachTickMode) BarCount = Bars;


               IsTrade == False;


               ))

               continue; 

               


            }

                  }


               }


            }


         }

Keith Watford
Moderator
9644
Keith Watford  
if (Order == SIGNAL_CLOSEBUY && ((EachTickMode && !TickCheck) && (!EachTickMode && (Bars!== BarCount))

You don't need all those brackets

if (Order == SIGNAL_CLOSEBUY && EachTickMode && !TickCheck && !EachTickMode && Bars!== BarCount) 


 + DoubleToStr(Bid, Digits) +

What is this supposed to do?


            if (!EachTickMode) BarCount = Bars;

               IsTrade == False;

Did you mean this or

            if (!EachTickMode)
               {
                BarCount = Bars;
                IsTrade == False;
               }

?


    continue; 

continue what?

To add comments, please log in or register