IndicatorInput: IndicatorInputPresentation & (
    | {
        default: number;
        group?: string;
        key: string;
        label: string;
        max?: number;
        min?: number;
        step?: number;
        tooltip?: string;
        type: "number";
    }
    | {
        default: boolean;
        group?: string;
        key: string;
        label: string;
        tooltip?: string;
        type: "boolean";
    }
    | {
        default: string;
        group?: string;
        key: string;
        label: string;
        tooltip?: string;
        type: "color";
    }
    | {
        default: string;
        group?: string;
        key: string;
        label: string;
        tooltip?: string;
        type: "text";
    }
    | {
        default: string;
        exchangeKey?: string;
        group?: string;
        key: string;
        label: string;
        tooltip?: string;
        type: "symbol";
    }
    | {
        default: string;
        group?: string;
        key: string;
        label: string;
        tooltip?: string;
        type: "session";
    }
    | {
        default: string;
        group?: string;
        key: string;
        label: string;
        tooltip?: string;
        type: "multiline";
    }
    | {
        anchor?: boolean;
        default: number;
        group?: string;
        key: string;
        label: string;
        max?: number;
        min?: number;
        pick?: boolean
        | { paneIndex?: number; priceScaleId?: PriceScaleId };
        step?: number;
        timeKey?: string;
        tooltip?: string;
        type: "price";
    }
    | {
        default: number;
        group?: string;
        key: string;
        label: string;
        max?: number;
        min?: number;
        pick?: boolean;
        step?: number;
        tooltip?: string;
        type: "timestamp";
    }
    | {
        default: string;
        group?: string;
        key: string;
        label: string;
        options: readonly { label: string; value: string }[];
        tooltip?: string;
        type: "select";
    }
    | {
        allowStudyOutputs?: boolean;
        default: IndicatorSource;
        group?: string;
        key: string;
        label: string;
        tooltip?: string;
        type: "source";
    }
    | {
        default: string;
        group?: string;
        key: string;
        label: string;
        tooltip?: string;
        type: "interval";
    }
    | {
        default: string;
        group?: string;
        key: string;
        label: string;
        tooltip?: string;
        type: "time";
    }
)

One tunable input. New typed values are validated before study mutations; established input kinds retain their descriptor's calculation contract.

tooltip is help text for the row. A label has to stay short enough to fit a dense panel, which leaves nowhere to say what a parameter actually does, and a ported study whose every input carried an explanation arrives here with that explanation dropped. A settings UI renders it as a hover affordance beside the label; the core ignores it.

Every variant also takes the presentation fields of IndicatorInputPresentation: activeWhen, visibleWhen and inline.

Type declaration

  • {
        default: number;
        group?: string;
        key: string;
        label: string;
        max?: number;
        min?: number;
        step?: number;
        tooltip?: string;
        type: "number";
    }
  • {
        default: boolean;
        group?: string;
        key: string;
        label: string;
        tooltip?: string;
        type: "boolean";
    }
  • {
        default: string;
        group?: string;
        key: string;
        label: string;
        tooltip?: string;
        type: "color";
    }
  • {
        default: string;
        group?: string;
        key: string;
        label: string;
        tooltip?: string;
        type: "text";
    }
  • {
        default: string;
        exchangeKey?: string;
        group?: string;
        key: string;
        label: string;
        tooltip?: string;
        type: "symbol";
    }
  • {
        default: string;
        group?: string;
        key: string;
        label: string;
        tooltip?: string;
        type: "session";
    }
  • {
        default: string;
        group?: string;
        key: string;
        label: string;
        tooltip?: string;
        type: "multiline";
    }
  • {
        anchor?: boolean;
        default: number;
        group?: string;
        key: string;
        label: string;
        max?: number;
        min?: number;
        pick?: boolean | { paneIndex?: number; priceScaleId?: PriceScaleId };
        step?: number;
        timeKey?: string;
        tooltip?: string;
        type: "price";
    }
    • Optionalanchor?: boolean

      With timeKey: a handle on the chart at the point, on the same pane and scale a pick of this price uses, that drags the time and the price together as one settings change and one undo step. The drawing tier's controller draws it; a study the user may not configure keeps it still.

    • default: number
    • Optionalgroup?: string
    • key: string
    • label: string
    • Optionalmax?: number
    • Optionalmin?: number
    • Optionalpick?: boolean | { paneIndex?: number; priceScaleId?: PriceScaleId }
    • Optionalstep?: number
    • OptionaltimeKey?: string

      Key of a declared timestamp input this price pairs with: together they name one point, a bar time and a price. A host picks both from one click (Chart.beginPick('point')) and writes them in one settings patch, so the study never computes on the time of one pick and the price of another. A timestamp pairs with one price at most.

    • Optionaltooltip?: string
    • type: "price"
  • {
        default: number;
        group?: string;
        key: string;
        label: string;
        max?: number;
        min?: number;
        pick?: boolean;
        step?: number;
        tooltip?: string;
        type: "timestamp";
    }
  • {
        default: string;
        group?: string;
        key: string;
        label: string;
        options: readonly { label: string; value: string }[];
        tooltip?: string;
        type: "select";
    }
  • {
        allowStudyOutputs?: boolean;
        default: IndicatorSource;
        group?: string;
        key: string;
        label: string;
        tooltip?: string;
        type: "source";
    }
  • {
        default: string;
        group?: string;
        key: string;
        label: string;
        tooltip?: string;
        type: "interval";
    }
  • {
        default: string;
        group?: string;
        key: string;
        label: string;
        tooltip?: string;
        type: "time";
    }