Chartbreaker
    Preparing search index...

    Function calculateVWAP

    • config.sessionLength set to 0 will treat the entire indexRange as the session. In this case, the returned startIndex will be identical to indexRange.start.

      Uses an online algorithm for calculating the standard deviation (with good numerical stability) Source: https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm

      Parameters

      • getValue: (index: number) => number
      • volumeData: number[] | Float64Array<ArrayBufferLike>
      • identifiers: number[]
      • indexRange: { end: number; start: number }
      • config: {
            bandType: "stddev" | "perc";
            bandValue?: number;
            candleInfo: DataTMetaData;
            sessionLength: ESpans | null;
        }

        bandValue indicates a multiplier for stddev, and a percentage (i.e. 0.05 == 5%) for perc

      Returns CalculateVWAPResult