• the reference pivothigh / pivotlow. A pivot is confirmed right bars after it happens, so the answer lands on the confirming bar and refers to the value right bars back. Comparisons are strict on both sides, so a tie is not a pivot.

    Parameters

    • values: readonly number[]
    • left: number
    • right: number

    Returns number[]