interface Tier2Descriptor {
    category?: string;
    id: string;
    inputs: readonly IndicatorInput[];
    name: string;
    placement: "onchart" | "pane";
    plots: readonly IndicatorPlot[];
    refetchOn?: readonly string[];
    series?: readonly string[];
    supportsReplay?: boolean;
    calc(
        bars: readonly Bar[],
        external: IndicatorValues,
        settings: Readonly<IndicatorSettings>,
        store: IndicatorStore,
        ctx?: IndicatorCalcContext,
    ): IndicatorValues;
    fetch(ctx: Tier2Context): Promise<readonly Tier2Point[]>;
    levels(settings: Readonly<IndicatorSettings>): readonly IndicatorLevel[];
    range(
        settings: Readonly<IndicatorSettings>,
    ): null | { max: number; min: number };
    subscribe(ctx: Tier2Context, push: (point: Tier2Point) => void): () => void;
    supports(ctx: Tier2Context): boolean;
}

Properties

category?: string
id: string
inputs: readonly IndicatorInput[]
name: string
placement: "onchart" | "pane"
plots: readonly IndicatorPlot[]
refetchOn?: readonly string[]

Settings keys that invalidate the fetched data when they change (symbol, exchange, resolution). Changing anything else only re-runs alignment.

series?: readonly string[]

External columns to align besides the plots, by key. A point may carry more than what is drawn: a benchmark close that calc divides by, an open-interest figure a ratio is built from. Anything not named here or in plots is dropped at alignment.

supportsReplay?: boolean

Opt into native timed replay. fetch must honor finite ctx.asOf, return the values known then, and use point.time as availability time. Raw requestBars does not supply historical value versions automatically. Native legacy replay without an availability clock remains unsupported. Defaults false.

Methods