How and/or condition work different between old build and new build

 

Hello guys

i have a indicator if condition like that

           if (Ld_20 < Ld_128 && Ld_20 < Ld_136 && Ld_12 > Ld_128 && Ld_12 > Ld_136 && Ld_128 < Ld_136 || ((Ld_20 > Ld_128 && Ld_20 > Ld_136 && Ld_12 < Ld_128 && Ld_12 < Ld_136 &&
                           Ld_128 > Ld_136) == FALSE)) continue;

 

 Now build show error "check operator precedence for possible error; use parentheses to clarify precedence..."

 

I have question how new build work. How can i modify above code , will work in new build like old build.

can i write this way :

           if (  (Ld_20 < Ld_128 && Ld_20 < Ld_136 && Ld_12 > Ld_128 && Ld_12 > Ld_136 && Ld_128 < Ld_136) ||  ((Ld_20 > Ld_128 && Ld_20 > Ld_136 && Ld_12 < Ld_128 && Ld_12 < Ld_136 &&
                           Ld_128 > Ld_136) == FALSE)   ) continue;

 or this way :

 

           if (Ld_20 < Ld_128 && Ld_20 < Ld_136 && Ld_12 > Ld_128 && Ld_12 > Ld_136 &&  ((Ld_128 < Ld_136) || ((Ld_20 > Ld_128 && Ld_20 > Ld_136 && Ld_12 < Ld_128 && Ld_12 < Ld_136 &&
                           Ld_128 > Ld_136) == FALSE) ) ) continue;
 
Doesn't matter how you write it as long as you explicitly tell the ea to check what and then what and then what, in orders.
 

like second option but you have 1 extra set of () to remove

           if (  (Ld_20 < Ld_128 && Ld_20 < Ld_136 && Ld_12 > Ld_128 && Ld_12 > Ld_136 && Ld_128 < Ld_136) ||  (Ld_20 > Ld_128 && Ld_20 > Ld_136 && Ld_12 < Ld_128 && Ld_12 < Ld_136 &&
                           Ld_128 > Ld_136) == FALSE)  continue;

didn't check compilation though..

 

It is probably not an error, just a warning.

Can't say any more because the code is so wide and I can't be bothered to scroll back and forth 

 
if (  (Ld_20 < Ld_128 && Ld_20 < Ld_136 && Ld_12 > Ld_128 && Ld_12 > Ld_136 && Ld_128 < Ld_136) ||  
(Ld_20 > Ld_128 && Ld_20 > Ld_136 && Ld_12 < Ld_128 && Ld_12 < Ld_136 && Ld_128 > Ld_136) == FALSE)  continue;
widens narrowed ... lol ... XD
 
Code like that means decompiled code.Ask the owner of the source code to give it to you.

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 and Mt4 doesn't allow compilation of decompiled code any more.

 
capilta:

Hello guys

i have a indicator if condition like that

 

 Now build show error "check operator precedence for possible error; use parentheses to clarify precedence..."

 

I have question how new build work. How can i modify above code , will work in new build like old build.

can i write this way :

 or this way :

 

 

Please follow WHRoder advice above and don't post decompiled code again. Thank you.