VWAP Average Indicator for ThinkorSwim


Well-known member
A fast and slow moving average of the VWAP since someone requested it. Again never used it. Play with it and report any results. I see little use for it.

##  VWAPMovAvg2Line_JQ


# two line simple or exponential moving average

# by JQ 2008-08-31

# Not my own code... thinkMOney maybe

def VWAP = vwap();

input displace = 0;

input fastlength = 6;

input price = close;

input slowlength = 13;

input Averagetype = {default Exponential, Simple};

plot fastavg;

plot slowavg;

switch (Averagetype)


case Simple:

    fastavg = Average(vwap[-displace], fastlength);

    slowavg = Average(vwap[-displace], slowlength);

case Exponential:

    fastavg = ExpAverage(vwap[-displace], fastlength);

    slowavg = ExpAverage(vwap[-displace], slowlength);

Last edited by a moderator:


Well-known member


Well-known member
@Nick Sure. It is linear regression channel. ToS has some under linearregch> ToS has a 50, 100 and var. Also can use standarddevchannel or standarderrorchannel. Probably better to go with standard deviation channel it is easier to understand. Set it at 1.3 or 2 . If you want the 5 lines add two studies and set one to 1.3 and the other to 2.0


Well-known member
@horserider Thank you for your input on the top of the chart. I see very little use for the moving averages as well. As I understand it, the LRC was added by you in this instance and is not part of the code.

Similar threads