RSI Format, Label, Watchlist, Scan For ThinkOrSwim

How can I change the color of the numbers. They are white and hard to see with the light colors. I tried to change it but couldn't figure it out. Thank you!
The ToS platform does not provide the ability to change the font color of numbers in watchlist.

The workaround is not useful:
The numbers can be changed to labels.
The ToS platform does allow the changing of the font color of labels in a watchlist.
But unless your watchlist is extremely short, this workaround is not helpful because labels cannot be sorted numerically, making the watchlist impossible to work with.
 
Hi,

I have a standard RSI watcht list column.

I am wondering if someone could help me with adding a "change in background color" function once certain thresholds are met. For example:

RSI < 30 = yellow background color of the cell
RSI > 70 = red background color of the cell

This is my first post. I read the rules. I searched the forum and did not find a similar discussion. I apologize if I am making a mistake by posting this question.

Thank you,
Fitz
 
def rsilength = 14;
def rsi = reference RSI(length = rsilength)."RSI";

plot myrsi = round (rsi,0);

def oversold = rsi < 30;
def overbought = rsi > 70 ;

AssignBackgroundColor( if oversold then color.yellow else if overbought then color.red else color.black);
 
def rsilength = 14;
def rsi = reference RSI(length = rsilength)."RSI";

plot myrsi = round (rsi,0);

def oversold = rsi < 30;
def overbought = rsi > 70 ;

AssignBackgroundColor( if oversold then color.yellow else if overbought then color.red else color.black);
Thank you so much!
 
I have tested it today and was wondering if there is a way to add that cells updated the RSI value in real-time or the TOS set interval?
 
I have tested it today and was wondering if there is a way to add that cells updated the RSI value in real-time or the TOS set interval?
Yes, the RSI value is real-time. RSI is based on the close of the candle so it will update at the close of whatever you set the timeframe of your watchlist. 5min updates every 5min, 1hr updates every hour.
 
Alerts and Watchlist in TOS

Hi Folks! I am not good at coding. I was wondering if someone here can help me figure out: (a) a way to add an indicator to my watchlist that when my RSI is at 50 I get some kind of indication (b) set an alert in TOS to alert me when my RSI is at 50? Thank You!
 
Last edited by a moderator:
Hi, need some help, i wanna make a scan ,
eg.
1. rsi cross up oversold ( 20 )
2. before cross up oversold, it should be "x" days (everyday) below oversold , pls help to code this thankyou
 
Hi, need some help, i wanna make a scan ,
eg.
1. rsi cross up oversold ( 20 )
2. before cross up oversold, it should be "x" days (everyday) below oversold , pls help to code this thankyou


this is a lower study that should work for a scan


Code:
# rsi_crossup_00
declare lower;

def na = double.nan;
input bars_below_oversold = 10;

# rsi inputs
input length = 14;
input over_Bought = 80;
input over_Sold = 20;
def rsix = rsi(length, over_Bought, over_Sold).rsi;

def cond = (rsix < over_Sold);
def condx = (sum(cond, bars_below_oversold) == bars_below_oversold);
def trigger = (rsix crosses above over_Sold and condx[1]);

# use this for a scan
plot z = trigger;
#



----------------------------

this is a lower chart study, for testing


Code:
# rsi_crossup_00
declare lower;

def na = double.nan;
input bars_below_oversold = 10;

# rsi inputs
input length = 14;
input over_Bought = 80;
input over_Sold = 20;
def rsix = rsi(length, over_Bought, over_Sold).rsi;

def cond = (rsix < over_Sold);
def condx = (sum(cond, bars_below_oversold) == bars_below_oversold);
def trigger = (rsix crosses above over_Sold and condx[1]);

# use this for a scan
#plot z = trigger;


#----------------------------

# for a scan, disable the code below

plot l = rsix;
plot os = over_Sold;

plot z = if trigger then over_sold else na;
z.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
z.SetDefaultColor(Color.green);
z.setlineweight(3);
z.hidebubble();

plot z2 = 100;
z2.SetDefaultColor(Color.black);
plot z1 = 0;
z1.SetDefaultColor(Color.black);
#
 
this is a lower study that should work for a scan


Code:
# rsi_crossup_00
declare lower;

def na = double.nan;
input bars_below_oversold = 10;

# rsi inputs
input length = 14;
input over_Bought = 80;
input over_Sold = 20;
def rsix = rsi(length, over_Bought, over_Sold).rsi;

def cond = (rsix < over_Sold);
def condx = (sum(cond, bars_below_oversold) == bars_below_oversold);
def trigger = (rsix crosses above over_Sold and condx[1]);

# use this for a scan
plot z = trigger;
#



----------------------------

this is a lower chart study, for testing


Code:
# rsi_crossup_00
declare lower;

def na = double.nan;
input bars_below_oversold = 10;

# rsi inputs
input length = 14;
input over_Bought = 80;
input over_Sold = 20;
def rsix = rsi(length, over_Bought, over_Sold).rsi;

def cond = (rsix < over_Sold);
def condx = (sum(cond, bars_below_oversold) == bars_below_oversold);
def trigger = (rsix crosses above over_Sold and condx[1]);

