VWAP Average Indicator for ThinkorSwim

H

horserider

Well-known member
VIP
Warehouse
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.

Code:
##  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:
H

horserider

Well-known member
VIP
Warehouse
@Nick Nope . LRC s Drawn automatically
 
H

horserider

Well-known member
VIP
Warehouse
@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
 
markos

markos

Well-known member
VIP
Warehouse
@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.
 
H

horserider

Well-known member
VIP
Warehouse
@markos People wanted VWAP studies, I posted VWAP studies. Yes, correct should have removed the LRC before taking the screenshot.
 
markos

markos

Well-known member
VIP
Warehouse
@horserider It's all good. I shouldn't have commented at all.
 

Top