A list of Paid indicators:
Toss a coin to your witcher:
I compared your code with the Tradingview built-in Connors RSI code and it looked similar. But when I made my own StochCRSI with the built-in code it gave a slightly different result...
After some research i found that the error is in your updown function. If you plot updown(src, ud) the result is always 0. You can look at the built-in CRSI code to fix this...
See page 7, it's streak duration as far as I understand it.
You can change its calculation by `Updown RSI Length` input