# use this for a scan
#plot z = trigger;


#----------------------------

# for a scan, disable the code below

plot l = rsix;
plot os = over_Sold;

plot z = if trigger then over_sold else na;
z.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
z.SetDefaultColor(Color.green);
z.setlineweight(3);
z.hidebubble();

plot z2 = 100;
z2.SetDefaultColor(Color.black);
plot z1 = 0;
z1.SetDefaultColor(Color.black);
#
Thank you so much !!! another question, can i change rsi to stochasticFULL ? is it just replace (rsi ) to stochasticFULL ?
 
Thank you so much !!! another question, can i change rsi to stochasticFULL ? is it just replace (rsi ) to stochasticFULL ?
Sure, go for it. Come back and tell us how it works out.
 
Last edited:
.

RSI Column... I am looking for a count of RSI above 50 (showing RSI plus counts) with label green, below 50 with label in red
AssignBackgroundColor( if RSI above 50, 51,53 etc, counts total above 50, then color green. If RSI below 50, 49, 48, etc, counts total below 50 then color.red ); I want to keep count of how long RSI above/or below 50
Please help
Thank you
 
Last edited by a moderator:
I need to paint candles when the RSI is above 50 paint green, below is red. Thanks
 
Last edited by a moderator:
@JustDoIt @hazmat8039
Code:
################################################################
##########                 Input                       #########
################################################################
input paintBars = {OFF, default ON};


# RSI
input rsiLength = 16;
input rsiAverageType = AverageType.WILDERS;


################################################################
##########                 Calc                        #########
################################################################
def rsiClose = close;
def NetChgAvg = MovingAverage(rsiAverageType, rsiClose - rsiClose[1], rsiLength);
def TotChgAvg = MovingAverage(rsiAverageType, AbsValue(rsiClose - rsiClose[1]), rsiLength);
def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0;
def RSI = 50 * (ChgRatio + 1);


################################################################
##########                 Paint Bars                  #########
################################################################
AssignPriceColor(if !paintBars then Color.CURRENT
else if RSI < 50 then Color.Red
else Color.Green);
 
Last edited by a moderator:
  • Love
Reactions: IPA
I'm looking for an RSI study , that plots in real-time, with the following:

  • 50% and configurable Oversold(eg 30) , Overbought(eg 70) lines..,
  • Shade areas (green when RSI>50 , Red when RSI<50)
  • plot arrows on the lower study when value crosses overbought & oversold conditions..(red arrow when RSI crosses 70 down, green arrow when value crosses 30 up)

Can you pls point me to such a study , it it exists already? Or can someone help putting this lower study, if it isnt already out there?

thanks!
 
Last edited by a moderator:
@uTSusr07A Here you go:

Code:
#
# TD Ameritrade IP Company, Inc. (c) 2007-2023
#

declare lower;

input length = 14;
input over_Bought = 70;
input over_Sold = 30;
input price = close;
input averageType = AverageType.WILDERS;
input showBreakoutSignals = no;

def NetChgAvg = MovingAverage(averageType, price - price[1], length);
def TotChgAvg = MovingAverage(averageType, AbsValue(price - price[1]), length);
def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0;

plot RSI = 50 * (ChgRatio + 1);
plot OverSold = over_Sold;
plot OverBought = over_Bought;
plot UpSignal = if RSI crosses above OverSold then OverSold else Double.NaN;
plot DownSignal = if RSI crosses below OverBought then OverBought else Double.NaN;

UpSignal.SetHiding(!showBreakoutSignals);
DownSignal.SetHiding(!showBreakoutSignals);

RSI.DefineColor("OverBought", GetColor(5));
RSI.DefineColor("Normal", GetColor(7));
RSI.DefineColor("OverSold", GetColor(1));
RSI.AssignValueColor(if RSI > over_Bought then RSI.color("OverBought") else if RSI < over_Sold then RSI.color("OverSold") else RSI.color("Normal"));
OverSold.SetDefaultColor(GetColor(8));
OverBought.SetDefaultColor(GetColor(8));
UpSignal.SetDefaultColor(Color.UPTICK);
UpSignal.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
DownSignal.SetDefaultColor(Color.DOWNTICK);
DownSignal.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);

#customizations
input mid_line = 50;
plot new_line = mid_line;
AddCloud(new_line, overbought, color.green, color.green);
AddCloud(new_line, oversold, color.red, color.red);
 
Hey guys,

I was trying to add 30/50/70 lines to RSI in ThinkorSwim, however none of the scripts I came up with worked ( I am new to thinkscript). Does anyone know how to add those or have a thinkscript to share?

Thanks!
Sophie
 
Hey guys,

I was trying to add 30/50/70 lines to RSI in ThinkorSwim, however none of the scripts I came up with worked ( I am new to thinkscript). Does anyone know how to add those or have a thinkscript to share?

Thanks!
Sophie

Ruby:
plot rsi = rsi();
plot fifty = 50;
plot thirty = 30;
plot seventy = 70;
also look through these 11 pages for the other cool formatting that members include in their RSI study.
 
Last edited:

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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