ZenAndTheArtOfTrading

Cumulative Volume Average

Hey traders!

I've received dozens of requests for this style of Cumulative Volume indicator over the past year since I released my RVOL By Time and standard RVOL indicators.

After studying Pine Script deeply and using a bit of old fashioned trial and error over the past few months, I finally got it to work!

This script adds up the cumulative volume throughout any given trading day (the blue & green volume bars) on any given intraday timeframe on any given market - and then it compares that cumulative volume value to the total volume of the previous day AND the average cumulative volume of the previous X days for whatever time of day the current bar is printing on.

By default it compares today's cumulative volume to yesterday's, but you can set the Lookback higher in the settings menu if desired.

It even takes into consideration random gaps in price action (unlike my RVOL By Time indicator) – so as far as I can tell, it’s as accurate as I can possibly make it.

However it does not work on extended hours for stocks so don’t use it if you have pre-market hours enabled. And there is an inbuilt limitation to how many bars a script can reference on TradingView, so on 5-minute timeframes and lower your Lookback period will be limited and may crash the script if you set it too high.

The PURPLE LINE is the total volume of the previous day.
The GRAY COLUMN is the average cumulative volume of the previous X days.
The COLORED COLUMN is the current cumulative volume for the current bar.

The BLACK LINE is the Previous Cumulative Volume Line which represents the average cumulative volume for the past X days. It only draws if today’s CV exceeds the average – this is useful for comparing exactly how far today’s cumulative volume exceeds the average, but it can be turned off in the Style menu if you don't want it there.

The ORANGE NUMBER is the ratio of today's CV compared to the average (CV ÷ Average CV).

If the current cumulative volume is less than the previous day's cumulative volume for that time of day, the bar is blue.

If the current cumulative volume is greater than the previous day's cumulative volume for that time of day, the bar is dark green.

If the current cumulative volume is greater than the previous day's total volume, the bar is bright green.

This script also comes with alert functionality.

You can set a Cumulative Volume Alert which will trigger an alert if the current bar's cumulative volume exceeds the average cumulative volume for that time of day.

You can also set a Total Cumulative Volume Alert which will trigger an alert only if the current bar's cumulative volume exceeds the total volume of the previous day.

And you can set a CV Ratio Alert which will trigger an alert if today's CV ÷ Average CV >= Specified Ratio.

Apart from that, the script is fairly self-explanatory so I hope you enjoy using it!

Check my signature for a link to the source code + all my other indicators.

Good luck with your trading, and feel free to drop any suggestions or bug reports and I'll do my best to help out :)

Kind regards,
Matthew
版本注释:
-
- Improved CV ratio accuracy to 2 decimal places
- Fixed deprecated "transp" warnings
版本注释:
-
- Fixed lookback setting
版本注释:
Updated to Pine Script v5

My Resources Hub: theartoftrading.com
FREE YouTube Lessons: rebrand.ly/zyt
FREE Pine Script Basics Course: rebrand.ly/zpsbc
Pine Script MASTERY Course: rebrand.ly/zpsmc
My Indicators & Strategies: rebrand.ly/zmisc
受保护脚本
该脚本是闭源发布的,您可以自由使用它。您可以收藏它以在图表上使用。您无法查看或修改其源代码。
免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?