Error - check operator precedence for possible error; use parentheses to clarify precedence

 

 Hey guys im getting the error message -

 check operator precedence for possible error; use parentheses to clarify precedence

 

FOR THE LINE

 

 if (!All_Trendline_Alert && ObjectName(li_28) != High_TL_Name || ObjectName(li_28) != Low_TL_Name) continue;

 

can somebody tell me what im doing wrong as im new to coding.

 

Thanks In advance 

 

The operator precedence in logical expressions has changed recently. Though this expression compiles, the compiler detected your expression is probably affected by the recent change. So include some parentheses to specify the precedence clearly.

And an advice: using variable names like "li_28" is sign of piracy (stolen code), avoid them.

 
  1. This can be interpreted two different ways. Always use parentheses when mixing ands and ors.
    if (!All_Trendline_Alert && ObjectName(li_28) != High_TL_Name || ObjectName(li_28) != Low_TL_Name) continue;
    
    if((!All_Trendline_Alert && ObjectName(li_28) != High_TL_Name)|| ObjectName(li_28) != Low_TL_Name) continue;
    
    if (!All_Trendline_Alert &&(ObjectName(li_28) != High_TL_Name || ObjectName(li_28) != Low_TL_Name))continue;

  2. Ovo: And an advice: using variable names like "li_28" is sign of piracy (stolen code), avoid them.
    Variables like Li_28 are a sign of decompiled (pre-build 600) code.

    Decompiled code is stolen code. Either you are a thief, a fence, or the receiver of stolen (intellectual) property. Either way we will not be an accomplice after the fact to theft. See also https://www.mql5.com/en/forum/134317

    If you post decompiled code again, you will likely be banned.

    Don't tell us you found it on the 'net: if someone stole your bank details and uploaded them on to the internet, is it OK for everyone to use them because "someone uploaded it, I don't know why I can't use that"?

     

    same issue for me 

    For this line shows the warning "check operator precedence for possible error; use parentheses to clarify precedence"

    if (Ld_32 < 0.0 && Ld_44 > 0.0 && Ld_32 < 3.0 * ((-Ad_12) * Gd_352) || Ld_44 > 3.0 * (Ad_12 * Gd_352))

    Somebody please help me how to solve this.

    Thanks in advanced.. 

     
    sakib134:

    same issue for me 

    For this line shows the warning "check operator precedence for possible error; use parentheses to clarify precedence"

    if (Ld_32 < 0.0 && Ld_44 > 0.0 && Ld_32 < 3.0 * ((-Ad_12) * Gd_352) || Ld_44 > 3.0 * (Ad_12 * Gd_352))

    Somebody please help me how to solve this.

    Thanks in advanced.. 

    Were you too lazy to actually READ the 3 posts on this thread prior to your post?

    You are using decompiled (stolen code) and the title even gives you the answer to your problem - use parentheses to clarify precedence!

     
    WHRoeder:
    1. This can be interpreted two different ways. Always use parentheses when mixing ands and ors.
    2. Ovo: And an advice: using variable names like "li_28" is sign of piracy (stolen code), avoid them.
      Variables like Li_28 are a sign of decompiled (pre-build 600) code.

      Decompiled code is stolen code. Either you are a thief, a fence, or the receiver of stolen (intellectual) property. Either way we will not be an accomplice after the fact to theft. See also https://www.mql5.com/en/forum/134317

      If you post decompiled code again, you will likely be banned.

      Don't tell us you found it on the 'net: if someone stole your bank details and uploaded them on to the internet, is it OK for everyone to use them because "someone uploaded it, I don't know why I can't use that"?

      Good to see the moderators taking a strong stance against this on the forum.

      It's a shame that the  MQL5 team seem to have a more lax attitude to dodgy vendors "fencing" decompiled and stolen products on the marketplace.

      Reason: