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

    Function sma

    • Simple moving average — the mean of the last period bars, appended as a new column. A trailing count window (correct across session gaps), warmed up length-preservingly (undefined for the first period - 1 bars). Runs over any numeric column, including another study's output.

      Type Parameters

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

      Parameters

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