Skip to main content
Basic types

Time

Milliseconds since the Unix epoch, UTC.

Color

A colour: #rrggbb, #rrggbbaa, or a theme token from color.* (theme:up, theme:down, theme:neutral, theme:panel, theme:none, theme:study:<0-15>, each with an optional alpha suffix such as theme:[email protected]). null means “the theme’s colour for this output”, which is what a plot uses when no colour is given.

SourceName

A price-derived value of the bar a source input can pick.

Venue

Which venue a market trades on. Defaults to the chart’s venue.

IntervalCode

An interval code. Time: 1m 3m 5m 15m 30m 1h 2h 4h 8h 12h 1d 1w, and calendar months 1M 2M 3M 4M 6M 12M (capital M; 1m is a minute). Weeks open on Monday 00:00 UTC and months on the 1st, from January. Bars that close on trades (see src/browser/trade-bars.mjs): s15 seconds, t500 trades, v1000000 volume, d250000 delta, r10 range, k10 renko, x10-0 reversal.

PaneName

Where a value is drawn: the price pane, the script’s own pane ('own'), or a named pane of this script.

LineStyle

LineWidth

ShapeName

A shape to mark a bar with. labelUp and labelDown are labels with a pointer: labelUp sits below its point and points up at it, labelDown sits above and points down; their text is written inside.

ShapeLocation

Size

na

na is the missing number, a float NaN: arithmetic with it gives na, and every comparison with it is false, as in Pine. Missing strings, colours and objects are null.

nz()

x, or replacement (default 0) when x is na.

isNa()

Whether x is na (for numbers) or null.

Next step

Continue with The declaration.
Last modified on October 16, 2026