Sidechair

Pine Script types

Browse the reference

20 types and type qualifiers.

Open the Pine Editor

array
The type of an ordered list of values that all share one type, such as array<float> or array<string>.
bool
The type for true or false. Comparisons produce bools, and conditions in if, ternaries and plotshape consume them.
box
The type behind every drawn rectangle: a handle to one box that a script can resize, recolor, copy and delete.
chart.point
The type that holds one spot on the chart as a bar index, a time and a price.
color
The type for colours: a red, green, blue value plus transparency, written as a hex literal or taken from the color.* palette.
const
The qualifier for a value fixed when the script is compiled: a literal, or an expression made only of literals and other constants.
float
The type for numbers with a fractional part: prices, ratios and indicator values. A float can be na.
footprint
The type for the volume profile of one bar: buy and sell volume at each price row, returned by request.footprint.
int
The type for whole numbers: bar counts, lengths, timestamps in milliseconds and indexes. An int can be na.
label
The type of a text marker anchored to a bar and a price, created with label.new().
line
The type of a straight line drawn between two points on the chart, created with line.new().
linefill
The type of a colored band filling the space between two drawn lines, created with linefill.new().
map
The type of a collection of key-value pairs, such as map<string, float>, where each key appears once.
matrix
The type of a two-dimensional grid of values with a fixed element type, such as matrix<float>.
polyline
The type of a shape drawn through a list of chart points, as straight segments or smooth curves.
series
The qualifier for a value that can change on every bar. Prices, indicator results and anything computed per bar are series.
simple
The qualifier for a value known on the first bar that never changes after it, such as syminfo.ticker or an input.
string
The type for text: labels, titles, tickers and the result of str.* functions. Join strings with +.
table
The table type: a fixed grid of text cells anchored to a screen position on the chart, made by table.new().
volume_row
The type for one price row of a footprint: the buy and sell volume traded between its down price and up price.