reference

Overview

Indicators are scripts that draw on Terminal charts — moving averages, oscillators, custom overlays — the series you look at while trading or researching.

Common pieces (bars, inputs, drawings, deps, MTF) are in Shared runtime. This section is only what indicators add: overlay vs pane, series types like histograms, and how onBar wires those pieces together.

Indicators library and community list
Research → Indicators — your library plus community installs

Covered in Shared runtime

Topic

Page

Bar fields, accum, inputs/layout

Shared runtime

ctx.plot / mark / hline / range

Drawing on the chart

indicators.declare

Declaring indicator dependencies

security / tf / runOn

Multi-timeframe and runOn

Unique to indicators

Page

Covers

Overlay vs pane

kind overlay or pane, pane(), shortName

Series types

histogram, area, baseline, fill, markers, priceLine, bandTemplate

onBar

Indicator entry + wiring shared APIs

Examples

Ten public library scripts, simple → complex

Minimal shape

meta({ shortName: "EMA", kind: "overlay" });
dialog({ title: "EMA" });
const length = input.number({ id: "length", label: "Length", default: 20, min: 1 });
output.line({ id: "ema", color: "#2196f3" });
layout(tab({ id: "main", title: "Main" }, section({ id: "p", title: "Parameters" }, length)));

function onBar(ctx) {
  const k = 2 / (ctx.params.length + 1);
  const ema = ctx.accum("ema", null, (prev) =>
    prev == null ? ctx.close : prev + k * (ctx.close - prev)
  );
  ctx.plot("ema", ema);
}

Author in Research → Indicators (Code tab or indicator authoring agent).

Next

  1. Examples

  2. Series types

  3. First indicator guide