concept

Overview

Most Code-tab APIs work the same whether you are writing an indicator or a definition — reading price, declaring settings, drawing on the chart, pulling in other indicators, multi-timeframe reads, sessions, budgets, and lint.

Start here for those common pieces. Open the Indicator, Definition, or Study sections only for what each type adds on top (series types, emits/Collect, or event measurement).

Pages in this section

Page

Indicator

Definition

Study

Price and bar data

yes

yes

candles helpers

Remembering values across bars

yes

yes

Settings inputs and dialog

full

subset

Declaring indicator dependencies

yes

yes

yes

Dependency outputs

yes

yes

yes

Drawing on the chart

yes

yes

annotation helpers

Multi-timeframe and runOn

yes

yes

runOn only

Sessions

yes

yes

yes

Budgets and limits

yes

yes

yes

Lint and error codes

yes

yes

yes

Documented under each script type

Topic

Page

Overlay/pane meta, series outputs (histogram, bandTemplate, …)

Indicator API

events.declare, ctx.emit, imports, multi-file ESM

Definition API

onEvent / onFinish, collect, publish, pins on chart

Study API · Show studies on charts

Next

  1. Drawing on the chart

  2. Declaring indicator dependencies

  3. Choose your DSL