//@version=6 indicator("Workshop 11 Anchored VWAP", overlay=true) anchor = input.time(timestamp("01 Jan 2026 00:00 +0000"), "Anchor time") active = time >= anchor var float pv = 0.0 var float total = 0.0 var bool bad = false if active bad := bad or na(volume) if not na(volume) and volume > 0 pv += hlc3 * volume total += volume value = (active and not bad and total > 0 ? pv / total : na) plot(value, "Bar weighted VWAP", color=color.blue, linewidth=2, style=plot.style_linebr) bgcolor(active and bad ? color.new(color.red, 88) : na)