How can I create a dashboard or table on the TradingView chart using Pine Script?

Asked by Radhesh Joshi · SOLVED
1 reply 373 views Jump to solution Reply
Radhesh Joshi Original Post
Strategy Builder

I’m developing my own TradingView indicator and I’ve seen many indicators display a dashboard on the chart showing values like Trend, EMA, RSI, ATR, Buy/Sell signals, and other useful information.

Instead of looking at multiple plots or opening the Data Window, I want to display all the important information in a clean table directly on the chart.

Is there any built-in feature in Pine Script to create such dashboards? If yes, how can I use it properly?

Posted Aug 5
Reply

    1 Reply

    Tech Support AlgoDelta
    Tech Support AlgoDelta Automation Expert ·

    Yes sir, you can definitely do that. Pine Script provides a built-in table object that allows you to create custom dashboards directly on the TradingView chart.

    A table can be used to display any information that your script calculates, such as:

    -Trend Direction

    -Current Signal (Buy/Sell)

    -EMA Values

    -RSI Value

    -Any custom calculation from your strategy or indicator

    For example, you can create a simple dashboard like this:

    //@version=6
    indicator("Dashboard Example", overlay = true)
    
    emaFast = ta.ema(close, 20)
    emaSlow = ta.ema(close, 50)
    rsiValue = ta.rsi(close, 14)
    
    trend = emaFast > emaSlow ? "Bullish" : "Bearish"
    
    var table dashboard = table.new(position.top_right, 2, 4, frame_color = color.green, frame_width = 2, bgcolor = color.white, border_color = color.teal, border_width = 2)
    
    if barstate.islast
        table.cell(dashboard, 0, 0, "Trend")
        table.cell(dashboard, 1, 0, trend)
    
        table.cell(dashboard, 0, 1, "EMA 20")
        table.cell(dashboard, 1, 1, str.tostring(emaFast))
    
        table.cell(dashboard, 0, 2, "EMA 50")
        table.cell(dashboard, 1, 2, str.tostring(emaSlow))
    
        table.cell(dashboard, 0, 3, "RSI")
        table.cell(dashboard, 1, 3, str.tostring(rsiValue))

    This creates a dashboard in the top-right corner of the chart that updates automatically on every new bar.

    You can also customize the table according to your requirements.

    -Change its position using position.top_left, position.top_right, position.bottom_left, position.bottom_right, or other available positions.

    -Add more rows and columns.

    -Display text, numbers, or calculated values.

    -Change the background color and text color.

    -Highlight Buy and Sell signals with different colors.

    -Show live values from multiple timeframes.

    -One important thing to remember is that the table should usually be updated only on the last bar by using barstate.islast. This improves performance and avoids unnecessary updates on historical bars.

    So that’s how you can create a professional dashboard on the TradingView chart using Pine Script.

    For more information, you can refer to the official Pine Script documentation:
    <https://www.tradingview.com/pine-script-docs/concepts/tab…>

    Verified Solution
      Markdown supported · ```json for code blocks · paste or drop screenshots

      Be specific and kind. Never share API keys, passwords or personal account details.

      Welcome to the community

      Log in or create your account in under a minute.

      1. 1Mobile
      2. 2E-mail
      3. 3Password
      +91

      Have a password?

      By continuing you agree to the community guidelines. We’ll send a one-time code by SMS.