ChartnautDocs

Script

object

Includes ScriptSummary

idstring

The script's id for the Terminal SDK and partner API: ind_<n> for an indicator, flw_<n> for a definition. Pass it to cn.scripts.publish({ script }) or chart.scripts.add. Absent for a study.

Example ind_1298
slugstring
kindstring · ScriptKind
One of indicator definition study
namestring
descriptionstring
visibilitystring · Visibility

Studies are always private; setting visibility on a study is refused with 400.

One of private public
latest_versioninteger
updated_atstring (date-time)
app_urlstring (uri)

Opens this script in the Chartnaut app.

versioninteger

The version this response describes.

interfaceobject · ScriptInterface

What a caller needs to run the script and read its results. Derived from the code.

Show fields
settingsmap of object · SettingDef
Show value fields
typestring

An indicator's settings take their type, bounds and options from its settings dialog.

One of number string boolean color select multi_select timeframe range array
defaultany
minnumber
maxnumber
stepnumber
optionsarray of any

Choices for a select. From an indicator's settings dialog each is {label, value}.

outputsarray of object · OutputDef

Indicator only.

Show item fields
idstring
namestring
kindstring

The output's declared kind (line, area, baseline, histogram, fill, markers, labels, hline, range, …).

panestring
One of price own
eventsarray of object · EventDef

Definition only. The events it can emit.

Show item fields
idstring
Example reclaim_long
intentstring
payload_keysarray of string
resultsarray of object

Study only. The result blocks it produces.

Show item fields
keystring
kindstring · StudyResultKind
One of metric series distribution boxplot heatmap scatter bar table vega annotation prose popover_layout
titlestring
timeframesarray of string · Timeframe

Extra timeframes the script reads besides the run's own.

warmup_barsinteger
dependenciesarray of object · PinnedDependency
Show item fields
refstring · ScriptRef

slug or slug@N for your own scripts; author/slug or author/slug@N for library scripts; chartnaut/slug for built-ins (which always run their latest version).

Examples vwap-reclaim vwap-reclaim@3 jane/orb-breakout@7 chartnaut/rsi
asstring

The alias the script uses.

versioninteger
filesarray of object · ScriptFile

Present with include=source on your own scripts.

Show item fields
pathstringRequired
Example main.ts
codestringRequired
entryboolean

Exactly one file is the entry. Indicators have one file, always the entry.

Used by#