Tool: Add Spaces Between The Labels Of Different Studies For ThinkOrSwim

halcyonguy

Moderator - Expert
VIP
Lifetime
a tool that might help when creating a study.

this adds black spaces between the labels of 2 studies.

sometimes when too many labels are on a chart, i like to enable this study and pick a qty, to shift the labels in the study i am working on, onto a new row.

i also use this when taking screenshots, to shift the labels of the last study onto a new row, so the previous, unrelated labels aren't seen.


Ruby:
# label_shifter

input show_labels = no;
addlabel( show_labels,"label shifter", color.gray);

input qty_of_blank_labels = 3;
def qty = if qty_of_blank_labels > 10 then qty_of_blank_labels else if qty_of_blank_labels < 1 then 1 else qty_of_blank_labels;

# 20 chars
addlabel(show_labels and (qty >= 1), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 2), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 3), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 4), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 5), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 6), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 7), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 8), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 9), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 10), "-=========-=========" , color.black);
#


i tend to be working on too many studies at a time.
unchecking - show study, doesn't turn off labels or bubbles, so i tend to have too many labels visible.
on some studies, but not all, i add an input to control if labels are visible.

here is an example of using this study.
qty_of_blank_labels is set to 5,
to draw 5 black labels, each 20 chars wide.
on the list of loaded studies, i put this as the 2nd to last, and the study i am working on as the last, upper study.
the last 2 labels, cyan and yellow, appear after the black labels, making it easy to find them.
JWlb3ca.jpg
 
Last edited:

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

a tool that might help when creating a study.

this adds black spaces between the labels of 2 studies.

sometimes when too many labels are on a chart, i like to enable this study and pick a qty, to shift the labels in the study i am working on, onto a new row.

i also use this when taking screenshots, to shift the labels of the last study onto a new row, so the previous, unrelated labels aren't seen.


Ruby:
# label_shifter

input show_labels = no;
addlabel( show_labels,"label shifter", color.gray);

input qty_of_blank_labels = 3;
def qty = if qty_of_blank_labels > 10 then qty_of_blank_labels else if qty_of_blank_labels < 1 then 1 else qty_of_blank_labels;

# 20 chars
addlabel(show_labels and (qty >= 1), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 2), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 3), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 4), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 5), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 6), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 7), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 8), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 9), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 10), "-=========-=========" , color.black);
#
can you post a picture of your idea?
 
a tool that might help when creating a study.

this adds black spaces between the labels of 2 studies.

sometimes when too many labels are on a chart, i like to enable this study and pick a qty, to shift the labels in the study i am working on, onto a new row.

i also use this when taking screenshots, to shift the labels of the last study onto a new row, so the previous, unrelated labels aren't seen.


Ruby:
# label_shifter

input show_labels = no;
addlabel( show_labels,"label shifter", color.gray);

input qty_of_blank_labels = 3;
def qty = if qty_of_blank_labels > 10 then qty_of_blank_labels else if qty_of_blank_labels < 1 then 1 else qty_of_blank_labels;

# 20 chars
addlabel(show_labels and (qty >= 1), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 2), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 3), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 4), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 5), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 6), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 7), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 8), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 9), "-=========-=========" , color.black);
addlabel(show_labels and (qty >= 10), "-=========-=========" , color.black);
#


i tend to be working on too many studies at a time.
unchecking - show study, doesn't turn off labels or bubbles, so i tend to have too many labels visible.
on some studies, but not all, i add an input to control if labels are visible.

here is an example of using this study.
qty_of_blank_labels is set to 5,
to draw 5 black labels, each 20 chars wide.
on the list of loaded studies, i put this as the 2nd to last, and the study i am working on as the last, upper study.
the last 2 labels, cyan and yellow, appear after the black labels, making it easy to find them.
JWlb3ca.jpg
if you use this
Code:
CreateColor(27,27,27);
instead color.black it will give you the same background color in TOS. just in case that you want to put all them verticals
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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