• The Connors "updown" streak: how many consecutive bars price has risen or fallen, signed. An unchanged close resets it to 0; a rise continues a positive run or starts a new one at +1; a fall mirrors that.

    Exported because it is the one piece of Connors RSI worth testing on its own — the rest is three well-known series averaged.

    Bar 0 is deliberately -1, not 0. In the reference close == close[1] and close > close[1] are both false against na, so the first bar falls into the down branch with nz(ud[1]) reading 0, which yields -1.

    Parameters

    • values: readonly number[]

    Returns number[]