NexusFi: Find Your Edge


Home Menu

 





Relative Volume Indicator


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 47 posts (253 thanks)
    2. looks_two soulartist with 13 posts (6 thanks)
    3. looks_3 Cachevary with 8 posts (0 thanks)
    4. looks_4 Big Mike with 5 posts (5 thanks)
      Best Posters
    1. looks_one Fat Tails with 5.4 thanks per post
    2. looks_two Silvester17 with 4 thanks per post
    3. looks_3 Big Mike with 1 thanks per post
    4. looks_4 soulartist with 0.5 thanks per post
    1. trending_up 86,797 views
    2. thumb_up 278 thanks given
    3. group 50 followers
    1. forum 106 posts
    2. attach_file 15 attachments




 
Search this Thread

Relative Volume Indicator

  #1 (permalink)
 soulartist 
California
 
Experience: Intermediate
Platform: NinjaTrader
Broker: IB
Trading: ES
Posts: 20 since Aug 2010
Thanks Given: 8
Thanks Received: 10

I'm still trying to effectively use volume in my trading. My thinking logically leads me to the concept of relative volume; i.e not just volume by itself but in comparison to an established average or median; that can indicate/confirm volatility (or the lack of it).

I am looking for a volume indicator that compares the current price bar’s volume to historical volume in the same bar on previous days (plot volume bars by timeframe relative to average/median over n days). The relativity can be expressed as a percentage and/or std deviations, moving averages etc.

I did some googling... surprisingly I found nothing on Ninja forums or here but I did find the indicator outlined in Dr. Brett Steenbarger's blog (he uses Excel to plot) and code for other platforms. I provide the references below:

- TarderFeed post(s) on Relative Vol indicator by Dr. Brett Steenbarger
TraderFeed: [AUTOLINK]Relative Volume[/AUTOLINK] and Movement in the Stock Market
TraderFeed: [AUTOLINK]Relative Volume[/AUTOLINK] for ES Futures

- EasyLanguage Relative Volume Indicator (inspired by Traderfeed post)
EasyLanguage [AUTOLINK]Relative Volume[/AUTOLINK] Indicator | Benzinga.com
Commentary :: [AUTOLINK]EasyLanguage[/AUTOLINK] Relative Volume Indicator - TraderPlanet

- Relative Volume Percentage (similar code for TOS)
Relative Volume Percentage | ThinkScripter

- Amibroker code for relative volume by time (inspired by Traderfeed post)
Making sense of Volume eToke’s Blog
[amibroker] Re: [AUTOLINK]Relative Volume[/AUTOLINK] by time

If anyone can point me to a NinjaTrader 6.5 indicator that does this, if it exists. If not, can anybody kindly port this code to Ninja 6.5. I'm no programmer but from the code I've seen, it doesn't look to complicated.

Thanks in advance
- soulartist

Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Deepmoney LLM
Elite Quantitative GenAI/LLM
Better Renko Gaps
The Elite Circle
ZombieSqueeze
Platforms and Indicators
Are there any eval firms that allow you to sink to your …
Traders Hideout
Online prop firm The Funded Trader (TFT) going under?
Traders Hideout
 
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


I suggest that you start reading some threads here one the forum to get an overview on the various ways how to use volume. One of the best threads is here:



If you search for indicators, I suggest to use both volume and volatility for your trading setups, a concept which is also known as volume-spread-analysis(VSA).

Here are some excellent NinjaTrader indicators that you can try:


Better Volume

(1) The better volume indicator can be found here:

Links and Downloads Manager - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

This is a link that explains how to use this indicator.

https://emini-watch.com/uploads/Media/Better_Volume_Indicator.pdf


Volume Pattern

The volume pattern indicator can be found here:

Downloads - [AUTOLINK]NinjaTrader[/AUTOLINK] 6.5 Indicators - Volume Patterns - Big Mike's Day Trading Forum


Volume Stop

The volume stop indicator can be found here:

View Download Details - Big Mike's Day Trading Forum


Force Index

The force index created by Dr. Alexander Elder can be found here:

Links and Downloads Manager - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum


Advanced Concept : Gom Volume Ladder

I also suggest to have a look at the GOM Volume Ladder, which analyzes bid versus ask traded volume. Information can be found here:

Gom Volume Ladder - Big Mike's Day Trading Forum





Relative volume is a comparatively weak concept, a relative volume indicator can be coded in a few minutes. I personally use the Better Volume Indicator and an anchored volume weighted moving average.

