What addComparison hands back: one instrument on the chart.

interface ComparisonHandle {
    paneIndex: number;
    series: SeriesApi;
    symbol: string;
    alignment(): ComparisonAlignment;
    barAt(time: number): null | Readonly<Bar>;
    list(): readonly ComparisonHandle[];
    priceScale(): PriceScale;
    remove(): void;
    setBars(bars: readonly SeriesDataItem[]): void;
}

Properties

paneIndex: number

The slot of the pane it draws on, read live: it follows that pane through a move.

series: SeriesApi

The series this comparison draws through, for style patches and markers. Data set on it directly skips alignment (use setBars), and removing it directly leaves the pane rebased with nothing on it (use remove).

symbol: string

Methods

  • Eligible aligned bar in its own price units; null for gaps, suppressed baselines or forming replay candles.

    Parameters

    • time: number

    Returns null | Readonly<Bar>