The following script builds an on-chart information dashboard displaying trend status, RSI values, and ATR volatility in the top-right corner of the chart window.
Pine Script v6: On-chart multi-indicator dashboard using tablespinescript
//@version=6
indicator("TradingView Status Dashboard [v6]", overlay = true)
// Input configuration
string tablePos = input.string("Top Right", "Table Position",
options = ["Top Right", "Top Left", "Bottom Right", "Bottom Left"])
// Resolve position constant
var string posConstant = position.top_right
if barstate.isfirst
posConstant := tablePos == "Top Left" ? position.top_left :
tablePos == "Bottom Right" ? position.bottom_right :
tablePos == "Bottom Left" ? position.bottom_left : position.top_right
// Technical indicators
float ema20 = ta.ema(close, 20)
float ema50 = ta.ema(close, 50)
float rsiVal = ta.rsi(close, 14)
float atrVal = ta.atr(14)
// Indicator states
bool isUptrend = ema20 > ema50
string trendText = isUptrend ? "BULLISH" : "BEARISH"
color trendColor = isUptrend ? color.green : color.red
color rsiColor = rsiVal > 70 ? color.orange : rsiVal < 30 ? color.purple : color.slate
// Create table instance once
var table dashboard = table.new(position.top_right, 2, 4,
bgcolor = color.new(color.black, 20),
border_color = color.gray,
border_width = 1)
// Update cell data only on the latest bar for speed
if barstate.islast
// Header row
table.cell(dashboard, 0, 0, "Metric", text_color = color.white, bgcolor = color.navy, text_size = size.small)
table.cell(dashboard, 1, 0, "Current Value", text_color = color.white, bgcolor = color.navy, text_size = size.small)
// Trend status row
table.cell(dashboard, 0, 1, "EMA Trend", text_color = color.white, text_size = size.small)
table.cell(dashboard, 1, 1, trendText, text_color = color.white, bgcolor = trendColor, text_size = size.small)
// RSI row
table.cell(dashboard, 0, 2, "RSI (14)", text_color = color.white, text_size = size.small)
table.cell(dashboard, 1, 2, str.tostring(rsiVal, "#.#"), text_color = color.white, bgcolor = rsiColor, text_size = size.small)
// Volatility row
table.cell(dashboard, 0, 3, "ATR (14)", text_color = color.white, text_size = size.small)
table.cell(dashboard, 1, 3, str.tostring(atrVal, format.mintick), text_color = color.white, text_size = size.small)