avwap time frames

hi there! i’ve been wondering how i would script in the analysis tool to calculate % distance from the most recent price to the avwap pegged to various times throughout the day on the charts at low as 1min.

any help appreciated!

Hi Joshua,

Here’s how to script for intraday timeframes, but it looks as though AVWAP scripting uses dates only, without an option to include time.

However, this will give the value of the AVWAP from the first bar of the day: