plot

The value plot gives back once it has drawn a series. Its use is to be passed on: hold it in a variable and hand two of them to fill to shade the band between the two plots. It exposes no fields of its own.

plot(series float series, const string title, series color color, input int linewidth, input plotStyle style, input bool trackprice, input float histbase, input int offset, const bool force_overlay) → series plot
ParameterTypeRequired
seriesseries floatyes
titleconst stringno
colorseries colorno
linewidthinput intno
styleinput plotStyleno
trackpriceinput boolno
histbaseinput floatno
offsetinput intno
force_overlayconst boolno

Returns series plot

indicator("Close")
plot(close, title = "Close", color = color.blue, linewidth = 2)

See also plotting

Part of the function index.

Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.
Upgrade