Volume Label

BigScalp

Member
Since I use split screens for my charts and sometimes I can't see the volume unless I move the cursor up to the "floating" stock information, I'm looking for a Volume label for the top of my charts that shows the changing volume number for a 5M chart. I'm not looking for a volume indicator to install.

I don't use any volume indicator...try not to clutter my charts. The only volume information is on the stock "floating" information. The stock "floating" information I refer to is the information at the top of any chart which shows the date, time, open, high, low & close for each candle...including volume.

Again, sometimes the volume information gets cut off because I use split screens for multiple charts. I refer "cut off" because throughout the day while the "floating" stock information changes, the information shows longer and thus "cuts off" the volume information where the only way I can see it is to move my cursor over the "floating" stock information.

I literally just need a "volume" label that is always visible for any chart without having to put an actual volume indicator just to see the fluctuating number...or move the cursor over the "floating" stock information. I hope I've explained this clear enough to understand. It really seems like something that's very easy to do...if you have knowledge of coding. I literally just joined a few days ago and have seen multiple post with pictures with multiple labels at the top of their charts.
 
Last edited:
Solution
What timeframe are you watching on? I'll load up ToS later this weekend and have a look.
Mashume, I've done it tweaking a bit your original script: This is the final product:

def vol5 = if SecondsFromTime(0930) [1] <0 and SecondsFromTime(0930) >= 0 then volume(period = AggregationPeriod.FIVE_MIN) else vol5[1];

def vol15 = if SecondsFromTime(0930) [1] < 0 and SecondsFromTime(0930) >= 0 then volume(period = AggregationPeriod.FIFTEEN_MIN) else vol15[1];

AddLabel (yes, "1st 5 vol: " + vol5 , (if vol5 >= 1000000 then Color.GREEN else Color.RED));

AddLabel (yes, "1st 15 vol: " + vol15 , (if vol15 >= 5000000 then Color.GREEN else Color.RED));

Thank you so much!

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

Wait, really, that's it?

Code:
AddLabel(yes,volume,color.gray);

You can usually copy and paste code this simple right out of the reference:

https://tlc.thinkpipes.com/center/charting/thinkscript/reference/Functions/Look---Feel/AddLabel.html

Unfortunately, there is no parameter for the text color. Black is unreadable, at least on my screen.

Obviously, you can change it to Color.Black if you want to though.
@Joshua Yes, and thank you for your time. The number will fluctuate throughout the time period of that particular candle, correct?
 
I would like to create 2 labels to ease and speed decision making during trading: volume of the first 5 minute bar at the open and volume of the first 15 minute bar at the open. Ideally the labels would change colors after reaching an absolute number of 1 million shares traded on the first 5 minute candle and 5 million shares traded on the 15 minute. Any suggestions?
 
Last edited:
Sure.
Code:
declare upper;
def vol5 = if secondsFromTime(0930) > 0 and secondsFromTime(0930)[1] < 0 then VOLUME(period = AggregationPeriod.FIVE_MIN) else vol5[1];
def vol15 = if secondsFromTime(0930) > 0 and secondsFromTime(0930)[1] < 0 then VOLUME(period = AggregationPeriod.FIFTEEN_MIN) else vol5[1];
addLabel(yes, "Volume 1st 5 min candle: " + vol5, color.gray);
addLabel(yes, "Volume 1st 15 min candle: " + vol15, color.gray);
or something like that. I don't have ToS open at the moment, but that should be close.

-mashume
 
Sure.
Code:
declare upper;
def vol5 = if secondsFromTime(0930) > 0 and secondsFromTime(0930)[1] < 0 then VOLUME(period = AggregationPeriod.FIVE_MIN) else vol5[1];
def vol15 = if secondsFromTime(0930) > 0 and secondsFromTime(0930)[1] < 0 then VOLUME(period = AggregationPeriod.FIFTEEN_MIN) else vol5[1];
addLabel(yes, "Volume 1st 5 min candle: " + vol5, color.gray);
addLabel(yes, "Volume 1st 15 min candle: " + vol15, color.gray);
or something like that. I don't have ToS open at the moment, but that should be close.

-mashume
The labels show but they read "0"
 
What timeframe are you watching on? I'll load up ToS later this weekend and have a look.
Mashume, I've done it tweaking a bit your original script: This is the final product:

def vol5 = if SecondsFromTime(0930) [1] <0 and SecondsFromTime(0930) >= 0 then volume(period = AggregationPeriod.FIVE_MIN) else vol5[1];

def vol15 = if SecondsFromTime(0930) [1] < 0 and SecondsFromTime(0930) >= 0 then volume(period = AggregationPeriod.FIFTEEN_MIN) else vol15[1];

AddLabel (yes, "1st 5 vol: " + vol5 , (if vol5 >= 1000000 then Color.GREEN else Color.RED));

AddLabel (yes, "1st 15 vol: " + vol15 , (if vol15 >= 5000000 then Color.GREEN else Color.RED));

Thank you so much!
 
Solution

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
504 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