Login Page - Create Account

Technical Studies Reference


Rate of Change Oscillator Type II

This study calculates and displays a Rate of Change Oscillator Type II (ROC-II) of the data specified by the Input Data High and Input Data Low Inputs. This is an oscillator that was developed by Thomas DeMark, and it is closely related to the Rate of Change Oscillator Type I. See the documentation for that study for an explanation of the notation used here.

Let the Input Data High and Input Data Low Inputs be denoted as \(X^{(H)}\) and \(X^{(L)}\), respectively, and let \(X^{(H)}_t\) and \(X^{(L)}_t\) be their respective values at Index \(t\). Let the Inputs High Threshold and Low Threshold be denoted as \(y^{(H)}\) and \(y^{(L)}\), respectively.

The Rate of Change Oscillator Type II at Index \(t\) is denoted as \(ROC^{(II)}_t\left(X, X^{(H)}, X^{(L)}, n_{ROC}, y^{(H)}, y^{(L)}\right)\), and it is displayed for \(t \geq n_{ROC}\) as follows.

\(ROC^{(II)}_t\left(X, X^{(H)}, X^{(L)}, n_{ROC}, y^{(H)}, y^{(L)}\right) =\left\{ \begin{matrix} 100\cdot\frac{X^{(H)}_t}{X^{(H)}_{t - n_{ROC}}} & ROC^{(I)}_t(X,n_{ROC}) > y^{(H)} \\ ROC^{(I)}_t(X,n_{ROC}) & y^{(L)} \leq ROC^{(I)}_t(X,n_{ROC}) \leq y^{(H)} \\ 100\cdot\frac{X^{(L)}_t}{X^{(L)}_{t - n_{ROC}}} & ROC^{(I)}_t(X,n_{ROC}) < y^{(L)} \end{matrix}\right .\)

This notation will become more cumbersome as we proceed, so we will omit the function parameters when referring to ROC-I going forward.

Let the Smoothing Length Input be denoted as \(n_S\), where \(n_S \leq n_{ROC}\). If the Use Smoothing? Input is set to Yes, then the following Simple Moving Average replaces the normal ROC-II Oscillator. It is displayed for \(t \geq n_{ROC} + n_S - 1\).

\(SMA_t\left(ROC^{(II)}, n_{MA}\right)\)

Note: Depending on the setting of the Input Smoothing MA Type, the Simple Moving Average in the above function could be replaced with an Exponential Moving Average, a Linear Regression Moving Average, a Weighted Moving Average, a Wilders Moving Average, a Simple Moving Average - Skip Zeros, or a Smoothed Moving Average.

Let the Average ROC-II MA Length Input be denoted as \(n_{MA}\), which need not be smaller than \(n_{ROC}\). If the Use Moving Average? Input is set to Yes, then the ROC-II Subgraph is replaced with the following.

  • \(SMA_t\left(ROC^{(II)},n_{MA}\right)\) if Use Smoothing? is set to No. This is displayed for \(t \geq n_{ROC} + n_{MA} - 1\).
  • \(SMA_t\left(SMA\left(ROC^{(II)},n_S\right),n_{MA}\right)\) if Use Smoothing? is set to Yes. This is displayed for \(t \geq n_{ROC} + n_S + n_{MA} - 2\).

Note: Depending on the setting of the Input Average ROC-II MA Type, the Simple Moving Averages in the above functions could be replaced with Exponential Moving Averages, Linear Regression Moving Averages, Weighted Moving Averages, Wilders Moving Averages, Simple Moving Averages - Skip Zeros, or Smoothed Moving Averages.

This study also displays horizontal lines at levels determined by the Overbought Line Value and Oversold Line Value Inputs. The Default values of these inputs are \(102.5\) and \(97.5\), which is the recommended setting for Historical charts. For Intraday charts with time scales under \(30\) minutes, it is recommended that these be changed to \(100.25\) and \(99.75\), respectively.

Let the Input Arrow Offset Percentage be denoted as \(k\).

If the ROC-II breaks out above the Overbought Line for \(n_D\) chart bars or more, then a green Down Arrow appears above the ROC-I Subgraph at a horizontal location \(n_D\) bars from the left of where the breakout occurred. The vertical position of the arrow is given by \(ROC^{(I)}_T(X,n_{ROC}) + \frac{k}{100} \cdot ROC^{(I)}_T(X,n_{ROC})\), where \(T\) is the value of the Index where the arrow is drawn.

If the ROC-II breaks out below the Oversold Line for \(n_D\) chart bars or more, then a red Up Arrow appears below the ROC-I Subgraph at a horizontal location \(n_D\) bars from the left of where the breakout occurred. The vertical position of the arrow is given by \(ROC^{(I)}_T(X,n_{ROC}) + \frac{k}{100} \cdot ROC^{(I)}_T(X,n_{ROC})\), where \(T\) is the value of the Index where the arrow is drawn.

Inputs

Spreadsheet

The spreadsheet below contains the formulas for this study in Spreadsheet format. Save this Spreadsheet to the Data Files Folder.

Open it through File >> Open Spreadsheet.

Rate_of_Change_Oscillator_Type_II.450.scss


*Last modified Monday, 03rd October, 2022.