Interface SeriesTransformRun

One transformed series, as the chart drives it: the host's bars in, the elements it draws out. The newest source bar is the forming one, so the elements it produced are provisional and a tick replaces them; no state is ever committed from it (CLAUDE.md, never cache the forming bar).

interface SeriesTransformRun {
    elements(): readonly Bar[];
    prepend(bars: readonly Bar[]): void;
    setData(bars: readonly Bar[]): void;
    source(): readonly Bar[];
    sourceIndex(): null | readonly number[];
    update(bar: Bar): number;
}

Methods

  • Replace the source history: a load, or a new symbol. Sizes left automatic are resolved from it.

    Parameters

    • bars: readonly Bar[]

    Returns void

  • The source bar each element was completed on, the newest bar for an element still forming; null when each source bar is one element at its own time (Heikin Ashi).

    Returns null | readonly number[]

  • Apply one source bar: the forming bar again, a newer bar, or a correction of an older one. Returns the index of the first element that may differ from before, so the chart writes the tail alone.

    Parameters

    Returns number