VWAP for Last 1 hour of the day

I am trying to draw VWAP for a last hour of the trading session (14:30 to 15:30).

I tried following but some thing is missing

_SECTION_BEGIN("VWAP (EOD)  ");
 
Bars_so_far_today = 1 + BarsSince( Day() != Ref(Day(), -1));
StartBar = ValueWhen(TimeNum() == 143000, BarIndex());
TodayVolume = Sum(V,Bars_so_far_today);
IIf (BarIndex() >= StartBar, VWAP = Sum (C * V, Bars_so_far_today  ) / TodayVolume,0);
Plot (VWAP,"VWAP (EOD)",colorYellow, styleDashed+styleThick);

_SECTION_END();

How do i tell Ami to caluclate Volume from 1430 instead of from beginning of the day (
Bars_so_far_today) ... Appreciate your help

I am doubtful. Still I believe we can use TimeFrameGetPrice( "V", inHourly, -1 )

@amsai I don't do much intraday so am just taking a stab here, but this seems to count your bars and sum your volume after 14:30

bi = BarIndex();
StartBar = ValueWhen( TimeNum() == 143000, BarIndex() );
BarsFrom1430 = IIf( TimeNum() >= 143000, ( bi - StartBar ), Null );
VolumeAfter1430 = Sum( V, BarsFrom1430 );

Here is an example on 15 minute bars
image

1 Like