landing

Overview

This tab is the code reference for Chartnaut’s Code tab — how to write indicator, definition, and study scripts by hand or with agents.

You do not need to write code to use Chartnaut. Open these pages when you are editing a script, reviewing an agent’s proposed changes, or debugging a lint, budget, or Collect problem.

Map of this tab

Section

Use it for

Getting started

Which DSL to pick; script anatomy; first guides

Shared runtime

Bars, inputs, drawings, deps, MTF, session, budgets, lint — start here for APIs

Indicator API

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

Definition API

Events, ctx.emit, imports, multi-file packages

Study API

onEvent / onFinish, collect, publish, pins on chart

Agents

Conductor, authoring agents, pin orchestrator

Troubleshooting

FAQ and symptom → fix pages

Concept pages for definitions, studies, and indicators live in the research docs. This tab owns how to write the code.

How to read the API

  1. Learn shared primitives in Shared runtime (drawings, indicators.declare, inputs, MTF, …).

  2. Open the tier group only for what differs (events vs series outputs vs collect/publish).

  3. To show study numbers on the Terminal, see Show studies on charts.

Pipeline in one glance

  1. Indicator — paints series on the chart (onBar, ctx.plot).

  2. Definition — marks setups in history (events.declare, ctx.emit with a required label).

  3. Study — measures outcomes over collected events (onEvent, ctx.publish).

  4. Pins — show study results on the Terminal via Put on chart (see Study API → Chart pins).

Common questions

Do I have to write code? No. → Research overview · Conductor overview

Which DSL should I use?Choose your DSL

Where are plot / range / hline / mark documented?Drawing on the chart (shared)

I want lines and histograms on the chart.Shared runtime · Indicator series types · Build an indicator

I want to mark setups and collect them.Emit and labels · What is a definition

I want to measure what happens after a setup.Study API · Studies overview

I want study stats on my live chart.Show studies on charts · Put on chart

My script is slow or failing with a budget warning.Budgets and limits

How do agents write this code?Agents overview