Login Page - Create Account

Technical Studies Reference


Relative Volume

The Relative Volume study calculates and displays bar volume and accumulated volume relative to previous chart bars in a time-based bar chart, as a percentage compared to those previous chart bars.

This study must only be applied to chart bars which have a fixed amount of time per bar, for accuracy. It cannot be used on chart bars with a variable time length.

This study can only work properly on an Intraday chart.

Relative Volume Calculation

For each chart bar, the bar volume is expressed as a percentage of the average volume for previous bars with the same starting time. For example, the 9:30:00 bar for the current day is compared against the average of the previous 9:30:00 bars. The number of previous bars used in the average calculation is controlled by the Period - Days to Include Input.

The relative bar volume is represented using the Bar Draw Style which can be colored based on the High Percent Threshold, High Threshold Color, Low Percent Threshold, and Low Threshold Color Inputs.

The relative volume percentage (Relative Volume Subgraph) and the underlying average volume (Average Volume Subgraph) are available in two separate Subgraphs. The Draw Style for the Average Volume Subgraph by default is set to Ignore.

If you want to display the cumulative volume for the trading day at each particular bar up to that bar, then instead use the Cumulative Sum of Study study which then references the Volume of the main price graph and set it to reset each trading day.

Cumulative Volume Ratio Calculation

For the Cumulative Volume Ratio calculation, for each bar in the chart the following calculation is done:

For each of the prior days being referenced as specified by the Period - Days to Include Input, the volume from the open for the day determined by the Session Times is added together for each chart bar up to and including to particular time being compared to on the current day. This value is called PriorDayCumulativeVolumeToTime and there is one for each day of the Period.

Each of these PriorDayCumulativeVolumeToTime values is averaged together. The result is: PriorDayAverageCumulativeVolumeToTime.

For the current day, the volume for each chart bar is added together from the open for the day as determined by the Session Times to the particular bar time being compared to. This is called CurrentDayCumulativeVolumeToTime.

The Cumulative Volume Ratio is calculated as: CurrentDayCumulativeVolumeToTime / PriorDayAverageCumulativeVolumeToTime

The Cumulative Volume Ratio is displayed using the Cumulative Volume Ratio Subgraph. If you only want to display this one Subgraph and not the Relative Volume, then set the Relative Volume Subgraph Draw Style to Ignore.

For Futures Symbols Use Continuous Futures Contract Charts

In the case of a futures symbol, and when the Period Input is referring back to days in the chart where on those days the particular futures contract month was no longer active, you must use a Continuous Futures Contract Chart. Otherwise, the study will be referencing data in the chart where the futures contract was not actively traded and therefore give inaccurate results.

Basing Relative Volume Study on Another Study for Non-Volume Comparisons

Comparisons relative to prior bars in the chart chart can be done on other than Volume. For example, you can do comparisons for Number of Trades, or the bar range. For these other types of relative comparisons generally you would mainly want to refer to the Relative Volume Subgraph. Follow the instructions below to accomplish this.

  1. Add the Relative Volume study to the chart. Refer to the Adding/Modifying Chart Studies section for instructions.
  2. Add the other study to the chart that you want to do comparisons for, to prior bars in the chart.

    For example, if you want to compare the Number of Trades per chart bar to prior bars in the chart, then add the Number of Trades study to the chart.

    If you want to compare the bar range for a chart bar to prior bars in the chart, then add the Bar Difference study to the chart.
  3. Set the Based On setting with the Relative Volume study to refer to this other study. For complete documentation, refer to Based On.
  4. Set in theVolume Subgraph to Use Input with the Relative Volume study that you want the relative comparisons done with, to the relevant Subgraph of that study.

Accuracy of Average Volume Calculation

We have had some questions about the accuracy of the Average Volume calculation with the Relative Volume study. This has repeatedly been verified to be 100% accurate.

The Average Volume value by default can only be viewed through the Tool Values Window. It is one of the listed Subgraph values and named Average Volume Make sure you have not set that Subgraph to not be displayed in the values Windows. By default it is displayed.

First, to ensure that there are no days skipped in the calculation, set the Minimum Required Data for Day as Percentage Input to 0.

Also understand that for a particular bar in the chart, the Average Volume for that bar does not include the volume for that same bar. It only includes the average of the volume for the chart bars with the same time, as the particular chart bar that you are looking at the Average Volume for, in the prior number of days specified with the Period - Days to Include Input.

For example, for the 9:30:00 chart bar when the number of days in the calculation is 4, the average volume will be for the volume of the 9:30:00 chart bars in the prior 4 days.

