MQL4 Reference Language Basics Operations and Expressions Operations of Relation
Operations of RelationBoolean FALSE is represented with an integer zero value, while the boolean TRUE is represented by any non-zero value. The value of expressions containing operations of relation or logical operations is FALSE (0) or TRUE (1).
The equality of two real numbers can't be compared. In most cases, two seemingly identical numbers can be unequal because of different values in the 15th decimal place. In order to correctly compare two real numbers, compare the normalized difference of these numbers with zero. Example:
See also |