Where a plot or input is shown: display.all, display.none, display.pane, display.data_window, display.price_scale, display.status_line, display.pine_screener.
display.* constants go in the display argument of plot, plotshape, plotchar, hline, fill, bgcolor and several input functions. display.all shows the output everywhere it can appear. display.none hides it from the chart but keeps its value available to other scripts and to alerts. display.pane shows the drawing on the chart pane, display.data_window lists the value in the data window, display.status_line shows it in the status line beside the title, display.price_scale adds its label to the price scale, and display.pine_screener makes it available as a screener column.
The values combine with + and -: display.all - display.status_line shows everything except the status line.
Constants
| Name | Value | Description |
|---|---|---|
display.all | Show everywhere the output can appear. | |
display.data_window | Show the value in the data window. | |
display.none | Hide from the chart; the value stays available. | |
display.pane | Show on the chart pane. | |
display.pine_screener | Make the value available as a screener column. | |
display.price_scale | Show the label on the price scale. | |
display.status_line | Show the value in the status line. |
Remarks
- A plot with
display.nonestill counts against the plot limit and still feeds alertcondition and other scripts. - On Sidechair: only
display.nonechanges anything. A plot, fill or background withdisplay.noneis hidden; every other value leaves it shown.
Example
//@version=6
indicator("Display", overlay = true)
avg = ta.sma(close, 20)
plot(avg, "Average", color.blue, display = display.all)
plot(avg + ta.stdev(close, 20), "Hidden band", color.red, display = display.none)
bgcolor(close > avg ? color.new(color.green, 90) : na, display = display.all)See also
Runs on Sidechair