Skip to content

charton API


charton API / @chart-on/ta / sma

Function: sma() ​

sma(values, length, out?): Float64Array

Defined in: average.ts:7

Simple moving average: the mean of the last length values. Lookback length - 1. NaN when any value in the window is NaN.

Parameters ​

values ​

Series

length ​

number

out? ​

Float64Array<ArrayBufferLike>

Returns ​

Float64Array