Display RSI label on ThinkorSwim?

N

Nikola

New member
it shows up only on the 1hr chart, is there a way to make it show on all charts

for reference this is what my ATR chart label is and it shows up on ALL charts

Code:
# ItsMeKola 08/2020
# Label color changes according to value of ATR:
# . Green if > 2
# . Lime if .50 to 1.99
# . Red if < .49
#

declare upper;

input ATRLength = 14;
input averagetype = AverageType.simple;
input BasePeriod = AggregationPeriod.DAY;
input showlabel = yes;

def ATR = MovingAverage (averagetype, TrueRange(high(period = BasePeriod)[1], close(period = BasePeriod)[1], low(period = BasePeriod)[1]), ATRLength);


DefineGlobalColor("ATRHigh", color.green);
DefineGlobalColor("ATRLow", Color.red);
DefineGlobalColor("ATRMid", Color.lime);

AddLabel (yes, (Concat("ATR: ", Round(ATR, 2))), if ATR > 2 then GlobalColor("ATRHigh") else if ATR < .49 then GlobalColor("ATRLow") else GlobalColor("ATRMid"));
 
N

Nikola

New member
my RSI chart label is showing however i think the value is not accurate.
 
A

ashfordtrader

New member
Is it possible to show 2 or more RSI labels on a chart. For example 5 min RSI and 15 min RSI labels. If I am on the 5 min chart, it will show both 5 min RSI and 15 min RSI. If I am on 15 min chart, it will only show 15 min RSI. Thank you in advance. See the script I started below, but both the 5min RSI and 15min are coming up with the same value, which is not correct.

Code:
#Show/hide aggregation periods

input show5m  = yes;#Hint show5m:5 minutes
input show15m = yes;#Hint show15m:15 minutes


### 1m timeframe ###
def tf1m = AggregationPeriod.MIN;

def rsi = reference RSI("over bought" = 95, "over sold" = 5, price = close(period = AggregationPeriod.FIVE_MIN));
AddLabel(yes,"RSI1m ", if rsi >= 50 or rsi <= 50 then Color.RED else Color.GREEN);

### 5m timeframe ###
def tf5m = AggregationPeriod.five_MIN;

def rsi5 = reference RSI("over bought" = 95, "over sold" = 5, price = close(period = AggregationPeriod.FIFTEEN_MIN));
AddLabel(yes, "RSI5m", if rsi >= 50 or rsi <= 50 then Color.RED else Color.GREEN);
 
T

TOSTrader2020

New member
Hello,

Does anyone know if there is a label available for RSI, Stochastic on MTF. Thank you!!
 
Branch

Branch

Member
VIP
@TOSTrader2020

AddLabel (yes, Concat( if RSI then "RSI is @ " else "", RSI), Color.WHITE);

@tomsk Sorry for getting back late to you. This code is perfect Tomsk! Thanks a bunch!
 
Last edited by a moderator:
Branch

Branch

Member
VIP
@tomsk Tom I tried converting the RSI script you provided to work with the Spearman but the label is not performing as the RSI does. Can you look at the script and tell me what I am doing wrong?

Code:
input n =1;
def Spearman_ = Spearman(10, 80, -80, Close,Averagetype.WILDERS);
def SpearmanUP = Spearman_ > Spearman_[n];
def SpearmanDN = Spearman_ < Spearman_[n];
addlabel(1, "SPEAR : " + Round(Spearman_,2) + (if SpearmanUP then " --RISING " + "" else if SpearmanDN then " -- FALLING " +"" else " NEUTRAL"),
if SpearmanUP then Color.GREEN else if SpearmanDN then Color.RED else Color.YELLOW);
 
B

bradsnw

New member
Good afternoon all. Really liking this indicator and looking from some advice on how to tweak this label. Specifically...

Rising - light green
Falling - light red
Over 70 - dark red
Under 30 - dark green
Flat - gray

Something like this possible?
 

Similar threads

Top