Add Color To Watchlist Columns In ThinkOrSwim

jonesjb

New member
VIP
I'm trying to use the DefineGlobalColor function and reference within my "Custom Quotes" column around certain criteria (changing the text and background to highlight a signal. However, I'm unable to use the custom RGB Color I set up, it comes in as white. When I use the standard color, it works. Am I missing something, or is it just not possible to use custom colors in Custom Quotes?
 

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

1. No, the DefineGlobalColor function cannot be utilized in ToS watchlist columns
2, But yes, you can use a custom RGB color in ToS watchlist columns

What to know about adding color to watchlist column scripts:
1. The ToS platform does not provide the ability to color the TEXT in a NUMERIC column; it defaults to black ALWAYS.
*2. You can color the TEXT in an ALPHABETICAL column by creating a label within the column.
3. You can color the BACKGROUND of any column.
*if the spread in the numbers is wide; you will have problems attempting to sort alphabetical columns in a numerical order. It will sort 1 10 and 100 together.

cIJJq5g.png

shared watchlist column ALPHA link: http://tos.mx/zJmbaVF Click here for --> Easiest way to load shared links
shared watchlist column NUMERIC link: http://tos.mx/DRFG4xR

Syntax for the Alpha column:
Ruby:
def pctChange = (close-close[1])/close[1];

AddLabel(yes, asPercent(pctChange),
if pctchange>.1 then CreateColor(0,180,180) else  #aquamarine
if pctchange>.05 then CreateColor(0,165,0) else #green
if pctchange<0 then CreateColor(255,100,60) else #redOrange
 CreateColor(160, 120, 25) ); #brown green

AssignBackgroundColor(
if pctchange > 0 then CreateColor(209, 243, 235) else CreateColor(227, 208, 178));

Syntax for the Numeric column:
Ruby:
def pctChange = (close-close[1])/close[1];
plot asPCT = round(pctChange*100,2);

AssignBackgroundColor(
if pctchange>.1 then CreateColor(0,180,180) else  #aquamarine
if pctchange>.05 then CreateColor(0,165,0) else #green
if pctchange<0 then CreateColor(255,100,60) else #redOrange
 CreateColor(160, 120, 25) ); #brown green
@jonesjb
 
Last edited:

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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