ChartnautDocs

Overview

Most of the scripting API is the same whether you write an indicator or a definition: reading price, declaring settings, drawing on the chart, reading other indicators, other timeframes, sessions, limits and lint. This section covers those shared pieces.

An indicator and a definition run on the same per-bar runtime, so every ctx field on these pages exists on both. A study runs once per event instead, and has its own versions of a few of them. The Indicator, Definition and Study sections cover only what each type adds.

Pages in this section

Page

Indicator

Definition

Study

Price and bar data

yes

yes

candle helpers instead

Remembering values across bars

yes

yes

no, use ctx.collect

Settings inputs and dialog

yes

yes

no

Declaring indicator dependencies

yes

yes

yes

Dependency outputs

yes

yes

yes

Drawing on the chart

yes

yes

annotation helpers

Layers & rows

yes

yes

reads only

Timeframe handles and runOn

yes

yes

runOn only

Summaries and long windows

yes

yes

no

Sessions

yes

yes

own helpers

Budgets and limits

yes

yes

yes

Lint and error codes

yes

yes

yes

What Chartnaut promises about these APIs, such as the same value on every chart and on the server, is on What Chartnaut guarantees.

Documented under each script type

Topic

Page

meta kinds, series outputs (histogram, bandTemplate, …), panes

Indicator API

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

Definition API

onEvent / onFinish, ctx.collect, ctx.publish, chart pins

Study API · Show studies on charts