@pond-ts/financial API Reference
    Preparing search index...

    Function movingAverage

    • Moving average, by type — the K2 engine as one study: type picks from the shared MaType menu (sma, ema, wma, smma, dema, tema, trima, hull, kama, zlema), everything else is the package's uniform shape (bar-count period, any numeric column, length-preserving warm-up, output names the appended column, default 'ma').

      type: 'sma' and type: 'ema' are the same calls sma and ema make, so they produce identical values — this is one more name for them, not a second implementation. sma() / ema() stay as the shorthand for the two everyone reaches for.

      Per-type definitions, warm-up lengths, the TA-Lib deltas and the interior-gap rule (window types recover; smma and kama propagate) are documented on movingAverageValues.

      Type Parameters

      • S extends SeriesSchema
      • const Output extends string = "ma"

      Parameters

      Returns TimeSeries<
          readonly [S[0], ValueColumnsForSchema<S>, OptionalNumberColumn<Output>],
      >