ChartnautDocs

The Interface object

An Interface is what Chartnaut read from a script's code: its settings and what it produces. It appears on every full Script and in the answer from Validate a script.

Fields

Field

Type

Description

settings

object

Every setting, keyed by its id. Always present, {} when there are none

outputs

array of object

Indicator outputs. Left out when there are none

events

array of object

The events a definition can emit. Left out when there are none

results

array of object

The result blocks a study produces. Left out when there are none

timeframes

array of string

Extra timeframes an indicator or definition reads besides the run's own. Left out when there are none

settings

Each value, keyed by setting id:

Field

Type

Description

type

string

number, string, boolean, color, select, multi_select, timeframe, range or array. An indicator's settings take their type from its settings dialog

default

any

The default value. Left out when there is none

min, max, step

number

Bounds and step for a number. Each is left out when not declared

options

array

The choices for a select. From an indicator's settings dialog, each is an object with label and value. Left out when not declared

outputs

Field

Type

Description

id

string

The output id, as used in outputs= on Get run results

name

string

Display name. Left out when not set

kind

string

The declared kind, such as line, histogram or fill

pane

string

price when drawn on the price chart, own when it has its own pane

events

Field

Type

Description

id

string

The event id, such as reclaim_long

intent

string

The declared intent. Left out when not set

payload_keys

array of string

The payload keys, sorted

results

Field

Type

Description

key

string

The result key, as used in keys= on Get run results

kind

string

The block kind, such as metric, table or distribution

title

string

The block title. Left out when not set