> ## Documentation Index
> Fetch the complete documentation index at: https://docs.0xarchive.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Inputs

> Give a script settings the reader changes in the chart's settings panel.

Let the reader tune a script without editing it. Each `input.*` at the top declares a setting in the chart's settings panel and returns its value. Changing one runs the script again from its first bar.

| Input | The setting |
| - | - |
| `input.int`, `input.float` | A number, with `min`, `max` and `step` |
| `input.bool` | A switch |
| `input.string` | Text |
| `input.choice` | One of a list of strings |
| `input.source` | A bar value such as `close` or `hl2`, read with `chart.source(name)` |
| `input.color` | A colour; `null` follows the theme |
| `input.time` | A moment picked by clicking the chart, `null` until picked |
| `input.interval` | An interval; `'chart'` is the chart's own |
| `input.market` | A market such as `ETH` or `xyz:GOLD`; `null` is the chart's |
| `input.addresses` | A list of wallet addresses, lower-case |

```ts theme={"theme":"github-dark"}
const length = input.int('Length', 20, { min: 1, max: 500 });
const source = input.source('Source', 'close');
const against = input.market('Against', 'ETH');
const corner = input.choice('Position', 'top-right', ['top-left', 'top-right'], { legend: false });
```

* `group` puts inputs under a heading, `inline: true` on the row of the one before, and `tooltip` explains one.
* The legend names a script with its numbers, sources, choices and intervals, as in "RSI 14 close". `legend: false` keeps an input out of it, for a setting that says where something draws rather than what it computes.

## What changing an input does

Every input is read once, at setup, so its value is a plain constant everywhere in the script: use it to size an indicator (`ta.ema(length)`), to pick a market for a stream, or in any handler. Changing it in the settings panel runs the script again from its first bar with the new value, so the whole history is drawn as if it had always been set that way.

* An `input.time` starts `null`, and the settings panel offers **Pick on chart**: the reader clicks a bar, and the script reads its time. Draw nothing until one is picked, or start from the first bar.
* An `input.interval` set to `'chart'` follows the chart: the script reads the chart's own code, such as `'15m'`, and `bars({ interval })` with it is the chart's own stream.
* An `input.market` left `null` follows the chart's market, so `bars(against === null ? {} : { market: against })` reads the chart itself.
* `input.addresses` takes pasted addresses; the script receives only the valid ones, lower-case.

## Next step

Handle data that is not there in [missing values](/terminal/guides/missing-values).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.