Sidechair

plot.* constants

Browse the reference

Drawing styles for plot(), as plot.style_* values, and line styles for plot.linestyle_* values: line, columns, histogram, area, circles and more.

Try it in the editor

plot.style_* constants go in the style argument of plot(). plot.style_line draws a continuous line and is the default. plot.style_linebr leaves a gap where the value is na. plot.style_stepline and plot.style_steplinebr hold the value flat until the next change, and plot.style_stepline_diamond adds a marker at each step. plot.style_histogram and plot.style_columns draw bars from a base level (histbase, 0 by default); plot.style_area and plot.style_areabr fill down to that base; plot.style_circles and plot.style_cross draw one dot or cross per bar and no line.

plot.linestyle_solid, plot.linestyle_dashed and plot.linestyle_dotted are the three values of plot()'s linestyle argument, available in Pine v6. They apply to the line-type styles.

Constants

NameValueDescription
plot.linestyle_dashedDashed line for plot()'s linestyle argument.
plot.linestyle_dottedDotted line for plot()'s linestyle argument.
plot.linestyle_solidSolid line for plot()'s linestyle argument.
plot.style_areaA line with the area down to the base level filled.
plot.style_areabrLike the area style, with a gap wherever the value is na.
plot.style_circlesA circle at each bar's value, with no connecting line.
plot.style_columnsA column from the base level to the value on each bar.
plot.style_crossA cross at each bar's value, with no connecting line.
plot.style_histogramA thin vertical bar from the base level to the value.
plot.style_lineA continuous line through the values; the default.
plot.style_linebrA line with a gap wherever the value is na.
plot.style_steplineA line that holds each value flat until it changes.
plot.style_stepline_diamondA step line with a diamond marker at each change.
plot.style_steplinebrA step line with a gap wherever the value is na.

Remarks

  • Pick plot.style_linebr or plot.style_areabr when a series has na stretches you want to show as gaps; the others connect across them.
  • plot.style_columns ignores the line width and uses the bar width; plot.style_histogram uses the line width as its bar thickness.
  • On Sidechair: histogram and columns both draw as a histogram, area and areabr draw as a filled area, and the remaining styles draw as a line with step or dot options. plot() ignores its linestyle argument, so the three plot.linestyle_* constants change nothing.

Example

Pine ScriptThree plot stylesOpen in editor
//@version=6
indicator("Plot styles")
change = ta.change(close)
plot(change, "Change", change >= 0 ? color.green : color.red, style = plot.style_columns)
plot(ta.sma(close, 20) - close, "Distance", color.blue, 2, plot.style_stepline)
plot(ta.rsi(close, 14) - 50, "RSI", color.new(color.purple, 50), style = plot.style_area)

See also

Runs on Sidechair