The Rate of Change (ROC) provides a percentage that the instrument's price has changed over the specified period.

 

Syntax:

RateOfChange ( series, bars )

 

Parameter:

Description:

series

Name of data series.

bars

The number of bars over which to find the rate of change

 

Returns:

The rate of change over the specified number of bars.

 

Example:

'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'  Update Indicators Script
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'  Bar_ Count = 21 - Parameter - Lookback enabled
'  Calculates Rate of Price over price period length.
ROC_Close = RateOfChange ( instrument.close, Bar_Count)      
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

OR

 

RateOfChange_Sugar_21-Bar_Dialog

Chart Display:

RateOfChange_Sugar_21-Bar

 

Links:

 

 

See Also:

 

 


 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software