# SD_RSILabel
# Last Mod: December 14, 2020
##### Begin Code #####
declare upper;
input length = 14;
input RSIOverbought = 70;
input RSIOversold = 30;
input RSIPos = 60;
input RSINeg = 40;
input median = 50;
input RSI_to_Median = yes;
input RSI_Warning = yes;
input AlertHiLevel = 70;
input AlertLoLevel = 30;
def RSIlabel = reference RSI(length,price = close);
AddLabel(yes, if RSIlabel > RSIlabel[1] then " RSI RISING " else " RSI FALLING ", if RSIlabel > RSIlabel[1] then Color.GREEN else Color.RED);
AddLabel(yes, if RSIlabel >= RSIOverbought then " RSI OVERBOUGHT " else "", Color.RED);
AddLabel(yes, if RSIlabel <= RSIOversold then " RSI OVERSOLD " else "", Color.GREEN);
AddLabel(RSI_Warning, if RSIlabel >= RSIPos then " RSI HIGH WARNING " else "", Color.RED);
AddLabel(RSI_Warning, if RSIlabel <= RSINeg then " RSI LOW WARNING " else "", Color.GREEN);
AddLabel(RSI_to_Median, " RSI TO MEDIAN " + Round(RSILabel,0) + " ", if RSIlabel > median then Color.LIME else if RSIlabel <= median then Color.ORANGE else Color.WHITE);
Alert(RSILabel > AlertHiLevel, "", Alert.Bar, Sound.Ring);
Alert(RSILabel < AlertLoLevel, "", Alert.Bar, Sound.Ring);
##### End Code #####