Inputs

  • Period - Days to Include: This Input specifies the number of Days to include in the Relative Volume and the Cumulative Volume Ratio calculations described above.

    The Period Input specifies the number of calendar days back from the current day being calculated. For example, if this Input is set to 7, then 7 prior days will be referenced prior to the current calculation day. This is true no matter how the Accumulation Type Input is set. Therefore, if Accumulation Type is set to Day of Week, then Period - Days to Include needs to be set to a minimum of 7.

    This Input setting must not exceed the Chart >> Chart Settings >> Use Days to Load >> Days to Load setting. If it does, you must increase the Days to Load setting to match. Otherwise, the results of this study will be inaccurate.

    Although if Minimum Required Data for Day as Percentage is set to a percentage greater than 0, then there are going to be weekends and other days like holidays skipped in the chart requiring that the Days to Load Chart Setting be set even higher than Period - Days to Include. For example, if Period - Days to Include is set to 14, then you should set the Days to Load in the chart to at least 20 to ensure there is sufficient data to account for weekends and holidays.

    Also refer to the For Futures Symbols Use Continuous Futures Contract Charts section.
  • Accumulation Type: Specifies either All Days or Day Of Week. When Day Of Week is specified, only bars from the same Day Of Week are included in the averages (Example: only Mondays if current bar is a Monday). When All Days is specified, consecutive week days are included in the averages.
  • Day Session Only: When this Input is set to Yes, and you have defined and enabled 2 separate Session Times in Chart >> Chart Settings, then the study is only calculated based upon the Day session only as specified by the Start Time and the End Time in Chart Settings. Refer to Session Times in Chart Settings for more information about setting the Session Times.
  • Volume Average Type: When set to Average Volume the prior days values are averaged, and when set to Median Volume the median value of the prior days values is used.
  • High Percent Threshold: When non-zero, the Relative Volume bars will be colored the High Threshold Color when the Relative Volume percentage is greater than or equal to this value. A value of 120 translates to 120 percent.
  • High Threshold Color: Color used to color High Threshold Relative Volume bars.
  • Low Percent Threshold: When non-zero, the Relative Volume bars will be colored the Low Threshold Color when the Relative Volume percentage is less than or equal to this value. A value of 80 translates to 80 percent.
  • Low Threshold Color: Color used to color Low Threshold Relative Volume bars.
  • Time Comparison Tolerance in Minutes: When the Relative Volume study is looking back to prior bars in prior days with the same time as the bar being calculated for the average calculations, this Input controls whether the bar would be used in a prior day, depending if its time does not exactly match the bar being calculated.

    For example, if the bar being calculated has a time of 10 AM, and there is not a bar exactly at 10 AM in the prior day, but there is one at 9:59:00 and Time Comparison Tolerance in Minutes is set to 1, then the 9:59:00 bar will be used. If the prior corresponding bar had a timestamp of 9:58:00, it would not be used in the calculation.
  • [Link] Minimum Required Data for Day as Percentage: This Input specifies, as a percentage, the minimum amount of data that needs to be present in a trading day in the chart, for that day to actually be used in the Relative Volume calculation. If there is insufficient data in a particular day, the prior day will be used until one is found that meets the percentage.

    This is useful for skipping over weekends and holidays. Setting it to a lower percentage will make it more likely that a particular day of data in the chart will be used. Setting it to a higher percentage will make it less likely that a particular day of data in the chart will be used.

    This input considers a day to be 24 hours. So if a market/symbol only trades for 12 hours out of the day, then the maximum amount of data that would ever be available in a day is 50%. Therefore, to ensure that the data from a 12 hour day is actually used we would recommend using a percentage of 30% or less.
  • Volume Subgraph to Use: Normally this needs to be set to Volume but needs to be changed when basing the Relative Volume study on another chart. For details, refer to Basing Relative Volume Study on Another Study for Non-Volume Comparisons.

Examples

Displaying Current and Previous Day Volume

The image below shows a typical Volume study with blue diamonds showing the value of the previous day's volume.

Follow these instructions in order to display the current volume along with the volume from the previous day:

  1. Add the Volume study to the desired chart. For information on adding a study, refer to Adding/Modifying Chart Studies.
  2. Add the Relative Volume study to the list of studies.
  3. Select the Relative Volume study in the Studies to Graph list of the Chart Studies window.
  4. Select the Settings button on the Chart Settings window to open the Study Settings window for the Relative Volume study.
  5. Change the Chart Region to the region that contains the Volume study.
  6. Set the Period - Days to Include Input to 1. This will display only the previous day's volume. In order to display the Average Volume over multiple days, set this to a larger value.
  7. Set the Minimum Required Data for Day as Percentage to 0. This ensures that no matter how much bar data is available in a prior day, there will not be any skipping of the volume data for that prior day.
  8. Change other Input settings as desired.
  9. Select the Subgraphs tab.
  10. Select the Relative Volume Subgraph in the list. Set the Draw Style selection box to Ignore for this Subgraph.
  11. Repeat the previous step for the Cumulative Value Line and the 100% Subgraphs.
  12. Select the Average Volume Subgraph.
  13. Change the Draw Style for the Average Volume Subgraph to Diamond. Note that other options for the Draw Style can be used. Select an appropriate Draw Style as desired. For more information, refer to the Draw Style documentation.
  14. Change the Width/Size to a sufficiently high value. Select a value that will make the selected Draw Style stand out as required.
  15. Select OK to close the Relative Volume Study Settings.
  16. Select OK to close the Chart Studies window and have the chart updated with the new studies.

*Last modified Monday, 03rd October, 2022.