Skip to main content
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.
  • 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.
Last modified on October 16, 2026