Interface AddIndicatorOptions

Where chart.addIndicator puts a study, and how the host holds it.

interface AddIndicatorOptions {
    barSource?: IndicatorBarSource;
    instanceId?: string;
    paneIndex?: number;
    plotPriceScaleIds?: Readonly<Record<string, PriceScaleId>>;
    policy?: IndicatorPolicy;
    priceScaleId?: PriceScaleId;
}

Properties

barSource?: IndicatorBarSource

On a transformed chart, 'underlying' computes on the host's bars instead of the elements drawn.

instanceId?: string

The id to give the study, to bring a removed one back under its own identity.

paneIndex?: number

The pane: an existing one, or panes().length for a new one. Default: the price pane for an overlay, a new pane otherwise.

plotPriceScaleIds?: Readonly<Record<string, PriceScaleId>>

A scale per plot key, for a study whose plots belong on different scales.

What the user may do with the study; see IndicatorPolicy.

priceScaleId?: PriceScaleId

The scale the study's plots map to on that pane.