import { Chart } from '../chart/types'; import { StackedPaneConfig } from '../stacked/types'; import { BuildIndicatorPaneOptions } from './buildIndicatorPane'; import { ComputedIndicatorPreset, IndicatorPresetName, IndicatorPresetOptions } from './indicatorPresets'; export interface AddIndicatorOptions extends IndicatorPresetOptions { /** Series to derive prices from (default: first line/candlestick/bar) */ sourceSeriesId?: string; /** Y axis for overlay lines (default: same as source series) */ yAxisId?: string; /** For stacked charts — build a new pane config instead of mutating chart */ pane?: "inline" | "new"; /** Pane flex ratio when pane: 'new' (default 0.25) */ paneHeight?: number | string; showXAxis?: boolean; } export interface AddIndicatorResult { id: string; preset: IndicatorPresetName; placement: "overlay" | "oscillator"; seriesIds: string[]; } type ChartIndicatorHost = Pick; /** * Calculate indicator preset from a source series (no render). */ export declare function computeIndicatorFromSeries(chart: ChartIndicatorHost, preset: IndicatorPresetName, options?: AddIndicatorOptions): Promise; /** * Add a trading indicator to an existing chart (overlay or inline oscillator layers). */ export declare function addIndicatorToChart(chart: ChartIndicatorHost, preset: IndicatorPresetName, options?: AddIndicatorOptions): Promise; /** * Build a stacked pane config for an indicator (use when creating or extending stacks). */ export declare function buildIndicatorPaneFromPreset(preset: IndicatorPresetName, x: Float32Array | Float64Array, prices: Float32Array | Float64Array, options: IndicatorPresetOptions & Pick, source?: import('../Series').Series): Promise; export type { IndicatorPresetName, IndicatorPresetOptions, ComputedIndicatorPreset };