I have implemented original lines of code from Vitruvius.
vt_rsi = ta.rsi(close,14)
//dispv = input.bool(defval=true, title="Display RSI Values?") //i wanted to add the option to switch on and off, got stuck.
vt_rsi_str = str.format("{0,number,#.##}", vt_rsi)
label1 = label.new(bar_index, high, text=vt_rsi_str, style=label.style_circle, size=size.tiny, color=#00000000, textcolor=#ffffffa4)
label.set_xloc(label1, time, xloc.bar_time)
label.set_y(label1, high)
label.set_text(label1, vt_rsi_str)
I would like to know if the following updates is possible with this code, and if so how can I change or add to this code to achieve the following.
Is it possible to have the values show above the candle when price is moving up, and below the candles when price is moving down?
Have the value change colors above the bars in green, and values below the bars red?
Color change for extremes, when value is above candle and value above 70 = color x, and then when value is below candles and below 20 = color y
Thank you for the assistance.
I have no have previous experience with the "str.format" so I tried the following for color change: //textc = vt_rsi_str >= 60 ? color.green : vt_rsi_str <= 40 ? color.green : na
I have no idea how to get the values below the bars for down moves.