Reputation: 41
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.
Upvotes: 4
Views: 18679
Reputation: 3133
With pinescript 5, you can do it with display = display.all - display.status_line
Example:
plotshape(firstbar_up, style=shape.cross, location=location.abovebar, size=size.tiny, color= color.rgb(255, 235, 59, 90), display = display.all - display.status_line)
Upvotes: 0
Reputation: 6428
Plotting with color "na" will hide the plot from chart and would still show in the data window.
showPlot = input.bool(true)
plot(avg, color=showPlot?color.blue:na)
Source: https://www.tradingview.com/pine-script-docs/en/v5/concepts/Plots.html
Upvotes: 0
Reputation: 1
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.
Upvotes: 0
Reputation: 1
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.sstatic.net/uy2n2.png plot(a_DSS1, title= "S1Slow", color= a_DSS1 < a_DSS11 ? color.red : color.blue,offset=offset, linewidth = 2, display=display.none)
Upvotes: 0
Reputation: 8779
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.
Upvotes: 8