Trader4TOS
Member
VWAP with an added cloud between two VWAP lines with a green cloud between +1.5 and +2.0 for a higher price range and a red cloud between -1.5 and -2.0 for a lower price range. Customizable options in the menu.
Ruby:
#created by Trader4TOS
# VWAP (Volume Weighted Average Price) Indicator with Cloud
# This script calculates and plots the VWAP line and adds a cloud between two VWAP lines
declare lower;
input length = 20;
input upperRange = 1.5;
input lowerRange = -1.5;
def cumVolume = Sum(volume, length);
def cumPV = Sum((high + low + close) / 3 * volume, length);
def vwap = cumPV / cumVolume;
plot VWAPLine = vwap;
VWAPLine.SetDefaultColor(Color.CYAN);
VWAPLine.SetLineWeight(2);
def upperVWAP = vwap + upperRange;
def lowerVWAP = vwap + lowerRange;
AddCloud(upperVWAP, vwap, Color.GREEN, Color.GREEN);
AddCloud(lowerVWAP, vwap, Color.RED, Color.RED);
Last edited by a moderator: