Login Page - Create Account

Technical Studies Reference

Ultimate Oscillator

This study calculates and displays the Ultimate Oscillator for the Price data. Price oscillators typically compare a symbol's smoothed price with its price n bars ago. Larry Williams noted that the value of this type of oscillator can vary greatly depending on the number of bars used in the calculation, so he developed the Ultimate Oscillator, which uses weighted sums of three oscillators, each of which uses a different time period. The three oscillators are based on Williams definition of buying and selling "pressure".

Let \(H\), \(L\), and \(C\) be random variables denoting the High, Closing, and Low Prices, respectively, and let \(H_i\), \(L_i\), and \(C_i\) be their respective values at Index \(i\).

We define two random variables called the True High and the True Low, and we denote them as \(TH\) and \(TL\), respectively. We let \(TH_t\) and \(TL_t\) denote their respective values at Index \(t\), and we compute them for \(t \geq 0\) as follows.

\(\displaystyle{TH_t = \left\{\begin{matrix} H_t & t = 0 \space or \space H_t > C_{t - 1} \\ C_{t - 1} & t \neq 0 \space and \space H_t \leq C_{t - 1} \end{matrix}\right .}\)

\(\displaystyle{TL_t = \left\{\begin{matrix} L_t & t = 0 \space or \space L_t < C_{t - 1} \\ C_{t - 1} & t \neq 0 \space and \space L_t \geq C_{t - 1} \end{matrix}\right .}\)

Let the Length 1, Length 2, and Length 3 Inputs be denoted as \(n_1\), \(n_2\), and \(n_3\), respectively. We then compute the following sums for \(t \geq \max\{n_1, n_2, n_3\}\).

\(\mathrm{sum}_t(C - TL, n_1) = \displaystyle{\sum_{i = t - n_1 + 1}^t (C_i - TL_i)}\)

\(\mathrm{sum}_t(TH - TL, n_1) = \displaystyle{\sum_{i = t - n_1 + 1}^t (TH_i - TL_i)}\)

\(\mathrm{sum}_t(C - TL, n_2) = \displaystyle{\sum_{i = t - n_2 + 1}^t (C_i - TL_i)}\)

\(\mathrm{sum}_t(TH - TL, n_2) = \displaystyle{\sum_{i = t - n_2 + 1}^t (TH_i - TL_i)}\)

\(\mathrm{sum}_t(C - TL, n_3) = \displaystyle{\sum_{i = t - n_3 + 1}^t (C_i - TL_i)}\)

\(\mathrm{sum}_t(TH - TL, n_3) = \displaystyle{\sum_{i = t - n_3 + 1}^t (TH_i - TL_i)}\)

For an explanation of the Sigma (\(\Sigma\)) notation for summation, refer to our description here.

We denote the Ultimate Oscillator at Index \(t\) for the given Inputs as \(UO_t(n_1, n_2, n_3)\), and we compute it for \(t \geq \max\{n_1, n_2, n_3\}\) as follows.

\(UO_t(n_1, n_2, n_3) = \displaystyle{\frac{100}{7} \cdot \left(4 \cdot \frac{\mathrm{sum}_t(C - TL, n_1)}{\mathrm{sum}_t(TH - TL, n_1)} + 2 \cdot \frac{\mathrm{sum}_t(C - TL, n_2)}{\mathrm{sum}_t(TH - TL, n_2)} + \frac{\mathrm{sum}_t(C - TL, n_3)}{\mathrm{sum}_t(TH - TL, n_3)} \right)}\)


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.