R4Rocket

Relative Volume (RVOL) - ATR - R4Rocket

Hello !!

This is a big upgrade on my earlier Indicator called "RVOL - R4Rocket". I could have updated the existing script, but there were two reasons for me to not do so.

1. I changed a lot of the previous code and added a lot of statistics like
a. Intraday Daily ATR Plot
b. Progressive (High - Low) Range as % of Daily ATR
c. % of RVOL Days in available chart data in any timeframe
d. In the new script RVOL Sectional has been removed as I did't find it very useful (Old script still has that feature)
e. And lastly and greatly, I modified the actual RVOL code (Huh ? Well I'll explain what I mean by this below)

2. Earlier I named my script just as RVOL. But then I though, well not everyone is going to search "Relative Volume" Indicator as "RVOL" Indicator, right? And Then during my second update I even tried to see whether I can change the script name but I couldn't figure it out. (Maybe it's not possible or maybe you know, "I DON'T HAVE ENOUGH BRAIN POWER" :P). So in order to make my script more accessible and easy to find for everubody so that it may add a little value to them in their trading, I'm changing the name of the script in this publication to "Relative Volume (RVOL) - ATR - R4Rocket". (Quite a big name, don't you think?)


Now as my reasons are out of the way, let me tell you about the indicator and the available options.

First let me explain what is RVOL basically. (Even after making 4 updates to my last script, I forgot to explain this......BIG BRAIN POWER :P)

It is calculated as (Cumulative sum of volume till time t from the start of the session) divided by the (Average of same period volume over a given number of days).
Lets say market starts at 09:30 am and right now the time is 10:00 am. So what RVOL does is it takes the sum of volume done from 9:30 am to 10:00 am for today and divides it by the same average volume that occurred between 9:30 to 10:00 in lets say X number of last days.

What this does is gives you the means to quantify how much everybody is interested today in the given stock w.r.t last X days. Generally higher the RVOL value - higher the public interest (due to some known or unknown reason like results / news / market condition etc) - and hence higher is the probability of stock movement on intraday basis. (Mostly everybody prefers to trade stocks intraday with RVOL > 2)

Now let's get back to the changes and the features.

1. It calculates Relative Volume

Adjusted in a way that the recent volume spike (e.g say due to quarterly result announcement or some other big news) don't skew the next day's
RVOL calculation. What this will do is, it will give you a good idea whether the stock is still in play the next day or a day after that.

