textarea

Adds a multi-line text input to your indicator’s Inputs panel. Unlike str(), which is a single-line input, textarea() is designed for longer notes, JSON snippets, symbol lists, or any configuration that requires more space.

Syntax

input.textarea(title, value, id?, tooltip?, group?, inline?)

Parameters

  • title string — Label shown in the Inputs panel.

  • value string — Default text that appears in the textarea.

  • id string (optional) — Unique key for referencing this input. If omitted, auto-generated from title (lowercased, spaces removed).

  • tooltip string (optional) — Small helper text shown when hovering over the field.

  • group string (optional) — Groups this input with others inside a collapsible section.

  • inline string (optional) — Hint to align multiple inputs on the same row (not commonly used with textareas).

Return Value

{ id: string } — The final id assigned to this textarea input.

Example

// Example: Notes field
input.textarea(
  'Strategy Notes',
  'Enter your notes here...',
  undefined,
  'Add optional comments or explanations',
  'General Settings'
);

// Example: List of symbols
input.textarea(
  'Watchlist Symbols',
  'AAPL, MSFT, TSLA',
  undefined,
  'Comma-separated list of tickers',
  'Symbols'
);

// Later in your script:
// inputs[userNotes.id] → text written by user
// inputs[watchlistSymbols.id] → 'AAPL, MSFT, TSLA'

Result

Tips

  • Great for letting users paste multiple values (e.g., tickers, levels, parameters).

  • Combine with a tooltip to guide users on formatting (e.g., “Enter one symbol per line”).

Warning

Good Practice

Last updated