Is there a way to hide specific indicator values from the data window?

Viewed 11278

I have recently created a script that plots several different indicators on a chart in TradingView. Under specific scenarios, some of the indicators are not active and show "n/a" in the data window.

I know that TradingView allows us to hide all indicator values. I would like to customize which indicator values are visible. Is this possible? Thanks for your time.

4 Answers

You can disable plot visibility by using display = display.none, but the parameter's argument cannot be dynamic nor even controlled by Inputs because it's of const form. So that's probably no use for you.

While you can control plot values and color dynamically, once you plot na, "n/a" will appear as the value in the Data Window and afaik we can't make it invisible.

try this a_DSS1 is a float. It will by default NOT be checked in the style tab of the settings for the indicator. But checking it makes it appear. You can see here that this line is red if declining and blue if inclining.

https://i.stack.imgur.com/uy2n2.png plot(a_DSS1, title= "S1Slow", color= a_DSS1 < a_DSS11 ? color.red : color.blue,offset=offset, linewidth = 2, display=display.none)

Well there is a workaround, for hiding plots. What i did for emas:

transEma7 = input(defval=true,title="ema7")
int ema7Trans=na
if(transEma7 == true)
    ema7Trans := 0
else
    ema7Trans := 100

plot(ema7,title="ema7",color=color.rgb(255,255,0,ema7Trans))

So this code will create a checkbox in your strategy settings and then you can uncheck it, which will set the the ema7Trans variable to 100, which will change the transparency of the color of your plot to 100, which is invisible.

Important! This is just for hiding the drawn part on the chart, the value will still be there and visible, but for finding visual patterns its ok.

Related