vnhilton

PM RTH AH VWAPs [vnhilton]

FOR STOCKS ONLY.

Simply 3 different VWAPs for the pre-market, regular trading session, and the after hours, using session.is_ variables (not sure if they were recently added. Regardless, it would be nice to have a session.isfirstbar_postmarket variable to avoid having to write the code for calculating VWAP instead of simply using a ta.vwap function). Treats all 3 sections of the day as separate sessions with their own characteristics i.e. differing levels of liquidity and market dynamics. I would argue this is better than just using a VWAP calculated from the pre-market open until after hours close, as it would make using the VWAPs as a benchmark more accurate when taking trades at these different periods of the day.
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?