Documentation / Mathematical

ABS is the mathematical function “Absolute Value” of a number.

Example:

var1 = -12
var2 = 5

myresult = var1 / var2 

myABSresult = ABS(var1 / var2)

RETURN myresult AS "not absolute value", myABSresult AS "absolute value"

Return values are :

myresult = -2.4

myABSresult = 2.4

 

Mathematical function “Arctangent” of a value.

Syntax:

ATAN(value)

Mathemical Cosine Function.

Syntax:

COS(a)

 

Mathematical function “Exponential” of “a” value.

Syntax:

EXP(a)

 

Mathematical function “Neperian logarithm” of ‘a’ value.

Syntax:

LOG(a)

 

Mathematical function “Maximum”. Return the maximal value between two variables a and b.

Syntax:

MAX(a,b)

 

Example:

mmA = average[20](high)
mmB = average[50](high)

result = MAX(mmA,mmB)

RETURN result

 

Mathematical function “Minimum”. Return the minimal value between two variables a and b.

Syntax:

MIN(a,b)

 

Example:

mmA = average[20](low)
mmB = average[50](low)

result = MIN(mmA,mmB)

RETURN result

 

Mathematical function “remainder of the division” of A divided by B

Syntax:

a MOD b

 

Mathematical Function to round “a” to the nearest whole number.

Syntax:

ROUND(a)

 

Example:

i1 = ROC[10](close)

roundedROCvalue = ROUND(i1)

RETURN i1,roundedROCvalue

// i1=9.60 and roundedROCvalue=10

 

Mathematical function “Sign of” of “a” value (positive or negative).

Syntax:

SGN(a)

 


Top