Skip to content
EliteChart

computeHeikinAshi

Documentation


Documentation / @elitechart/core / computeHeikinAshi

code
function computeHeikinAshi(bars): readonly Bar[];

Defined in: series/heikin-ashi.ts:84

Batch transform — converts an entire raw OHLCV series into Heikin- Ashi. Returns a new array; never mutates the input.

Empty input returns an empty output. Single-bar input applies the canonical seed.

Parameters

bars

readonly Bar[]

Returns

readonly Bar[]

Example

code
import { computeHeikinAshi } from '@elitechart/core';
const haBars = computeHeikinAshi(rawBars);
chart.setSeries({ ...series, bars: haBars });
chart.setKind('heikin-ashi');