Technical Studies Reference
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.
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 Calculative 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.
- Add the Relative Volume study to the chart. Refer to the Adding/Modifying Chart Studies section for instructions.
- 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.
- Set the Based On setting with the Relative Volume study to refer to this other study. For complete documentation, refer to Based On.
- 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.
- 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.
- 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.
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:
- Add the Volume study to the desired chart. For information on adding a study, refer to Adding/Modifying Chart Studies.
- Add the Relative Volume study to the list of studies.
- Select the Relative Volume study in the Studies to Graph area of the Chart Studies window.
- Select the Settings button.
- Change the Chart Region to the region that contains the Volume study.
- 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.
- Set the Minimum Required Data for Day as Percentage to 0. This ensures that regardless of the value of the previous volume it will be displayed.
- Change other input settings as desired.
- Select the Subgraphs tab.
- Select the Relative Volume subgraph in the list. Set the Draw Style selection box to Ignore for this subgraph.
- Repeat the previous step for the Cumulative Value Line and the 100% subgraphs.
- Select the Average Volume subgraph.
- Change the Draw Style for the Average Volume subgraph to Diamond. Note that other options for the display can be used. Select an appropriate Draw Style as desired. For more information, refer to the Draw Style documentation.
- Change the Width/Size to at least a value of 3. Select a value that will make the selected Draw Style stand out as desired.
- Select OK to close the Relative Volume Settings Page.
- Select OK to close the Studies page and have the chart updated with the new studies.
*Last modified Tuesday, 06th March, 2018.