The benefit of using Color.UPTICK vs. Color.Blue

Englewood85

New member
In this code, I am using UPTICK and DOWNTICK as a color. Not sure how UPTICK and DOWNTICK can be actual colors though.

Code:
declare lower;
input length = 12;
plot Momentum = close - close[length];
Momentum.DefineColor("Positive", Color.UPTICK);
Momentum.DefineColor("Negative", Color.DOWNTICK);
Momentum.AssignValueColor(if Momentum >= 0 then Momentum.Color("Positive") else Momentum.Color("Negative"));


Here I am hardcoding specific colors instead of using UPTICK and DOWNTICK

Code:
declare lower;
input length = 12;
plot Momentum = close - close[length];
Momentum.DefineColor("Positive", Color.BLUE);
Momentum.DefineColor("Negative", Color.GREEN);
Momentum.AssignValueColor(if Momentum >= 0 then Momentum.Color("Positive") else Momentum.Color("Negative"));


Here are my questions:

1. Whether I use UPTICK/DOWNTICK vs. BLUE/GREEN, either way I can open the properties window and change colors. So what is the benefit of using UPTICK/DOWNTICK instead of hardcoding specific colors?

2. Whether I use UPTICK or BLUE, thinkScript knows that the color choosen corresponds to an upward movement. This is true even if I change the color name "Positive" to something else. When I change the color (for example to orange) in the GUI for the first color choice (which is the one labeled "Positive"), how does thinkScript automatically know that the color I changed to (orange) corresponds to the upward movement of the plotted line?

3. Is there anyway to select a block of lines, then comment out those lines all at once, instead of line by line?
 

BenTen

Administrative
Staff member
Staff
VIP
Lifetime
You can see a set of constants for colors here.

Uptick is basically light green and Downtick is light red.

I don't think the system knows if orange is bullish or bearish, you have to define that in your script.
 

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