CapitalMastery

Rolling Multiday VWAP

Couldn't find a VWAP script that worked the way I needed so I created this one. Basically, it provides a multiday rolling VWAP. I made the rolling period configurable, but I primarily use it to add a 2 day VWAP to my chart alongside the standard VWAP indicator. This unique thing that this indicator does is dynamically anchor to the configured period, but starting from today backwards.


Basically, this indicator ensures VWAP never anchors to the current day, but instead always shows a 2 day VWAP on today's charts. The problem I had with other indicators is that every other day my 2 day VWAP indicator would anchor to the current day and essentially become a redundant standard VWAP indicator.

Hope to update in the future to dynamically update based the chart day you have in focus, but will need some time to figure out if that's even possible.
Release Notes:
Refactored the original indicator/script to fix a number of bugs, and make the lookback period (in days) configurable. Enjoy!
Release Notes:
Updated chart, and added documentation.
Release Notes:
Fixed lookback period bug
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?