MQL4 - automated forex trading   /  

Documentation

Login | Register | Language: ru cn en
Read Financial Magazines in MetaTrader 4 and MetaTrader 5!

MQL4 Reference Math Functions

Mathematical Functions

A set of mathematical and trigonometric functions.

Function

Action

MathAbs

Returns absolute value (modulus) of the specified numeric value

MathArccos

Returns the arc cosine of x in radians

MathArcsin

Returns the arc sine of x in radians

MathArctan

Returns the arc tangent of x in radians

MathCeil

Returns integer numeric value closest from above

MathCos

Returns the cosine of a number

MathExp

Returns exponent of a number

MathFloor

Returns integer numeric value closest from below

MathLog

Returns natural logarithm

MathMax

Returns the maximal value of the two numeric values

MathMin

Returns the minimal value of the two numeric values

MathMod

Returns the real remainder after the division of two numbers

MathPow

Raises the base to the specified power

MathRand

Returns a pseudorandom value within the range of 0 to 32767

MathRound

Rounds of a value to the nearest integer

MathSin

Returns the sine of a number

MathSqrt

Returns a square root

MathSrand

Sets the starting point for generating a series of pseudorandom integers

MathTan

Returns the tangent of a number

MathIsValidNumber

Checks the correctness of a real number