Is there a way to assign lower background color?

Solution
I have a similar question - I have an indicator that plots against the zero line in a lower panel. Can I make the background of the lower panel green above the zero line and red below the zero line regardless of what the indicator does so that the background above the zero line is always green and below the background is always red?

You can add clouds between zero and positive infinity and negative infinity. I remember correctly, you can disable highlight studies on mouse hover to prevent it from becoming too annoying. It also messes with the right click context menu. Clouds are transparent - repeating them so there are multiple clouds overlapping will make them darker. Personally, I find its better to just change color...
I have a similar question - I have an indicator that plots against the zero line in a lower panel. Can I make the background of the lower panel green above the zero line and red below the zero line regardless of what the indicator does so that the background above the zero line is always green and below the background is always red?
 

Joshua

Well-known member
VIP
I have a similar question - I have an indicator that plots against the zero line in a lower panel. Can I make the background of the lower panel green above the zero line and red below the zero line regardless of what the indicator does so that the background above the zero line is always green and below the background is always red?

You can add clouds between zero and positive infinity and negative infinity. I remember correctly, you can disable highlight studies on mouse hover to prevent it from becoming too annoying. It also messes with the right click context menu. Clouds are transparent - repeating them so there are multiple clouds overlapping will make them darker. Personally, I find its better to just change color of the values rather than the background.

Changing the actual background color with AssignBackgroundColor() from within a study will change the entire chart, not just that of the study.

Code:
declare lower;
plot Histo = open - close;
Histo.setpaintingStrategy(paintingStrategy.HISTOGRAM);
Histo.setdefaultColor(color.blue);
AddCloud(double.POSITIVE_INFINITY,0,color.green);
AddCloud(double.NEGATIVE_INFINITY,0,color.red);

VwgfIYz.png
 
Solution

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