Arithmetic Operations
Overview
MQL4 supports standard arithmetic operations for calculations.Operators
+ (addition), - (subtraction)- (unary negation)* (multiplication), / (division)% (remainder of division)++ (adds 1 to variable)-- (subtracts 1 from variable)Increment/Decrement Behavior
++i, --k):** Applied to the variable *before* it's used in an expression.i++, k--):** Applied to the variable *after* it's used in an expression.**MQL4 Implementation:** The postfix increment/decrement is applied to the variable *after* the entire expression is evaluated.
Constraints
Related Topics
Previous
arrow_back
Expressions