Reputation: 33
Clicking on the cogwheel 'settings' of an indicator on a chart pops up a dialog with a tab 'inputs' and a tab 'style'. Every style is preceded by a checkbox that controls the visibility of that particular plot. By default, all plots are visible. I want some plots to be hidden by default. The only way I know to do this is to manually uncheck some styles in the dialog, and then save these settings as the new default with the dropdownbox 'default' > 'save as default'. But how can I do this in code? How can I set the default state of a plot to 'hidden' with pinescript? thanks!
Upvotes: 2
Views: 6992
Reputation: 74
You can use display.none for display parameter. For example:
plot(ema(close,200), title="EMA 200", color=color.red, display=display.none)
Upvotes: 6
Reputation: 3195
a=false
plot(1, color=(a ? color.red : na))
I could also not figure this out... until I figured it out.
Upvotes: 0