input
(label: string, defaultValue: number, options?: NumberInputOptions): number
(label: string, defaultValue: number, options?: NumberInputOptions): number
(label: string, defaultValue: boolean, options?: InputOptions): boolean
(label: string, defaultValue: string, options?: InputOptions): string
<T extends string>(label: string, defaultValue: T, choices: readonly T[], options?: InputOptions): T
One of a fixed list of strings.
(label: string, defaultValue: SourceName, options?: InputOptions): SourceName
Which bar value to read, such as
close or hl2. Read it with bars().source(name).(label: string, defaultValue: Color | null, options?: InputOptions): Color | null
A colour;
null follows the theme.(label: string, defaultValue: Time | null, options?: InputOptions): Time | null
A moment the user picks by clicking the chart, such as an anchored VWAP’s start.
null until picked.(label: string, defaultValue: IntervalCode | 'chart', options?: InputOptions): IntervalCode
An interval code.
'chart' stands for the chart’s own interval, as a default and as the
user’s choice: the script then reads the chart’s code ('15m' on a 15-minute chart), and a
bars({ interval }) stream with it is the chart’s own stream.(label: string, defaultValue: string | null, options?: InputOptions): string | null
A market symbol such as
BTC or xyz:GOLD; null means the chart’s market.(label: string, defaultValue: readonly string[], options?: InputOptions): readonly string[]
A list of wallet addresses, lower-case hex.
InputOptions
string
string
boolean
Show the input on the same row as the previous one.
boolean
false keeps the input’s value out of the script’s name in the legend, which otherwise
carries its numbers, sources, choices and intervals (“RSI 14 close”). For a setting that
says where something draws rather than what it computes, such as a table’s corner.NumberInputOptions
number
number
number