The SIROC is an oscillator ranging between 0 and 100. It is computed as an n3-period RSI of an n2-period EMA of the normalized residuals of an n1-period EMA of the price.
//PRC_SIROC | indicator
//Smoothed Indexed Rate Of Change
//30.01.2019
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
// --- settings
n1 = 36
n2 = 8
RSIp = 3
// --- end of settings
ema1 = average[n1,1](close)
tmp1 = (close-ema1)/ema1[n1]
ema2 = average[n2,1](tmp1)
siroc = rsi[RSIp](ema2)
return siroc style(line,2) as "SIROC", 80 coloured(168,168,168) style(dottedline), 20 coloured(168,168,168) style(dottedline), 50 coloured(168,168,168) style(line)