I have a 2 min RSI Watchlist Column that I use as part of my criteria for a good scalp setup. Right now, the way it stands, it'll declare whether the RSI is Rising or Falling.
Since its a 2 minute time frame, obviously the "Rising" and "Falling" parameters are met quite frequently and thus change from Rising to Falling or vice versa, often.
I want to know what the trend of the RSI is, in another words, has it been rising or falling over the last 3 bars, or so. I tried adding a moving average and then trying to determine if the current RSI value is above or below that but I'm not sure if this is the best way of accomplishing what I needed. I just want to know the current trend of RSI and not necessarily whether its rising or falling in that exact moment, but whether it has been rising or falling over a "X" amount of bars.
Here is the script I was working with:
Thanks for any help, very much appreciated!
Since its a 2 minute time frame, obviously the "Rising" and "Falling" parameters are met quite frequently and thus change from Rising to Falling or vice versa, often.
I want to know what the trend of the RSI is, in another words, has it been rising or falling over the last 3 bars, or so. I tried adding a moving average and then trying to determine if the current RSI value is above or below that but I'm not sure if this is the best way of accomplishing what I needed. I just want to know the current trend of RSI and not necessarily whether its rising or falling in that exact moment, but whether it has been rising or falling over a "X" amount of bars.
Here is the script I was working with:
Thanks for any help, very much appreciated!
Code:
# RSI Label
# cabe1332
# Note: You can modify the inputs
# start code
input overbought = 80;
input oversold = 20;
input rsilength = 14;
def rsi = reference RSI(length = rsilength)."RSI";
#Label
AddLabel(yes,
if rsi < oversold then "RSI Oversold: " + round(rsi,0) + " " else
if rsi > overbought then "RSI Overbought: " +round(rsi,0) + " " else
if rsi > rsi[1] then "RSI Rising: " + round(rsi,0) + " " else "RSI Falling: " +round(rsi,0) + " ",
if rsi < oversold then Color.orange else
if rsi > overbought then Color.red else
if rsi > rsi[1] then Color.green else Color.green);
# end code RSI