Absolute Value Function - ABS()

Author: Optuma Team Last updated: Oct 25, 2018 23:43

To change negative values to positive use the ABS() function. This example calculates the 5 day average of the absolute value of the daily rate-of-change:

//Calculate the absolute value of the daily ROC  
V1 = ABS(ROC(BARS=1));

//Calculate the moving average of variable V1  
MA(V1, CALC=Close, BARS=5)