RSI watchlist column

S

Steve2286

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

Tks
Steve
 
BenTen

BenTen

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

 
S

Steve2286

New member
2019 Donor
Thanks Ben How do I change timeframe It won't let me edit the formula?
tks
 
BenTen

BenTen

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

 
H

HighBredCloud

Well-known member
VIP
So I tried my best to do this on my own...but since I am not a coder I fell short once again. I am hoping that a competent coder can assist with my request.

I am looking for a RSI watchlist column that can be sortable and one that counts the amount of candles that are ABOVE or BELOW 50.

Here is what I came up with from the various lines of codes I put together. Would really appreciate the help. Thanks.

Code:
#RSI WatchList Column

input length = 14;
input over_Bought = 50;
input over_Sold = 50;
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;
def RSI = 50 * (ChgRatio + 1);
def BEAR = over_Sold;
def BULL = over_Bought;
def UpSignal = if RSI crosses above BEAR then BEAR else Double.NaN;
def DownSignal = if RSI crosses below BULL then BULL else Double.NaN;

#
def sState = if close < UpSignal then -100 else if close > DownSignal then 100 else 0;
def sCount = CompoundValue(1, If(sState == 0, 0, if sState != sState[1] then 1 else sCount[1] + 1), 0);
def sCounter = If(sState > 0, sCount, -sCount);

plot sData = sCounter;
sData.assignValueColor(if sState > 0 then color.green else if sState < 0 then color.red else color.current);

Here is a pic of what I am looking for...A RSI watch list column where it counts how many GREEN and RED candle there are above the 50.

 

Similar threads

Top