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:

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