Skip to main content
Every global a script can use, from the API’s own declarations, so it matches what the terminal runs. A script has no imports: these names are always there.

Basic types

Times, colours, venues, intervals and the missing value na.

The declaration

indicator(): the script’s name and where it draws.

Inputs

Settings the reader changes in the chart’s settings panel.

Streams

Bars, trades, volume by price, liquidations, the order book, open interest, funding, breadth and liquidation levels.

State

Values kept between bars: cells, lists, maps, series and tallies.

Indicators (ta)

Moving averages, oscillators, bands and the rest of the ta library, matching TradingView.

Statistics and machine learning (stats, ml)

Rolling statistics, regression that learns bar by bar, Kalman filters, PCA, walk-forward PCA regression and forward labels, matching pandas, numpy and statsmodels.

Matrices (linalg)

Matrices, products, solves and the Cholesky, QR, eigen and singular value decompositions.

Plots

Lines, histograms, areas, points, shapes, markers, cells inside bars, fills, levels, backgrounds and bar colours.

Graphs

Charts with an axis of their own, by name, number or time, in a Script panel.

Panels

Stat tiles, sortable tables and scatter maps in a Script panel, on a clock of its own.

Drawings

Lines, boxes, labels, polylines, linefills and tables.

Alerts

Alerts the reader arms and the script fires.

Colours, text and time

color, fmt, clock, log and random.

Diagnostics

Every code the editor reports, what it means and what to do.

Next step

Start with Basic types.
Last modified on October 31, 2026