# Turn the chart color
AssignBackgroundColor(
if RSI2 < RSI3 then color.green else
if RSI2 > RSI3 then color.pink else color.current);
I'm curious if its possible to change the chart color based on a couple of indicators.
Particularity a long and short RSI, say 14 and 7 (or 10 minute and 5 minute)
Turn the chart red if there is a large gap between the short and long (with short being under) and vice versa.
# long and short RSI, say 14 and 7
def RSI7 = RSI("length" = 7) ;
def RSI14 = RSI("length" = 14) ;
# Turn the chart red
AssignBackgroundColor(
if RSI7 < RSI14 then color.red else color.green);
# Turn the chart color
AssignBackgroundColor(
if RSI2 < RSI3 then color.green else
if RSI2 > RSI3 then color.pink else color.current);
The ToS platform requires definitions that would trigger the colors.Is there a way to change the chart background color based on what I have circled in yellow. For both oversold and overbought conditions?
Like a light red for OB and light green for OS? These particular RSI's on this 5 minute chart are the 1hr and 4hr..
https://1drv.ms/u/s!AgXNDtw32l9YgpcqAzI9bgiqRvmVOw?e=IyIVRy
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Start a new thread and receive assistance from our community.
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.
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.