MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  Basics  Operations & Expressions  Operations of relation

 

The logical value FALSE is represented with an integer zero value, while the logical value TRUE is represented with any value differing from zero.
The value of expressions containing operations of relation or logical operations is 0 (FALSE) or 1 (TRUE).

True if a equals b                        a == b;
True if a does not equal b                a != b;
True if a is less than b                  a < b;
True if a is greater than b               a > b;
True if a is less than or equals b        a <= b;
True if a is greater than or equals b     a >= b;

Two unnormalized floating-point numbers cannot be linked by == or != operations. That is why it is necessary to subtract one from another, and the normalized outcome needs to be compared to null.