MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  Math & Trig  MathAbs

 
Use the opportunities of
MQL5 in MetaTrader 5
Study the new MQL5 language
Study the new MQL5 language.
Reference is already available
double MathAbs( double value)
Returns the absolute value (modulus) of the specified numeric value.
Parameters:
value   -   Numeric value.
Sample:
  double dx=-3.141593, dy;
  // calc MathAbs
  dy=MathAbs(dx);
  Print("The absolute value of ",dx," is ",dy);
  // Output: The absolute value of -3.141593 is 3.141593