Help open parenthesis expected

 

I have no knowledge of coding yet while compiling an ea i managed to reduce the 15 errors to just 2, both are the same  ''   'if' - open parenthesis expected    ''  and when i click on this error it leads me to this point in the code which i cannot rectify      

  void tick22()
 {if {tick22==true} {

and the cusor is just after the curly bracket before if

i changed this code " {if (tick22==true) { "  to the above " {if {tick22==true} { " and reduced 15 errors to 2 errors

can anyone help me please  

 
lion999:

I have no knowledge of coding yet while compiling an ea i managed to reduce the 15 errors to just 2, both are the same  ''   'if' - open parenthesis expected    ''  and when i click on this error it leads me to this point in the code which i cannot rectify      

  void tick22()
 {if {tick22==true} {

and the cusor is just after the curly bracket before if

i changed this code " {if (tick22==true) { "  to the above " {if {tick22==true} { " and reduced 15 errors to 2 errors

can anyone help me please  

 

Next time use SRC button to post the code

 

do this

 void tick22()
 {
  if (tick22==true) 
    {

    }
 }

Be careful when writing parenthesis { and } with ( and ).

Hope you have define tick22 variable before coz if not you will have more error though .

 

 

Thanks very much phi.nuts, .......  for the reply
 

Can anyone help me figure out how to fix this last error, I am having some complications figuring it out?

Expert Advisor Help

 
Grigorv: Can anyone help me figure out how to fix this last error, I am having some complications figuring it out?
  1. Please don't post image, of code. When you post code please use the CODE button (Alt-S)! (For large amounts of code, attach it.) Please edit your post.
              General rules and best pratices of the Forum. - General - MQL5 programming forum
              Messages Editor

  2. Your code is
    if {myAccountEquity - myAccountBalance) > 10 
      (
        CloseAllOrders();
      )
    Look at the documentation.
              Conditional Operator if-else - Operators - Language Basics - MQL4 Reference
    The if statement form is if ( condition ) statement; or if ( condition ) { controlled; statements; }. Your code doesn't have an open parenthesis (per the error message.) It has an open brace.
              Correct brackets/bracers {} - MQL4 and MetaTrader 4 - MQL4 programming forum - Page 2

  3. You have a closing parenthesis without an open
  4. You have no closing parenthesis after the end of your condition.
  5. You have no braces for your controlled statements.
 
whroeder1:
  1. Please don't post image, of code. When you post code please use the CODE button (Alt-S)! (For large amounts of code, attach it.) Please edit your post.
              General rules and best pratices of the Forum. - General - MQL5 programming forum
              Messages Editor

  2. Your code isLook at the documentation.
              Conditional Operator if-else - Operators - Language Basics - MQL4 Reference
    The if statement form is if ( condition ) statement; or if ( condition ) { controlled; statements; }. Your code doesn't have an open parenthesis (per the error message.) It has an open brace.
              Correct brackets/bracers {} - MQL4 and MetaTrader 4 - MQL4 programming forum - Page 2

  3. You have a closing parenthesis without an open
  4. You have no closing parenthesis after the end of your condition.
  5. You have no braces for your controlled statements.
I followed the steps and, here is what it says-
 
Grigorv: ok I did exactly what you described and this is what it says-
No you didn't.
  1. What part of "Please don't post image of code" was unclear?

  2. What part of "if ( condition ) { controlled; statements; }" was unclear?
    if   { myAccountEquitey - myAccountBalance) > 10)}
    
       (
         CloseAllOrders();
       )
  3. What part of "You have a closing parenthesis without an open" was unclear?
 
whroeder1:
No you didn't.
  1. What part of "Please don't post image of code" was unclear?

  2. What part of "if ( condition ) { controlled; statements; }" was unclear?
  3. What part of "You have a closing parenthesis without an open" was unclear?
Files:
 
whroeder1:
No you didn't.
  1. What part of "Please don't post image of code" was unclear?

  2. What part of "if ( condition ) { controlled; statements; }" was unclear?
  3. What part of "You have a closing parenthesis without an open" was unclear?

if {(myAccountEquity - myAccountBalance) >[5])}

    (

      CloseAllOrders ()

    )

 

I asked you to use code button twice. Ignored three times (two images and one text.)

I showed you the difference between parentheses () and braces {} but you refuse to look, read, and learn.

Go to freelance and pay someone. I doubt anyone here can help you.

 
please can someone help me make lot size of this EA to be % of account balance 
Files: