Function getStreaks

  • Tracks the lengths (streaks) of continuous price movements (up or down).

    Parameters

    • prices: number[]

      A series of prices

    • keepSide: "up" | "down"

      If you want to receive only uptrends or downtrends

    Returns Streak[]

    An array of objects representing the filtered streaks