# 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 three Schemes for doing this: WR n, x Bar WR, and WR vs ATR, where WR stands for "Wide Range". The notation used here is adapted from Tony Crabel's book Day Trading with Short Term Price Patterns and Opening Range Breakout, and it is analogous to the notation used in the Narrow Range Bar study. In this study, any of these Schemes 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 WR n Lookback Type Input as follows.

If Use Open To Close Range for WR n Lookback Type is set to Yes, then $$RCB_t = |O_t - C_t|$$.

If Use Open To Close Range for WR 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 $$WR_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.

Scheme #3: WR vs ATR:

This Scheme is not from Crabel's work. Rather, it is unique to Sierra Chart.

As in Scheme #1, the Range of Current Bar at Index $$t$$ is denoted as $$RCB_t$$, and it is computed as follows.

$$RCB_t = H_t - L_t$$

Let $$n$$ denote the Input Lookback Length - WR vs ATR. In this Scheme we determine the Wide Range $$WR_t(n)$$ by comparing $$RCB_t$$ with the Average True Range of the previous $$n$$ bars. The type of moving average used in the ATR calculation is determined by the Input ATR Moving Average Type We denote this in mathematical symbols as follows.

$$\displaystyle{WR_t(n) = \left\{\begin{matrix} 1 & RCB_t > ATR_{t - 1}(n) \\ 0 & RCB_t \leq ATR_{t - 1}(n) \end{matrix}\right .}$$

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