Skip to main content
Call once, first.

indicator()

Names the script and says where it draws. Must be the first statement.

IndicatorOptions

boolean
Draw on the price pane (true) or in the script’s own pane below it (false, the default).
string
A short name for the legend.
number
Decimal places for values; defaults to the market’s price precision on the price pane.
'percent'
'percent': values in the script’s own pane (axis, tags, legend) print with a % sign. Set the values in percent.
number
Caps on drawing objects, oldest removed first. Default 50 each, at most 500.
number
number
number
number

Next step

Continue with Inputs.
Last modified on October 16, 2026