Interface RequestedIndicatorDescriptor

A requested expression with an instance-owned snapshot lifecycle.

interface RequestedIndicatorDescriptor {
    category?: string;
    gaps?: "carry" | "missing";
    id: string;
    inputs: readonly IndicatorInput[];
    name: string;
    placement: "onchart" | "pane";
    plots: readonly IndicatorPlot[];
    refreshOnSourceUpdate?: boolean;
    expression(
        bars: readonly Readonly<Bar>[],
        settings: Readonly<IndicatorSettings>,
        ctx: RequestedIndicatorContext,
    ): IndicatorValues;
    levels(ctx: IndicatorLevelContext): readonly IndicatorLevel[];
    range(
        settings: Readonly<IndicatorSettings>,
    ): null | { max: number; min: number };
    request(
        ctx: RequestedIndicatorContext,
    ): null | Omit<IndicatorSnapshotRequest, "signal">;
    targetTimes(ctx: RequestedIndicatorContext): readonly number[];
}

Hierarchy

  • Pick<
        IndicatorDescriptor,
        | "id"
        | "name"
        | "category"
        | "placement"
        | "inputs"
        | "plots"
        | "levels"
        | "range",
    >
    • RequestedIndicatorDescriptor

Properties

category?: string

Grouping for a picker UI ('Trend', 'Momentum', 'Volume', 'Volatility').

gaps?: "carry" | "missing"

carry retains the latest eligible row, including null; missing emits a newly selected row only.

id: string

Registry key, e.g. 'macd'.

inputs: readonly IndicatorInput[]
name: string

Display name, e.g. 'MACD'.

placement: "onchart" | "pane"

'onchart' overlays the price pane; 'pane' gets its own pane.

plots: readonly IndicatorPlot[]
refreshOnSourceUpdate?: boolean

False refreshes on range/provider/data changes, not price-only source revisions. Default true.

Methods

  • Optional fixed price range for the indicator's own pane (RSI 0..100). Applied only when the indicator creates its pane: two indicators sharing a pane would otherwise fight over it.

    Parameters

    Returns null | { max: number; min: number }

  • Select a complete history window, including expression warmup. null means unsupported. The helper owns cancellation; signal is not a selector input. Symbol, exchange, interval, variant and explicit asOf changes start a new generation, and so does a change of the chart's own variant. A request that names no variant asks in the chart's session and adjustment (see inheritedDataVariant); naming one, {} included, overrides that. Window changes refresh the complete selection without merging partial pages.

    Returns null | Omit<IndicatorSnapshotRequest, "signal">