#### Home >> (Table of Contents) Studies and Indicators >> Technical Studies Reference >> Up Down Volume Ratio

# Technical Studies Reference

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

# Up/Down Volume Ratio

The study calculates and displays a moving average of the Up/Down Ratio. The method of calculation for this Ratio depends on the setting of the **Calculation Based On** Input.

The Up/Down Ratio at Index \(t\) is denoted as \(UDR_t\). For all of the variables in the following formulas, the subscript \(t\) indicates that we are specifying the values of these variables at Index \(t\).

If **Calculation Based On** is set to Up/Down Volume, then the following variables are used in this study.

Complete descriptions of these variables can be found in the documentation on sc.BaseDataIn[][] / sc.BaseData[][].

- \(V^{(U)}_t\) = sc.BaseData[SC_UPVOL][sc.Index] = sc.UpTickVolume[sc.Index]
- \(V^{(D)}_t\) = sc.BaseData[SC_DOWNVOL][sc.Index] = sc.DownTickVolume[sc.Index]

The Up/Down Ratio is denoted as \(UDR_t\), and it is computed as follows.

\(\displaystyle{UDR_t = \left\{ \begin{matrix} 100\cdot\frac{V^{(U)}_t - V^{(D)}_t}{V^{(U)}_t + V^{(D)}_t} & V^{(U)}_t + V^{(D)}_t \neq 0 \\ 0 & V^{(U)}_t + V^{(D)}_t = 0 \end{matrix}\right .}\)If **Calculation Based On** is set to Ask/Bid Volume, then the Ask Volume and Bid Volume are used in the calculation, as follows.

If **Calculation Based On** is set to Up/Down Trades, then the Number of Trades - Ask and Number of Trades - Bid are used in the calculation, as follows.

Let \(n\) denote the **Moving Average Length** Input. The Subgraph that is displayed is the Exponential Moving Average of the Up/Down Ratio: \(EMA_t(UDR,n)\).

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

#### Inputs

- Moving Average Length
- Calculation Based On:

**Up/Down Volume**: When this is selected, Volume-Up and Volume-Down is used.**Ask/Bid Volume**: When this is selected, Ask Volume and Bid Volume is used.**Up/Down Trades**: When this is selected, the Number of Trades-Ask and Number of Trades-Bid is used.

- Moving Average Type

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