LIGHTS !! CAMERA !! ANNNNNNDD ACTION !! (I love to watch movies, not very relevant here I know, but couldn't help it :P)

Now you can see in the image below the difference between old and new script RVOL calculations. This will help you to find out 2nd Day, 3rd Day plays.


To calculate RVOL first you have to choose your local exchange trading hours
E.g. NSE (India) trades from 09:15 to 15:30
NASDAQ (USA) trades from 09:30 to 16:00
LSE (UK) trades from 08:00 to 16:30 etc

Then you have to choose the RVOL period. This is the lookback period for cumulative volume average calculations.(I suggest using default value of 4 but it depends upon your preference and one more thing to note is that too high of a value will not even load the script due to some constraints that I don't know)

And last parameter is RVOL Trigger = What RVOL value YOU CONSIDER IMPORTANT. (I like 2 and if RVOL > RVOL Trigger then the columns will turn Green otherwise they will be Red. SIMPLE !!)

You can use any timeframe from 1 min to 1 Day. (Even custom timeframes like 2,4,6 will work fine)

1 min Chart


2 min Chart



2. It calculates Daily ATR in % terms of the day's open and plots it on intraday charts (and on daily charts too, if you want)

It's just what I just said - plain & simple.
You can see it in the image below. (Yellow dotted line and value in yellow color)


This will help you if you use profit targets or stop losses based on previous day's ATR values.
All you have to do is tick the Plot Daily ATR % box in inputs and choose the ATR Average.


3. The indicator calculates (High - Low) range as and when it extends throughout the day as the % of Daily ATR

This will help you quickly in finding which stocks are trading with extreme volatility .
Can be seen in the image below where the stocks trade @ almost 3 times or 300 % of the previous days ATR (Blue dotted line and value in blue color)



4. And lastly it gives you the statistic that will tell you how much is the average % of total days are RVOL days. (Did you get that ? It sounded great in my head but really don't know what I just said)
Let me tell you in terms of numbers. Lets say on daily timeframe Tradingview provides some 5000 bars worth of historical data. Out of that there were 16% days where RVOL was more than 2. Roughly speaking if you were to trade this stock every day then you would find on an average about 3 days per month with RVOL > 2.
(If you reduce the RVOL Trigger, then you will get more % RVOL days. In the second image if you reduce RVOL Trigger to 1.5 then you will have almost 27 % good trading days AS PER YOUR DESIRED & DEFINED PARAMETER OF RVOL TRIGGER = 1.5. Which translates to almost 6 days per month. You can play with it as you want and deem fit.)

RVOL Trigger = 2

RVOL Trigger = 1.5


“The goal of a successful trader is to make the best trades. Money is secondary.” – Alexander Elder


With best regards.

R4Rocket
版本注释: Code Version 2

Added an option to smooth out the RVOL curves. Why ?
1. First of all it it looks better
2. Secondly (and more importantly), it will help in spotting the rising, falling or flattening RVOL with ease.

You can compare the earlier version (last bottom indicator) with the new version (second bottom - hope I'm getting this location wording right :P) in the images below.




Everything is else is just the same.


Regards

R4Rocket
版本注释: Code Version 3

There was an issue in the intraday RVOL calculations. NOW IT HAS BEEN FIXED :)

By the way I forgot to mention in 2nd update that if you use RVOL Smoothing, there will be a slight difference between end of day RVOL value as calculated on daily basis and intraday basis.

But in the end the values don't carry much meaning, all we want is just a GREEN COLOR and a SMOOTH CURVE, right? So I will suggest to go ahead and use the smoothing parameter.


R4Rocket
从常用脚本中删除 添加到常用脚本

评论

Hey! Thank you for posting this. I have encountered an issue on a daily chart. R.VOL number showed is just a current volume divided by Average Volume of the Period. As I understood it should show R.VOL up to the same point in time you are at now. Am I right?
+1 回复
R4Rocket Alex_Xander
@Alex_Xander, Hi Alex !! Yes on daily timeframe it calculates RVOL based on daily average volume divided by that days volume till that time. So actually even if on the intraday basis the scrip is having elevated RVOL, on daily timeframe you will see the elevated RVOL only if that days volume at any point in time exceeds more than 2 - 3 times the daily volume average.

I agree with what you are trying to say, if market started at 9:30 and at 10 there is an elevated RVOL on intraday chart but on daily chart the RVOL is still low, why in the world is this happening??? So the problem is I couldn't get it to reference the lower timeframe values on higher timeframe. That would have been perfect wouldn't it be? But I don't know how to do that in pine script. Maybe it's not even possible right now. So all in all if you want to use RVOL intraday you will have to use it on intraday timeframes. No other alternative.
回复
Alex_Xander R4Rocket
@R4Rocket, Clear enough! Thank you!
回复
Don't you think that it would be nice to see what % of ATR it already moved from the Open? :))
回复
R4Rocket Alex_Xander
@Alex_Xander, Ummm....but that value will keep on changing, will it not? I mean if there is a clear trend from the beginning then it would increase, but if the day turns out to be a sideways day then that would mean first it moved 3% down and then it moved 2.5% up (hypothetically :P). That is why I added the high to low range at any point in time so it will indicate the volatility for the day.

Could you explain it to me how % ATR form open might help and I'd love to add it to the indicator. :)
回复
Alex_Xander R4Rocket
@R4Rocket, I mean basically it will be ((HOD-LOD)/ATR)*100.
It will change, but only positively (Grow). For example if ATR for 10 days is 5 USD and Current day range is 2.5 USD it will show 50% move.
回复
Alex_Xander Alex_Xander
@Alex_Xander, Or thats what your High-Low indicator does)))
回复
R4Rocket Alex_Xander
@Alex_Xander, Hahaha !! Actually that is EXACTLY what my indicator does :D.
(Btw if you want the code and modify it as per your liking, then I can give it to you. While publishing the script, I clicked on protected code and now it's stuck there, can't change it.)
回复
Alex_Xander R4Rocket
@R4Rocket, Thank you! I will see how it will work for me in current state and come back if something will be needed to be adjusted. Again - Thank you for posting it!:)
回复
R4Rocket Alex_Xander
@Alex_Xander, My pleasure !
回复
首页 股票筛选器 外汇筛选器 加密货币筛选器 财经日历 如何运作 图表功能 价格 推荐朋友 网站规则 帮助中心 网站 & 经纪商解决方案 插件 图表解决方案 轻量图表库 博客 & 新闻 Twitter
概览 个人资料设置 账户和账单 推荐朋友 代币 我的客服工单 帮助中心 已发表观点 粉丝 正在关注 私人消息 在线聊天 退出