Skip to main content

Signature

plot is both a declaration (top-level) and an emission (inside onBar). The name is the unique identifier - the same name ties the declaration to the per-bar writes.

Two-step pattern

You can also write the value directly in the top-level declaration (rarely useful):

Return value

plot() returns a handle { id, name } you can pass to fill():

Options

Emitting NaN for gaps

Plots accept NaN or null as a value - this produces a gap in the rendered line (no data point at that bar):

Budget

Maximum 64 plot series per indicator. Exceeding this limit raises an error at evaluation time.
hline, fill, bgcolor, and barcolor count separately from plot series. See API limits for all budgets.

Plot styles

All 12 style values: line, histogram, area, circles, arrows and more.

hline, fill, bgcolor

Complementary drawing primitives.

API limits

64-plot budget and other runtime constraints.