RSI Format, Label, Watchlist, Scan For ThinkOrSwim

Azzy19

New member
Hi, I'm struggling to find and create an alert for RSI crossing 30 (Oversold), and 70(Overbought). Is their a way to set an alert for a security when it's RSI behaves like this?

Thanks!
 
Last edited:

theelderwand

Active member
2019 Donor
VIP
Navigate to Marketwatch -> Alerts

Type the security you are interested in and click on Study Alert.

Go to thinkscript editor and enter the following

Code:
RSI() crosses above 30 or RSI() crosses below 70

You can edit it as you need it. There should be an RSI Crossover as well.
Below screenshot.

5qTVWv5.png
 
Last edited by a moderator:

TradeUp

Member
2019 Donor
Can anyone create an indicator that chimes an alert when RSI becomes oversold or overbought? I would appreciate it.
 

theelderwand

Active member
2019 Donor
VIP
@TradeUp You can do cool things with TOS. You can automatically setup a scan and make it into a watchlist an get alerts when symbols come in or go out of the list as well. Let me know if you are interested, I can share it out.
 

Steve2286

New member
2019 Donor
Hi does anyone know how to add a watchlist column to ThinkorSwim that just show the current RSI value on a 5 min chart?

Code:
# RSI Watchlist Column
# Mobius

def c = if isNaN(close) then c[1] else close;
def NetChgAvg = Average(c - c[1], 14);
def TotChgAvg = Average(AbsValue(c - c[1]), 14);
def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0;
plot RSI = 50 * (ChgRatio + 1);
 

BenTen

Administrative
Staff member
Staff
VIP
@Steve2286 That's already built into ToS. You just have to add it to your watchlist. By default it will show RSI on the daily chart. Be sure to change it if you can to use other timeframe.

v4SOYsi.png
 

BenTen

Administrative
Staff member
Staff
VIP
@Steve2286 I see. You can add a new Custom Quote, add a new condition > pick RSI as value and then select your timeframe.

7M2KGlM.png
 

BenTen

Administrative
Staff member
Staff
VIP
Give this a try:

Code:
def rsi = RSIWilder("over bought" = 95, "over sold" = 5, price = close(period = AggregationPeriod.FOUR_DAYS));
AddLabel(yes, rsi, if rsi >= 95 or rsi <= 5 then Color.RED else Color.WHITE);

Source
 

Miket

Member
Just a small black box. not sure how to fix it

Code:
# beginning of code ———————- –
# current ADX as a label at top of the chart
#
# Label color changes according to value of ADX:
# . Green if >25
# . Gray if 20 to 25
# . Red if < 20
# . Red if < 20 # input length = 14; plot currentADX = ADX(length); currentADX.hide();
input length = 14;
plot currentADX = ADX(length);
currentADX.hide();
DefineGlobalColor(“ADXHigh”, CreateColor(50, 205, 50));

DefineGlobalColor(“ADXLow”, Color.RED);
DefineGlobalColor(“ADXMid”, Color.GRAY);
AddLabel (yes, (Concat(“ADX = “, Round(currentADX,1))),if currentADX > 25 then GlobalColor(“ADXHigh”) else if currentADX < 20 then GlobalColor("ADXLow") else GlobalColor("ADXMid")); # end of code ——————————-
 

horserider

Well-known member
VIP
Code:
# SimpleMovingAvg RSI label by Horsrider 10/10/2019

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

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);

AddLabel(yes, rsi, if rsi >= over_Bought  or rsi <= over_Sold then Color.RED else Color.GREEN);
 

Branch

Member
VIP
I would like to have a label (AddLabel) that tells me that the RSI trending higher or lower based on the close. Something like an if statement.
If the OHLC4 RSI percentage is higher than the previous RSI percentage on the the OHLC4 close then"Higher" the label will show Higher and the color I want to be green. Note: I can handle the color part, I just need help with this if statement.

How can I get that thought in ThinkScript?
 

tomsk

Well-known member
VIP
@Branch Here is a simple label that compares two RSI values and displays whether the RSI is RISING or FALLING over n periods
I have color coded the label green, pink, and yellow

Code:
input n = 21;
def RSI_ = RSI(14, 70, 30, close, AverageType.WILDERS);
def RSIUP = RSI_ > RSI_[n];
def RSIDN = RSI_ < RSI_[n];
addlabel(1, "RSI : " + Round(RSI_,2) + (if RSIUP then " RISING [" + n + " BARS]"
                                        else if RSIDN then " FALLING [" + n + " BARS]"
                                        else " NEUTRAL"),
if RSIUP then Color.GREEN else if RSIDN then Color.PINK else Color.YELLOW);
 

Similar threads

Top