#### Home >> (Table of Contents) Studies and Indicators >> Technical Studies Reference >> Rahul Mohindar Oscillator

# Technical Studies Reference

- Technical Studies Reference
- Common Study Inputs (Opens a new page)
- Using Studies (Opens a new page)

# Rahul Mohindar Oscillator

This study calculates the system of indicators associated with the Rahul Mohindar Oscillator for the data specified by the **Input Data** Input.

Let \(X\) be a random variable denoting the **Input Data**, and let \(X_t\) be the value of the **Input Data** at Index \(t\). Let the Inputs **Length 1**, **Length 2**, **Length 3**, and **Length 4** be denoted as \(n_1\), \(n_2\), \(n_3\), and \(n_4\), respectively. We begin by computing the following sequence of Simple Moving Averages.

\(SMA^{(2)}_t(X,n_1) = SMA_t(SMA(X,n_1),n_1)\)

\(SMA^{(3)}_t(X,n_1) = SMA_t(SMA(SMA(X,n_1),n_1),n_1)\)

\(SMA^{(4)}_t(X,n_1) = SMA_t(SMA(SMA(SMA(X,n_1),n_1),n_1),n_1)\)

\(SMA^{(5)}_t(X,n_1) = SMA_t(SMA(SMA(SMA(SMA(X,n_1),n_1),n_1),n_1),n_1)\)

\(SMA^{(6)}_t(X,n_1) = SMA_t(SMA(SMA(SMA(SMA(SMA(X,n_1),n_1),n_1),n_1),n_1),n_1)\)

\(SMA^{(7)}_t(X,n_1) = SMA_t(SMA(SMA(SMA(SMA(SMA(SMA(X,n_1),n_1),n_1),n_1),n_1),n_1),n_1)\)

\(SMA^{(8)}_t(X,n_1) = SMA_t(SMA(SMA(SMA(SMA(SMA(SMA(SMA(X,n_1),n_1),n_1),n_1),n_1),n_1),n_1),n_1)\)

\(SMA^{(9)}_t(X,n_1) = SMA_t(SMA(SMA(SMA(SMA(SMA(SMA(SMA(SMA(X,n_1),n_1),n_1),n_1),n_1),n_1),n_1),n_1),n_1)\)

\(SMA^{(10)}_t(X,n_1) = SMA_t(SMA(SMA(SMA(SMA(SMA(SMA(SMA(SMA(SMA(X,n_1),n_1),n_1),n_1),n_1),n_1),n_1),n_1),n_1),n_1)\)

In the above relations, \(SMA^{(j)}\) denotes the \(j-\) fold composition of Simple Moving Averages.

We also compute the Highest High and Lowest Low over \(n_2\) bars: \(\max(X,n_2)\) and \(\min(X,n_2)\)

We then denote the indicator Swing Trade 1 at Index \(t\) for the given Inputs as \(ST^{(1)}_t(X,n_1,n_2)\), and we compute it for \(t \geq 0\) as follows. No Subgraph is drawn for Swing Trade 1.

\(\displaystyle{ST^{(1)}_t(X,n_1,n_2) = \left\{\begin{matrix} 100\cdot\frac{X_t - \frac{1}{10}\sum_{j = 1}^{10}SMA^{(j)}_t(X,n_1)}{\max_t(X,n_2) - \min_t(X,n_2)} & \max_t(X,n_2) - \min_t(X,n_2) \neq 0 \\ 0 & \max_t(X,n_2) - \min_t(X,n_2) = 0 \end{matrix}\right .}\)For an explanation of the Sigma (\(\Sigma\)) notation for summation, refer to our description here.

We denote indicators Swing Trade 2 and Swing Trade 3 at Index \(t\) for the given Inputs as \(ST^{(2)}_t(X,n_1,n_2,n_3)\) and \(ST^{(3)}_t(X,n_1,n_2,n_3)\), and we compute them in terms of Exponential Moving Averages for \(t \geq 0\) as follows. The Subgraphs of Swing Trade 2 and Swing Trade 3 are both drawn for \(t \geq \max\{n_1,n_2,n_3,n_4\}\).

\(ST^{(2)}_t(X,n_1,n_2,n_3) = EMA_t\left(ST^{(1)}(X,n_1,n_2),n_3)\right)\)\(ST^{(3)}_t(X,n_1,n_2,n_3) = EMA_t\left(ST^{(2)}(X,n_1,n_2),n_3)\right)\)

Swing Trade 2 and Swing Trade 3 are used to determine Buy and Sell signals. Let the **Arrow Offset Percentage** Input be denoted as \(k\).

A Buy Signal is indicated by an Up Arrow at Index \(t\) if the Subgraph of the Swing Trade 3 crosses the Subgraph of Swing Trade 2 from below. That is, a Buy Signal at \(t\) satisfies the conditions \(ST^{(3)}_{t - 1}(X,n_1,n_2,n_3) < ST^{(2)}_{t - 1}(X,n_1,n_2,n_3)\) and \(ST^{(3)}_t(X,n_1,n_2,n_3) > ST^{(2)}_t(X,n_1,n_2,n_3)\). The vertical coordinate of the tip of the arrow is given by \(ST^{(3)}_t(X,n_1,n_2,n_3) - \frac{k}{100}ST^{(3)}_t(X,n_1,n_2,n_3)\).

A Sell Signal is indicated by a Down Arrow at Index \(t\) if the Subgraph of the Swing Trade 3 crosses the Subgraph of Swing Trade 2 from above. That is, a Sell Signal at \(t\) satisfies the conditions \(ST^{(3)}_{t - 1}(X,n_1,n_2,n_3) > ST^{(2)}_{t - 1}(X,n_1,n_2,n_3)\) and \(ST^{(3)}_t(X,n_1,n_2,n_3) < ST^{(2)}_t(X,n_1,n_2,n_3)\). The vertical coordinate of the tip of the arrow is given by \(ST^{(3)}_t(X,n_1,n_2,n_3) + \frac{k}{100}ST^{(3)}_t(X,n_1,n_2,n_3)\).

Finally, we denote the **Rahul Mohindar Oscillator** (RMO) for the given Inputs at Index \(t\) as \(RMO_t(X,n_1,n_2,n_4)\), and we compute it for \(t \geq 0\) as follows. As with the Swing Trade 1 and Swing Trade 2 subgraphs, the RMO Subgraph is displayed for \(t \geq \max\{n_1,n_2,n_3,n_4\}\).

The symbol in the chart is experiencing a Bull Trend when \(RMO_t(X,n_1,n_2,n_4) > 0\) and a Bear Trend when \(RMO_t(X,n_1,n_2,n_4) < 0\).

#### 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**.

*Last modified Monday, 03rd October, 2022.