Login Page - Create Account

Technical Studies Reference


Wide Range Bar

This study highlights chart bars that are wider than any of the prior bars or groups of bars in a specified lookback period. There are two schemes for doing this: WR n and x Bar WR, where WR stands for "Wide Range". This notation is analogous to the notation used in the Narrow Range Bar. In this study, either scheme can be selected via the Lookback Type Input. We will explain each one below.

Scheme #1: WR n:

Note: This is the lookback scheme that was used in the older version of this study.

Let the Lookback Length - WR n Input be denoted as \(n\). In this scheme, the range of the current chart bar is compared to the ranges of the previous \(n\) bars.

Let the Open, High, Low, and Close Prices at Index \(t\) be denoted as \(O_t\), \(H_t\), \(L_t\), and \(C_t\), respectively. Then we denote the Range of Current Bar at Index \(t\) as \(RCB_t\). The calculation of \(RCB_t\) is done for \(t \geq 0\), and the method of calculation depends on the setting of the Use Open To Close Range for NR n Lookback Type Input as follows.

If Use Open To Close Range for NR n Lookback Type is set to Yes, then \(RCB_t = |O_t - C_t|\).

If Use Open To Close Range for NR n Lookback Type is set to No, then \(RCB_t = H_t - L_t\).

We define a function called the Wide Range, denoted as \(WR_t(n)\). We compute this function for \(t \geq n\) as follows.

\(\displaystyle{WR_t(n) = \left\{\begin{matrix} 1 & RCB_t \geq \min\{RCB_{t - n},...,RCB_{t - 1}\} \\ 0 & RCB_t < \min\{RCB_{t - n},...,RCB_{t - 1}\} \end{matrix}\right .}\)

The bar with Index \(t\) is highlighted if and only if \(NR_t(n) = 1\). The highlighting is in blue by default.

Scheme #2: x Bar WR:

Let the Lookback Length - xBar WR and Number of Bars in Comparison Group Inputs be denoted as \(n\) and \(x\), respectively. In this scheme, the range of the current \(x\) chart bars is compared to the ranges of every consecutive group of \(x\) bars in the previous \(n\) bars.

We denote the Range of Current Group of size \(x\) at Index \(t\) as \(RCG_t(x)\), and we compute it for \(t \geq x - 1\) as follows.

\(RCG_t(x) = \max_t(H,x) - \min_t(L,x)\)

For an explanation of the \(\min\) and \(\max\) functions, see our description of the Moving Maximum and Moving Minimum.

We define a function called the Wide Range for the Leading Bar, denoted as \(WRLB_t(n,x)\). We compute this function for \(t \geq n\) as follows.

\(\displaystyle{WRLB_t(n,x) = \left\{\begin{matrix} 1 & RCG_t \geq \min\{RCG_{t - n + x},...,RCG_{t - 1}\} \\ 0 & RCG_t < \min\{RCG_{t - n + x},...,RCG_{t - 1}\} \end{matrix}\right .}\)

Because we wish to highlight all of the bars in a group of size \(x\) when its range is the widest in the lookback period \(n\), we define the function Wide Range, denoted as \(WR_t(n,x)\). The default value for \(WR_t(n,x)\) is \(0\), but if \(WRLB_t(n,x) = 1\), then we have \(WR_i(n,x) = 1\) for \(i = t - x + 1, ...,t\). In this case, we highlight the leading bar (that is, the most recent bar) with the study Primary Color (default: blue), and we highlight the earlier bars in the group of size \(x\) with the study Secondary Color (default: purple). A leading bar may be highlighted in the Secondary Color if two wide range groups of size \(x\) overlap.

Inputs

Spreadsheet

The spreadsheets below contain the formulas for this study in Spreadsheet format. Save these Spreadsheets to the Data Files Folder.

Open them through File >> Open Spreadsheet.

Wide_Range_Bar_WR_n.348.scss

Wide_Range_Bar_x_Bar_WR.348.scss


*Last modified Friday, 08th March, 2019.