Relative Volume (RVOL)
Forums › ProRealTime English forum › ProBuilder support › Relative Volume (RVOL)
- This topic has 16 replies, 6 voices, and was last updated 1 year ago by Lucho0712.
Tagged: array, relative volume, rvol
-
-
09/30/2019 at 10:47 AM #108884
Good day,
I am trying to incorporate relative volume in my trading but I have no idea how to create the indicator. Below is a link that describes Rvol and how to calculate it. I haven’t seen this indicator in previous topics as well, maybe I missed it.
Can you please help with creating it?
thank you,
https://stockbeep.com/how-to-calculate-relative-volume-rvol-for-intraday-trading
09/30/2019 at 10:56 AM #10888904/08/2020 at 8:21 PM #125329Hello Nicolas
Thanks for the code 🙂
However do you think it’s possible to create the indicator as described in the article posted above? (https://stockbeep.com/how-to-calculate-relative-volume-rvol-for-intraday-trading)
“Current cumulative volume up to this time of day / Average cumulative volume up to this time of day”
where the numerator is the current volume, and the denominator is the average over let’s says 5 days of the volume, but only up to the current index bar (and not the volume at the close of the day, which is less relevant during trading hours).
I am a fresher, I did try wrapping my mind around this, but without any results I am afraid :s I also saw a similar post on the forum, but unfortunately it was left unanswered (https://www.prorealcode.com/topic/relative-volume-for-intraday-trading/). And I read the posts in french but none was of help in this particular matter (https://www.prorealcode.com/topic/pro-ratisation-de-volume/).
That’s why getting your help/guidance would be great! 🙂
Thanks,
04/09/2020 at 9:42 AM #12537904/09/2020 at 10:11 AM #12538204/09/2020 at 1:03 PM #12541804/10/2020 at 10:02 AM #125548Here are 2 versions. First one is the Relative Volume, second one is the actual volume and the average volume for the X chosen period, in red.
RELATIVE VOLUME123456789101112131415161718192021222324Period = 5 //X days averaging periodintraindex = intradaybarindex$ivol[intraindex] = volume$gvol[barindex] = volume$gintraindex[barindex] = intraindexcount = 0sum = 0for i = barindex downto 0 doif $gintraindex[i]=intraindex then //found same intraday barsum=sum+$gvol[i]count=count+1endifif count=period thenbreakendifnextavg = sum/periodrvol = $ivol[intraindex] / avgreturn rvol style(histogram)//$ivol[intraindex], avg coloured(255,0,0)current volume and average for X periods123456789101112131415161718192021222324Period = 5 //X days averaging periodintraindex = intradaybarindex$ivol[intraindex] = volume$gvol[barindex] = volume$gintraindex[barindex] = intraindexcount = 0sum = 0for i = barindex downto 0 doif $gintraindex[i]=intraindex then //found same intraday barsum=sum+$gvol[i]count=count+1endifif count=period thenbreakendifnextavg = sum/periodrvol = $ivol[intraindex] / avgreturn $ivol[intraindex], avg coloured(255,0,0)3 users thanked author for this post.
04/14/2020 at 10:25 AM #126053Hello Nicolas,
Thank you so much, your reply was very helpful.
There is a small correction I think:
Line 11: wrong loop1for i = barindex downto 0 doit should be:
line 11: correct loop1for i = (barindex - 1) downto 0 doIn order not to take the current bar into the averaging (and take only the previous ones). I did the calculation by hand to verify this should be working
04/14/2020 at 10:34 AM #126056I also gave a trial at the cumulative volume, based on your code. It seems to be working as well, nonetheless it would be great to have your feedback 🙂
cumulative relative volume12345678910111213141516171819202122232425262728293031323334353637383940414243Period = 5 //X days averaging periodNbC = NoofCandlesInOnePeriod // No of Candles in one period.intraindex = intradaybarindex$ivol[intraindex] = volume$gvol[barindex] = volume$gintraindex[barindex] = intraindexn = 0count = 0sum = 0cvol = 0for i = (barindex - 1) downto 0 doif $gintraindex[i]=intraindex then //found same intraday barn = iwhile ( n > (barindex - (intraindex + NbC + count*NbC)) AND (n >= 0) )sum=sum+$gvol[n]n = n - 1WENDcount=count+1endifif count=period thenbreakendifnexti = 0for i = intraindex downto 0 docvol = cvol + $ivol[i]nextavg = sum/periodrcvol = cvol/avgreturn rcvol04/14/2020 at 10:35 AM #12605707/29/2020 at 4:26 AM #140353Hi Nicholas
I am getting a syntax error for the $ signs. Please let me know as to how I can correct this since I need to use these indicators.
Many thanks
07/29/2020 at 9:34 AM #140361variables names with a $ are variable arrays which are not supported by ProRealTime version prior to v11! 🙂
1 user thanked author for this post.
08/13/2021 at 11:36 AM #175232Dear Nicolas – thanks so much for your post above (#125548) where you gave the code for a relative volume indicator, which I have been using.
Can you advise whether the code can be adapted to create a cumulative RVOL indicator, and if so how, please? For example, I’m looking to know intraday how a stock’s cumulative volume since the open compares with the average cumulative volume at the same point in the day (averaged over the previous X days/sessions). My understanding is that your code above is looking at current relative volume for the bar rather than cumulative since the open.
Any pointers or help you could give would be very gratefully received (I’m new to PRT coding)
Thanks, Paul
10/04/2021 at 10:36 AM #178995Bonjour Nicholas….
Would it be possible to add a colour system to the bars in the relative volume indicator?
10/03/2023 at 4:31 PM #222003Hi Nicolas, I am also looking for a way to compare the cumulative volume since the open with the average cumulative volume at the same point in the day. I tried to use Pompboss’ code, but the number of candles in one period must be specified which prevents us to use it whatever the TF is. Would it possible to improve the code? Many thanks.
-
AuthorPosts
Find exclusive trading pro-tools on