ROC
- percentage rate of change

Indicators


SYNTAX roc( ARRAY, periods = 12, absmode = False )
RETURNS ARRAY
FUNCTION Calculates the periods rate-of-change of ARRAY expressed as percentage.
if absmode = False the value returned is 100*( array - ref( array, -periods ) )/ref( array, -periods )
if absmode = True the value returned is 100*( array - ref( array, -periods ) )/abs( ref( array, -periods ) )
EXAMPLE The formula roc( CLOSE, 14 ) returns the 14-period percent rate-of-change of the closing prices.
SEE ALSO  

References:

The ROC function is used in the following formulas in AFL on-line library:

More information:

See updated/extended version on-line.