I am having trouble with setting up a scan to find stocks that are within 0.20$ of VWAP. I'm using the scan below with a 1min timeframe yet the stocks it returns have values sometimes more than 2$ from VWAP. Can someone help with this?
Code:
def vw=vwap;
plot diff =absvalue((close -vw)) < 0.20 within 2 bars;