79422826

Date: 2025-02-08 08:17:42
Score: 3.5
Natty:
Report link

I am trying to display a dynamic numeric value (for example, a live price or calculated value) next to my indicator’s name in TradingView’s status line (the area where indicator values are shown). My goal is to show this number without drawing any visible plot or line on the chart itself.

The Issue:

Currently, the common workaround is to use the plot() function with various display options and set the line’s transparency to 100 (fully transparent) so that the line does not appear on the chart. For example:

plot(close, "close", color.red, display=display.all - display.status_line)
plot(close, "close", color.green, display=display.all - display.status_line - display.price_scale)
plot(close, "close", color.yellow, display=display.pane)

However, even when I set the line transparency to 100, an invisible line is still technically drawn. When I select the indicator on the chart, the selection grips (handles around the plotted line) become visible. These grips are distracting and can confuse users, as they imply that there is a visible drawing element on the chart even though the line itself is fully transparent.

//Plot AO and AC
plot(xSMA1_SMA2,title = 'AO',color=color.new(awesomeColor, 100))
plot(accelerator,title = 'AC',color=color.new(acceleratorColor, 100))

What I Need:

A way to display the dynamic numeric value solely in the indicator’s status area (next to the indicator’s name or in the data window) without any actual plot line being rendered on the chart. The solution should ensure that when the indicator is selected, there are no visible artifacts (like selection grips) that indicate an underlying plot. Context:

I understand that TradingView’s Pine Script inherently uses functions like plot() to display data and that the platform’s UI (which shows HLCO values next to the symbol name) is part of its built-in functionality. However, for custom indicators, it seems that there isn’t an option to output text solely to the status line without also drawing a plot on the chart. The currently available methods result in at least an invisible plot, which still causes the selection outlines to appear upon interaction.

Question:

Is there a method or workaround in Pine Script that allows me to display a dynamic numeric value only in the status line (or next to the indicator name) without drawing any plot line on the chart? If not, is this a limitation of Pine Script/TradingView, or are there any best practices for handling this scenario?

enter image description here

Reasons:
  • Blacklisted phrase (0.5): I Need
  • Blacklisted phrase (1): I am trying to
  • Long answer (-1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Piroozman