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

    Function envelope

    • Moving-average envelope — a moving average (maType, default SMA) with upper/lower bands at ±percent % of the centre line: middle × (1 ± percent/100). Appends ${prefix}Middle / ${prefix}Upper / ${prefix}Lower; warm-up rows undefined. (Bollinger bands scale with volatility, an envelope by a fixed percent.)

      Type Parameters

      • S extends SeriesSchema
      • const Prefix extends string = "env"

      Parameters

      Returns TimeSeries<
          readonly [
              S[0],
              ValueColumnsForSchema<
                  readonly [
                      S[0],
                      ValueColumnsForSchema<
                          readonly [
                              S[0],
                              ValueColumnsForSchema<S>,
                              OptionalNumberColumn<`${Prefix}Middle`>,
                          ],
                      >,
                      OptionalNumberColumn<`${Prefix}Upper`>,
                  ],
              >,
              OptionalNumberColumn<`${Prefix}Lower`>,
          ],
      >