Reply With Quote
  #4 (permalink)
 
Dragon's Avatar
 Dragon 
Bellingham, WA
 
Experience: Intermediate
Platform: Ninja
Broker: Zen-Fire
Trading: 6E, CL
Posts: 491 since Aug 2009
Thanks Given: 747
Thanks Received: 259

Fat Tails,

How many informative posts have you provided for new members on futures.io (formerly BMT)? You are way too kind

Visit my NexusFi Trade Journal Reply With Quote
  #5 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102

The kindness also helps me to organize my own mind and get a better understanding of the question. Sometimes a question looks simple or redundant, but when you try to answer it, you need to explore half the universe. Actually it is rewarding. I am also kind to myself.



Dragon View Post
Fat Tails,

How many informative posts have you provided for new members on futures.io (formerly BMT)? You are way too kind


Reply With Quote
  #6 (permalink)
 soulartist 
California
 
Experience: Intermediate
Platform: NinjaTrader
Broker: IB
Trading: ES
Posts: 20 since Aug 2010
Thanks Given: 8
Thanks Received: 10

Fat Tails,
thanks much for your comprehensive post grouping all relevant volume resources; this can serve as a ready reckoner for anybody wishing to explore this topic.

I have visited the excellent thread, am aware of Barry Taylor's volume and other indicators and Tom Williams VSA book (downloaded from this forum). I would need to digest these one by one before I can incorporate them into my trading.

I already use VWAP and Delta in my trading - Gomi's cumulative and per bar delta . I have tried the ladder from fin alg and have Gomi's ladder installed but find it too busy. I look for delta divergence setups and find it is easy to spot that graphically in GomCD. Again I would be looking at using the ladder in the future, the thread is an excellent resource for that.

As goes the Relative Volume indicator, I intend to use it more like I use market internals (Adjusted Cumulative tick, Advance Decline, VIX) - to keep me aware of and aligned with the intraday sentiment. When you hear volume is x% above or below the avg etc, it would be nice to have the same displaying on your charts. It would also be valuable input in my Trend vs Range day analysis that I do within the first half hour to an hour; that decides my approach for the day (directional vs fade). It is not for specific trade setups/confirmation, for which I use Cumulative and/or per bar Delta.

I understand this is not complicated code, if someone shares my perspective (and can program which I cannot) would appreciate if this could be made available. Please refer to my initial post for sample easy language and other platform codes.

Thanks
- soulartist

Started this thread Reply With Quote
  #7 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102

Hi soulartist,

then you would need to be more specific: If I look at the different links that you posted, there are quite different concepts.

Traderfeed

First link shows cumulated volume versus Median volume. Second link shows median volume per 30 minutes and standard deviation.

By the way I have recently coded an indicator that shows the average volume of the last n trading days, so it would be easy to modify it to show the relative volume of the current day in relation to an average day. This indicator can be found here:




Benzinga TradeStation Code

The code determines the relative volume for each 3 min bar of the current session by comparing it to the average volume of the last 20 days. Then a simple average, which is smoothed with a Hull average is calculated. The use of a Hull average here is strange. Works with a 3 min chart.

Problem with this code. You cannot really compare different week days, so I would rather modify the code to compare Mondays with Mondays, Tuesdays with Tuesdays etc. The reason is that some days show volume picking up earlier due to news releases, and you cannot compare the 8:30 AM news release days Thursday and Friday with the other days. You will see this if analyzing volume and range per weekday as shown on this thread




ThinkScripter Code

Plots Green Bars, if the relative volume is greater than 100% of the average volume of the preceding n days, red bars if smaller, and white bars if similar (equal +- tolerance). There is a moving average as well, but no Hull Moving Average for smoothing. Again the analysis is not done for a specific day of the week.


eToke's Blog

Completely different. Plots average volume, standard deviation band, current bar volume and a cunulative difference between actual and average (blue and red lines on the chart). Only works with 15 min charts.


Confusion

All these concepts are quite different. Some show moving averages, other bars, other cumulated volume or standard deviations, some work only on 3 min charts, other on 15 min charts, not easy to select any approach. None of the indicator uses the median, which was used by Dr.Brett Steenbarger.


Starting from Scratch

When coding an indicator, we would first need to make some decisions:

