Technical Studies Reference


Bid & Ask Depth Bars

The Bid & Ask Depth Bars study creates Candlestick bars below the main Chart Region on the chart based upon the Bid Market Depth quantity totals and Ask Market Depth quantity totals which occur during the formation of each chart bar.

When the Input Source Data is set to Time & Sales then the Bid Market Depth and Ask Market Depth quantity totals are calculated when there is a change with Market Depth at the best Bid and Ask level only. This includes either the prices or quantities change. This creates a snapshot of total Bid Market Depth and total Ask Market Depth at that moment in time. The snapshots are then used in the formulas.

Since these are snapshots only when there is a change at the best Bid and Ask levels, when the Mode Input is using a setting which directly correlates to the current market depth data, then for the very last value of the Bid and Ask Depth Bars study, there is going to be some inconsistency at times to the total Bid depth and total Ask depth that you currently see and other market depth displays in Sierra Chart, since when there are quantity changes at levels other than at the best Bid or Ask, there will be inconsistencies momentarily.

The Bid & Ask Depth Candlestick bars display the highest and lowest values of the calculated formulas as specified by the Mode Input, for the time duration of the chart bar.

The Mode Input specifies the formula to use. The following formulas are available:

  • Ratio: ((Total Ask Quantities - Total Bid Quantities) / (Total Ask Quantities + Total Bid Quantities)) * 10.
  • Difference (Ask - Bid): Total Ask Quantities - Total Bid Quantities.
  • Sum: Total Ask Quantities + Total Bid Quantities.
  • Number Bid/Ask Records: Total Number Bid/Ask Records within the chart bar.
  • Bid Depth vs Ask Depth: Total Ask Quantities - Total Bid Quantities. The Bid Depth vs Ask Depth Mode does not display Candlestick bars, and instead displays the Bid market depth and Ask market depth as histogram bars, and the difference as a line.
  • Sum Bid Side: Total of the Bid side market depth quantities.
  • Sum Ask Side: Total of the Ask side market depth quantities.
  • Difference (Bid - Ask): Total Bid Quantities - Total Ask Quantities.
  • Cumulative Difference (Ask - Bid): Running sum of (Total Ask Quantities - Total Bid Quantities).
  • Cumulative Difference (Bid - Ask): Running sum of (Total Bid Quantities - Total Ask Quantities).

The Cumulative Difference calculation options maintain a cumulative running sum of the depth difference.

On the Subgraphs tab of the Study Settings window for this study, the color settings for the first 4 Subgraphs control the Candlestick colors. You can also choose another Graph Draw Type such as OHLC Bar if you do not want to use Candlesticks.

Candlesticks Not Supported When the Source Data is Historical Market Depth - Last

When the Source Data Input is set to Historical Market Depth - Last or to Historical Market Depth - Max, then the same data is applied to the Open, High, Low and Close Subgraphs, meaning there is only a single value at each chart bar. In this particular case you may want to set the Subgraphs >> Graph Draw Type setting on the Study Settings window to Line on Close.

Inputs

  • Calculation Mode: This Input controls the formula that is used for the data. See above for explanations of the options available.
  • Source Data: This Input can be set to one of the following:
    • Time and Sales: The study will use the Time and Sales data which contains the Bid Depth and Ask Depth quantity totals at each best Bid and Ask update for the calculations. The number of records of Time and Sales data that are stored per symbol is set through Global Settings >> Data/Trade Service Settings >> Number of Stored Time and Sales Records.

      You may want to increase that setting when using this study to provide more history for the study. However, it is not recommended to increase that setting too high because it does consume more memory. It is necessary to reconnect to the data feed (File >> Disconnect and File >> Connect to Data Feed) when changing that setting for it to go into effect.

      When reloading the chart with Chart >> Reload and Recalculate, the displayed bars with this study will be reduced based upon the number of Time and Sales records set with the Number of Stored Time and Sales Records setting.
    • Historical Market Depth - Last: The study will use the saved historical market depth data for the calculations. This data is only recorded when connected to the data feed and the symbol must support market depth data. When this option is used, the Bid and Ask Depth Bars will no longer be bars but instead a single value at each chart bar. The last recorded market depth quantities for the chart bar are used. This data is permanently saved and is persistent and provides the greatest amount of historical data for the study.
    • Historical Market Depth - Maximum: The study will use the saved historical market depth data for the calculations. This data is only recorded when connected to the data feed. The symbol must support market depth data. When this option is used, the Bid and Ask Depth Bars will no longer be bars but instead a single value at each chart bar. The maximum recorded market depth quantities for the chart bar are used. This data is permanently saved and is persistent and provides the greatest amount of historical data for the study.
  • Maximum Depth Levels to Use: This Input only applies when Source Data is set to Historical Market Depth - Last/Maximum. This Input specifies the maximum number of market depth levels to use in the calculation. The particular market depth levels used are those from the Best Bid and below, and from the Best Ask and above.
  • Automatically Set Draw Styles: When this Input is set to Yes, then when the Calculation Mode Input is set to Bid Depth vs Ask Depth then the Subgraph Draw Styles for the Bid Depth and the Ask Depth will be automatically set to Bar, and the Subgraph Draw Styles for Zero Line and Difference will be automatically set to Line. Otherwise, if this Input is set to No these draw styles will not be automatically changed when selecting the Bid Depth vs Ask Depth mode.

    Note that when using any other Calculation Mode the Subgraph Draw Styles Input is controlled by the selection of the Graph Draw Type.

*Last modified Thursday, 05th July, 2018.