I can provide a solution for one of the plots on the VWAP study. You will have to work out the rest yourself. I only get 15 minutes to provide each free solution in the Q&A Forum and this is what I was able to complete in that brief amount of time:
input percentThreshold = 0.5;
input consecutiveBars = 15;
input numDevDn = -2.0;
input numDevUp = 2.0;
input timeFrame = {default DAY, WEEK, MONTH};
input maLengthOne = 50;
input maTypeOne = AverageType.EXPONENTIAL;
input maPriceOne = close;
def vwapPlot = reference VWAP(numDevDn, numDevUp, timeFrame).VWAP;
def upperPlot = reference VWAP(numDevDn, numDevUp, timeFrame).UpperBand;
def lowerPlot = reference VWAP(numDevDn, numDevUp, timeFrame).LowerBand;
def maOne = MovingAverage(maTypeOne, maPriceOne, maLengthOne);
def percentDiff = 100 * (maOne / vwapPlot - 1);
def pattern = AbsValue(percentDiff) < percentThreshold * 0.01;
plot scan = Lowest(pattern, consecutiveBars) > 0;
This covers the main plot of the VWAP study. I have included variables for the upper and lower bands to make it easier for you to adjust the code to work with those plots. I have included a user input for the percent threshold as well as the consecutive bars. Standard inputs were included to adjust the VWAP study and the moving average.