#### Home >> (Table of Contents) Studies and Indicators >> Technical Studies Reference >> Donchian Channel

# Technical Studies Reference

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

### Donchian Channel

This study calculates and displays moving High, Low, and Middle Bands of the Price data over a number of bars specified by the **Length** Input. By default this study uses a displacement of +1 which forward-shifts the study by one bar.

Let \(H\), \(L\), and \(C\) be random variables denoting the High, Low, and Close Prices, respectively, and let their respective values at Index \(t\) be \(H_t\), \(L_t\), and \(C_t\). Let the **Length** Input be denoted as \(n\).Then denote the High, Low, and Middle Bands of the **Donchian Channel** for the given Input at Index \(t\) as \(TB^{(D)}_t(n)\), \(BB^{(D)}_t(n)\), and \(MB^{(D)}_t(n)\), respectively. We calculate these for \(t \geq 1\), and the method of calculation depends on the setting of the **Use Close instead of High and Low** Input. We describe the calculations in detail below.

If **Use Close instead of High and Low** is set to No:

\(\displaystyle{BB^{(D)}_t(n) = \left\{\begin{matrix} \min\{L_0,...,L_{t - 1}\} & t < n \\ \min\{L_{t - n},...,L_{t - 1}\} & t \geq n \end{matrix}\right .}\)

If **Use Close instead of High and Low** is set to Yes:

\(\displaystyle{BB^{(D)}_t(n) = \left\{\begin{matrix} \min\{C_0,...,C_{t - 1}\} & t < n \\ \min\{C_{t - n},...,C_{t - 1}\} & t \geq n \end{matrix}\right .}\)

Regardless of the setting of the **Use Close instead of High and Low** Input, \(MB^{(D)}_t(n)\) is calculated as follows.

#### Inputs

- Length
**Use Close instead of High and Low**: Determines whether the High and Low Prices or the Close Price is used in the calculations.

#### 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 Thursday, 13th September, 2018.