Skip to content

Function: ema()

ts
function ema(values, period): Float64Array;

Defined in: finance/indicators.ts:48

Exponential moving average, α = 2/(period+1). Seeded with the SMA of the first period samples at index period-1 (the standard convention).

Parameters

ParameterType
valuesArrayLike<number>
periodnumber

Returns

Float64Array

MIT licensed. WebGL2 required.