this
Description
The Rate of Change (ROC) indicator measures rate at which the input data is changing. It can be thought of as the speed or velocity of the input data. froc divides a value by another value a set number of periods in the past. EAS calculates the ROC as a recent price minus by a past price, multiplied by 100. A rising or falling line indicates that the analyzed data is accelerating or decelerating, while a constant ROC value indicates that the rate is constant. If the ROC is constant it means that the data being plotted is either rising or falling at some constant rate. If ROC is zero and constant - price is level.

The example below shows ROC's of both price and volume. Color is an added input to this function. The ROC is plotted as a thick line and an EMA of the ROC is provided as a signal line. This smoothing technique is used in many EAS indicators.



Note that the data for each ROC shown in the chart was input as an EMA. This technique usually helps to smooth input data so the resulting plot is not as choppy. data

The View title displays the name of the indicator and the ROC and EMA signal line lookback periods. The Titlebar Chart Code for this indicator is proc or vroc for price and volume ROC's, respectively. (see EAS Titlebar Chart Codes)

Inputs
p1
is the lookback period for the ROC calculation. p0 defines the EMA signal line lookback period.

Choices for color are: "blue", "red", "green", "black" and "purple". color must be input as a character matrix. The ROC color and signal line color are automatically set by these inputs.

Output Data & Plotting
If returnflag is set to "data" a (b-a+1)-row by 2-column matrix of data will be returned. The output is only valid for data points beyond the lookback period, p0+p1, in time. The first column of the output is the value of the ROC line at any given point in time, the second column is the value of the EMA signal line.

Background Reading
Further information regarding this indicator can be found in the following resources:
Equis.com Price ROC
Equis.com Volume ROC
"Technical Analysis Explained, 3rd Ed", by Pring, McGraw/Hill, 1991