VWAP on Real Time Data

Hi,

When I run the script below on a 1 minute chart, or anything less than a day, the offset VWAP value is from the prior day(s) rather than the prior bars. The correct value is shown on a VWAP tool on the chart.

Is there something I’m missing? There usually is!! :slight_smile:

Thanks - and a Happy New Year to everyone!!

 

VWCheck = VWAP() ;

VW1 = VWCheck[1] < CLOSE()[1] ;
VW2 = VWCheck[2] < CLOSE()[2] ;
VW3 = VWCheck[3] < CLOSE()[3] ;
VW4 = VWCheck[4] < CLOSE()[4] ;

VWTrue = VW1 and VW2 and VW3 and VW4 ;

VWTrue