Buy / Sell Dollar Volume For ThinkOrSwim

viswa

New member
Here is a DVM(Dollar Volume Master) Indicator that I finished today - here is what it shows
1) Total dollar volume
2) Buy dollar volume and % with respect to total dollar volume
3) Sell dollar volume and % with respect to total dollar volume
4) Buy dollar volume and % turns green - if buying is higher than selling
5) Sell dollar volume and % turns green - if selling is higher than buying
6) After adding the study - click on gear icon next to the study where you can change the time.
7) Example: If you are on Daily chart then 0 = Today, 1 = Yesterday, 2 = Day before yesterday and so on.
8) If you are on weekly chart then 0 = current week, 1 = last week, 2 = couple of weeks back etc. Same for months. When I tested it went as back 2000 days, 1100 weeks and 250 Months back data.
9) Always use Time = 0 for Intraday. Intraday means any time frame under a day like 4H, 1H, 15M, 5M, 1M chart etc.

***Study Code
#DVM - Dollar Volume Master
Input Time = 0;
def DollarVolume = round(close * volume);
def O = open;
def H = high;
def C = close;
def L = low;
def V = volume;
def Buying = V*(C-L)/(H-L);
def Selling = V*(H-C)/(H-L);
def BuyDV = round(close * Buying);
def SellDV = round(close * Selling);

def DollarVolume0 = DollarVolume[Time];
def BuyDV0 = BuyDV[Time];
def BuyDVPer = round((BuyDV0 / DollarVolume0) * 100);
def SellDV0 = SellDV[Time];
def SellDVPer = round((SellDV0 / DollarVolume0) * 100);

AddLabel(Yes, "N-" + Time + " Total $ Vol : " + AsDollars (DollarVolume0), Color.WHITE);
AddLabel(yes, "N-" + Time + " Buy $ Vol : " + AsDollars(BuyDV0), (if BuyDV0 > SellDV0 then Color.Green else Color.Red));
AddLabel(yes, BuyDVPer +"%", (if BuyDV0 > SellDV0 then Color.Green else Color.Red));
AddLabel(yes, "N-" + Time + " Sell $ Vol : " + AsDollars(SellDV0),(if SellDV0 > BuyDV0 then Color.Green else Color.Red));
AddLabel(yes, SellDVPer +"%", (if SellDV0 > BuyDV0 then Color.Green else Color.Red));
 

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
550 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