VWAP Cloud For ThinkOrSwim

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:

Tej_Pra

New member
Hello there,
Please can someone help me to add a cloud between two VWAP lines.
I need a green cloud between +1.5 and +2.0 for higher price range and
red cloud between -1.5 and -2.0 for lower price range.
 

Attachments

  • VWAP_Range.png
    VWAP_Range.png
    82.9 KB · Views: 165
@Trader4TOS
When I compare the built-in VWAP deviation lines against VWAPCloud linesthe results are wildly different. I recognize you removed a lot of the ToS code.
You have set yours at declare lower but that is not helpful as I cannot see Price breaking across the Deviation lines. So I was trying to overlay your Cloud onto the Price chart. Clearly is not working as expected for me.
VWAP cloud result as quite smooth compare to ToS VWAP. Can you shed some light on this for me? Thanks.
 

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
360 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.
Back
Top