concept
Overview
Use this page to pick the right kind of script before you open the Code tab.
Chartnaut has three scripting models — indicators (paint on the chart), definitions (mark setups in history for Collect), and studies (measure what usually happens after those setups) — plus an optional pin layer that shows study numbers on the Terminal while you trade.
Decision table
Goal | DSL | Key APIs | Agent |
|---|---|---|---|
Lines, histograms, overlays on the chart | Indicator |
| Indicator authoring |
Mark setups in history for Collect | Definition |
| Definition authoring |
Measure outcomes after events | Study |
| Study authoring |
Show study stats on the Terminal chart | Study + Put on chart | Product UI / Forward insight agent | Forward insight agent (not the study agent) |
How they connect
Indicator (paint)
↓ may be a dependency of
Definition (emit events)
↓ Collect gathers events →
Study (measure + publish)
↓ Put on chart →
pin_cell / popover_layout (cast on Terminal)Studies do not call ctx.emit. They read events from definitions you declare with flows.declare.
Product path vs Code tab
Job | Product UI | Code tab |
|---|---|---|
Build an indicator | Research → Indicators | Indicator API |
Build a definition | Research → Definitions | Definition API |
Build a study | Definition → Studies | Study API |
Put stats on chart | Put on chart / Pin Studio |
If you are new to the product model, start with Research overview, then come back here for signatures and examples.
Where to look next
Most APIs (drawings, inputs, indicators.declare, MTF, session, budgets) are documented once under Shared runtime. Use the Indicator, Definition, and Study sections for what each type adds on top (series outputs, emit/events, collect/publish).
Next
Script anatomy — declare phase vs runtime hooks
First indicator guide — minimal runnable script
Agents overview — who writes which tier