1) Do we want to make an analysis per day of week, or shall we mix Fridays and Mondays? Do we need a filter for Fed Days and Holidays (dates can be entered manually) ?
2) If we compare today's volume, do we want to compare it to the median (Brett Steenbarger) or to the arithmetic average as all the indicators did?
3) Do we really need a standard deviation? How do you use this standard deviation in your trading. Or would you be happy with a different colour if 1 standard deviation is exceeded.
4) Do you want bars that show the relative volume of the current period in relation to the median or average volume of that same period of prior trading days?
5) Do you want a moving average for that relative volume per bar?
6) Do you need an information on cumulated volume?

There is one difficulty. NinjaTrader 6.5. does not have the session manager. This is a typical application, where you need sessions. So it can easily be done in NinjaTrader 7 with its predefined sessions, but not in NinjaTrader 6.5

I can possibly code this quickly, as I can just use the IntradaySeasonality volume indicator, which I mentioned above.


Suggestion

NinjaTrader 7.0, separate analysis per week-day, arithmetic average (not median), no standard deviations (bars can be coloured if 10% below or 10% above average volume), with cumulated volume per session, no moving average of the relative volume (either cumulated volume or moving average), no limitation to a specific timeframe as Benzinga or eToke.

Would you agree? Can you switch to NT 7.0? Indicator would not work with NT 6.5. and I am not ready to code this for NT 6.5., because it would be at least (!) twice the effort due to lack of session manager.

Reply With Quote
  #8 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102

Below is a chart of ES of last Friday. The volume was compared to the average volume of the preceeding 20 Fridays (20 weeks, default setting of indicator). Green bars show above average volume (> 115%), red bars show below average volume (< 85%). The line shows the ratio of the cumulated volume divided by the average cumulated volume over the same period. Blue means that the cumulated volume was higher than usual, orange means that it was lower than usual.

On last Friday, the Asian and European sessions had low volume. The volume prior to the open was higher than usual. After the open ES settled down in a trading range on lower volume.

First raw version of Relative Volume Indicator attached below. If you use that indicator, make sure you have a chart lookback period of at least 142 days for the default settings. Never use this indicator in CalculateOnBarClose = false mode, as it is not speed-optimized. The relative volume does not need to be calculated for every incoming tick. The second version should have an option to exclude specific dates such as holidays, FOMC and Flash Crash days.





Edit : Indicator updated on September 6 ( adjustment for different daylight savings rules, fields added for dates to exclude from analysis, such as crashes or holidays, speed improved).

Attached Files
Elite Membership required to download: RelativeVolume.zip
Reply With Quote
  #9 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102

The main problem here are the different time zones. If you are a European user and you want to trade a US instrument, you have to cope with the different dates of the daylight savings schedules. So you need to shift the prior values of the same weekday and time of day by 1 hour to match the opening hours of the futures or stock exchange. The same of course applies, if a US user wants to trade European instruments such as FESX or FDAX.

For NT 7.0 the information on the time zone of the exchange is available from the master data of an instrument, where appropriate sessions and the time zone are defined. For NT 6.5. this information is not available, so you would need to build your own database for the instruments that you want to trade.

The problem does not occur, if you only trade instruments of your own time zone.

But we do not want an indicator that sometimes works correctly and sometimes produces false results? By the way I am not sure yet that the first version of the indicator handles all this correctly. The second version will.

Reply With Quote
Thanked by:
  #10 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


I have replaced the original indicator with a new version. The following changes were made:

(1) The bar times are converted to comply with different daylight savings schedules in exchange time and local time of your NinjaTrader installation.

(2) It is now possible to exclude specific dates (outliers) from analysis. The chart below shows an example. Last Thursday's cumulated volume was 64.6% of the average volume of the prior 20 Thursdays. However, if you exclude May 6, the day of the flash crash, the cumulated volume becomes 69.4% of an average Thursday.

(3) The indicator works on fixed period intraday charts (minute charts) and daily charts only. For daily charts no cumulated volume of the session is shown.

(4) The volume bars are now coloured as follows: Green (volume 20% higher than usual), red (volume 20% lower than usual), white in between green and red.

(5) Default settings: The indicator will use the last 20 weeks of data as a reference. The relative volume is displayed for a lookback period of two weeks only. You can increase both reference period and display period, but this will make the indicator slow.

(6) With the default settings of a 20 week reference period, your chart should have a lookback period of 142 days or higher.


The indicator can now be found in the download section of this forum:


Attached Thumbnails
Click image for larger version

Name:	Adapted Relative Volume.jpg
Views:	1299
Size:	150.9 KB
ID:	19795  
Reply With Quote




Last Updated on March 25, 2019


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts