Intraday Relative Volume for 5min chart
Forums › ProRealTime English forum › ProBuilder support › Intraday Relative Volume for 5min chart
- This topic has 13 replies, 5 voices, and was last updated 3 years ago by Karen.
-
-
11/04/2019 at 10:13 AM #111147
Relative volume is an important indicator for day traders. PRT does not include a relative volume indicator however. Although end of day relative volume is easy to calculate. Intraday relative volume is more complex since we are comparing volumes at certain times of the day. I was able to figure out a method by working from Nicolas’s intraday VWAP formula.
123456789101112131415if intradaybarindex=0 thenfirst=volumeendifd = max(1,intradaybarindex)RV=first+SUMMATION[d](volume)RV2=first+SUMMATION[d](volume)[78]Relvol = RV/RV2RETURN relvol as "relvol"The key is in the lookback period for the second summation line. Since there are 78 five min bars in a day (US market) using the 78 lookback tells it to start at the first bar of yesterdays five min chart. One could easily change chart intervals by changing the lookback. For example for a fifteen minute chart change the lookback to 26 to start at yesterday’s first bar. One could probably also get a relative volume against a five day average volume by simply creating summations for five days back by using 78,156,234,312,390 lookbacks and then averaging. I have not had time to try this and it may not work but I prefer the relative volume for yesterday to find stocks that have unusual volume. This calculation works fine in screeners.
11/04/2019 at 10:25 AM #112005Thanks for the indicator’s code, I moved it from the library pending post, because i’m not sure about something. If you want to compare the today’s volumes to the yesterday ones, the first volume of yesterday should be used for the RV2 variable? In this case the code would be:
12345678910111213141516if intradaybarindex=0 thenfirstprev=firstfirst=volumeendifd = max(1,intradaybarindex)RV=first+SUMMATION[d](volume)RV2=firstprev+SUMMATION[d](volume)[78]Relvol = RV/RV2RETURN relvol as "relvol"do you agree?
11/04/2019 at 4:16 PM #112054Yes thanks Nicholaus. I plugged in the revised code and it did make a significant difference in the first few bars of the day. I am a relative novice at PRT coding so I was not aware of the difference between the first and firstprev commands.
06/09/2021 at 12:56 AM #171443A question about this code.
Does the new extended trading hours for American stock exchanges effect the intradaybarindex? Specifically, I would like to adapt this code to a screener running on a 15mn timeframe to filter out stocks trading below .6 RVOL at any 15 minute period.
06/09/2021 at 12:09 PM #171462A better code for Intraday Relative Volume can be found here: https://www.prorealcode.com/topic/relative-volume-rvol/#post-125548
(not ProScreener compatible).
Extended trading hours does affect intradaybarindex.
1 user thanked author for this post.
06/09/2021 at 1:07 PM #171468Thanks, I saw that other code, which is quite nice, but needs to be screener compatible.
So I’m thinking change the 78 to 26 in the above code and this might work. Going to try it.
So I’m in premarket, and I am getting tickers registered, so will 26 be right? It would seem I might need to go back further into the premarket opening to get the right number of bars…?
06/09/2021 at 1:20 PM #17146907/08/2021 at 8:27 PM #173356We are stuck with the same exact problem, trying to compare today’s accumulated volume with yesterday’s accumulated volume for the same period of the main trading session. I have checked the screener code of jbeagle2 in Nicolas edition, as if it were an indicator, and sadly I can confirm it’s suffering from premarket data. Looks like this – (chart timeframe is 5 min.)
Very much looking for a way to run this code in a screener, but with extended trading hours data excluded from the analysis. This is one of the key components of our trading strategy and we have been trying unsuccessfully to implement this condition for more than two weeks now.
07/17/2021 at 7:00 AM #173723Sorry to be so late in contributing to this conversation. Not sure what problem you are seeing. The definition of the intraday bar index states that the opening bar of the day is 0 and then the next bar is 1 and so on. Pretty much standard java language. If you have a chart with premarket data and you use it as an indicator it will tag the first bar on that chart as 0 even if it is a premarket bar. But if you are using it in a screener I believe it will count the opening bar of that day at 0930 EST as the 0 bar. I can’t be sure of this because I do not work at PRT but logic tells me that if they were counting premarket bar for the screeners then long term moving averages, stochastics etc would all be wrong and most of the screeners would be useless. I have compared the result for RelativeVolume with other vendors and though they don’t match exactly they are close enough. The main problem I have with it is I can only figure out how to calculate the RelativeVolume from the previous day which is useful but somewhat limiting. Other vendors allow comparing RelativeVolume with a 5 or 10 day average. I have tried to program something like this but have had no success.
1 user thanked author for this post.
07/17/2021 at 12:07 PM #173728jbeagle2, thank you, the indicator/screener calculation differences makes sense.
I’ve also figured out how to calculate relvol from previous day, but for me that’s what my goal was. While I was looking for other solutions, I came across the https://stockbeep.com/how-to-calculate-relative-volume-rvol-for-intraday-trading article over and over again. Unfortunately, further searches did not help me find more information about intraday distribution curve, which I think is the key to solving the problem of counting relative volume for 5 or more days.07/19/2021 at 12:02 PM #173806But if you are using it in a screener I believe it will count the opening bar of that day at 0930 EST as the 0 bar.
I checked it and I can say that the screener starts counting the bar from the opening of the premarket I made a simple screener that finds stocks with bar number 3 for example. launching it at the 20th minute of the premarket (5min timeframe), he found several dozen stocks
1 user thanked author for this post.
07/19/2021 at 4:21 PM #17382207/19/2021 at 7:47 PM #17382708/24/2021 at 9:19 AM #176045Just in case, PRT support confirmed that US ETH markets were added in the screener. I am not sure whether local workstation ETH settings affect screening or not, but in my case with ETH always on – my screeners are definitely influenced by ETH data.
-
AuthorPosts
Find exclusive trading pro-tools on