Moving Volume Weighted Average Price (MVWAP) For ThinkOrSwim


Staff member

Moving Volume Weighted Average Price (MVWAP)

A poster requested this indicator based on the definition found in Investopedia.
An MVWAP is basically an average of the VWAP values. VWAP is only calculated per day, but MVWAP can move from day to day because it is an average of an average. This provides longer-term traders with a moving average volume weighted price.

Code has been updated to include Bollinger Bands. Click on the gear settings to turn them on or off.
I have not used it but as it is a simple study, I wrote up the syntax. If you find a use for it, report back.

# Moving volume weighted average price (MVWAP)
input n_periods = 10 ;
input BBlength = 10;
input BBNum_Dev = 1.0;
input showBands = yes ;

def VWAP = reference VWAP("time frame" = "DAY")."VWAP" ;
plot MVWAP = average(VWAP,n_periods) ;

MVWAP.SetDefaultColor(color.magenta) ;

plot BB_Upper = reference BollingerBands(price = MVWAP, length = BBlength, Num_Dev_Dn = -BBNum_Dev, Num_Dev_Up = BBNum_Dev).UpperBand;
def BB_Lower = reference BollingerBands(price = MVWAP, length = BBlength, Num_Dev_Dn = -BBNum_Dev, Num_Dev_Up = BBNum_Dev).Lowerband;

AddCloud(if showBands then BB_Upper else double.NaN, if showBands then BB_Lower else double.NaN, Color.GRAY, Color.GRAY);
Shared Link:
Easiest way to load shared links
Last edited:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
266 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

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?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.