Updating to include the same functionality that the built-in Tradingview RSI Indicator has standard, with SMA/EMA/BBand 'switch' function has recently added + cleaned up some of the syntax to be in alignment with the Pinecoders recommendations.
If the former versions are preferred, simply copy the old pinescript and add as your own indicator.
Cheers,
ET