compound ! statement not working

 

Hi gurus, 

i want to isolate a special case so that when it is true, the entire if statement becomes false and is not executed.




if (
        (( A && C) || ( B && D))
        && !( A && B) //i want this to falsify the entire "if" statement when A & B together are both true. 
) ....
        

but Metatrader seems to be interpreting the entire statement as always true as long as 

(( A && C) || ( B && D))

 are true. appreciate any guidance please?

 
JimSingadventure: but Metatrader seems

How To Ask Questions The Smart Way. (2004)
          Don't rush to claim that you have found a bug.
Questions Not To Ask
          My program doesn't work. I think system facility X is broken.

It is almost always your code.

Print your values and prove it.

bool A=…,
     B=…,
     C=…,
     D=…;
PrintFormat("A=%d B=%d C=%d, D=%d, C1=%d C2=%d", A,B,C,D,(A&&C)||(B&&D),!(A&&B) );
if (…
 
William Roeder #:

How To Ask Questions The Smart Way. (2004)
          Don't rush to claim that you have found a bug.
Questions Not To Ask
          My program doesn't work. I think system facility X is broken.

It is almost always your code.

Print your values and prove it.

thanks william, let me try.