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