# VWAP Average Indicator for ThinkorSwim

#### horserider

##### Well-known member
VIP
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:

#### Attachments

• 7WJJFw1.png
188.3 KB · Views: 162
are those 5 lines manually drawn?

#### Attachments

• 7WJJFw1.png
188.3 KB · Views: 154
@Nick Nope . LRC s Drawn automatically

@Nick Nope . LRC s Drawn automatically
My bad, may i know where can i find the codes for the LRC....btw..what does LRC mean?

@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

@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.

@markos People wanted VWAP studies, I posted VWAP studies. Yes, correct should have removed the LRC before taking the screenshot.

@horserider It's all good. I shouldn't have commented at all.

87k+ Posts
237 Online

## The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
• Exclusive indicators
• Proven strategies & setups
• Private Discord community
• Exclusive members-only content
• 1 full year of unlimited support

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?