Login Page - Create Account

Technical Studies Reference


Ask/Bid Volume Difference Bars


Description

This study calculates and displays candlestick bars which represent the difference between Ask Volume \(V^{(ask)}_t\) and Bid Volume \(V_t^{(bid)}\) for each of the main price bars in the chart.

The High of a candlestick bar indicates the maximum difference between Ask Volume and Bid Volume that occurred during the formation of the main price graph bar. The Low of a candlestick bar indicates the minimum difference between the Ask Volume and Bid Volume during the formation of the main price graph bar. We express these ideas in mathematical symbols below.

Let \(\max_t\left(V^{(ask)} - V^{(bid)}\right)\) and \(\min_t\left(V^{(ask)} - V^{(bid)}\right)\) denote, respectively, the maximum and minimum difference between Ask Volume and Bid Volume that occurred during the formation of the bar at Index \(t\).

Let \(O_t^{(AB)}\), \(H_t^{(AB)}\), \(L_t^{(AB)}\) and \(C_t^{(AB)}\) denote the Open, High, Low, and Close, respectively, of the Ask/Bid Volume Difference Bar at Index \(t\). We compute these for \(t \geq 0\) as follows.

\(H_t^{(AB)} = \max_t\left(V^{(ask)} - V^{(bid)}\right)\)

\(L_t^{(AB)} = \min_t\left(V^{(ask)} - V^{(bid)}\right)\)

\(C_t^{(AB)} = V_t^{(ask)} - V_t^{(bid)}\)

The formula for \(O_t^{(AB)}\) depends on the Number of Trades \(N_t\).

If \(N_t = 1\), then we compute \(O_t^{(AB)}\) as follows.

\(O_t^{(AB)} = \left\{ \begin{matrix} H_t^{(AB)} & V_t^{(ask)} - V_t^{(bid)} > H_t^{(AB)} \\ V_t^{(ask)} - V_t^{(bid)} & L_t^{(AB)} \leq V_t^{(ask)} - V_t^{(bid)} \leq H_t^{(AB)} \\ L_t^{(AB)} & V_t^{(ask)} - V_t^{(bid)} < L_t^{(AB)} \end{matrix}\right .\)

If \(N_t \neq 1\), then we compute \(O_t^{(AB)}\) as follows.

\(O_t^{(AB)} = \left\{ \begin{matrix} H_t^{(AB)} & 0 > H_t^{(AB)} \\ 0 & L_t^{(AB)} \leq 0 \leq H_t^{(AB)} \\ L_t^{(AB)} & 0 < L_t^{(AB)} \end{matrix}\right .\)

In order to see these bars historically and for them to be accurate, there are some settings that need to be correct. Also, not all Data or Trading services provide historical data needed for these types of bars. Follow the instructions in the Tick by Tick Data Configuration page.

Since the study uses price type bars, and these type of bars have an opening value, it needs to be understood that it is not known what the opening Ask Volume and Bid Volume difference is. The best that can be used is the prior close. The only exception is when the chart bars are set to 1 Trade Per Bar. In that case the opening difference is calculated.

Therefore, the bar open value is set to 0. However, of 0 is outside the High to Low range of the bar, the open is changed to the nearest value in that High to Low range.

Inputs

  • Include Pullback Column: When this Input is set to Yes and the Numbers Bars study is also on the chart, then an Ask/Bid Volume Difference Bar will be displayed for the pullback column.

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.

Ask_Bid_Volume_Difference_Bars.291.scss


*Last modified Sunday, 29th January, 2023.