//PRC_Stochastic RSI | indicator
//06.12.2016
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
//converted and adapted from Pinescript version
lengthRSI = periode //RSI periode
lengthStoch = periode //Stoch periode
smoothK = 3 //Smooth signal of stochastic RSI
smoothD = 3 //Smooth signal of smoothed stochastic RSI
UPline=90
DNline=10
myRSI = RSI[lengthRSI](close)
MinRSI = lowest[lengthStoch](myrsi)
MaxRSI = highest[lengthStoch](myrsi)
StochRSI = (myRSI-MinRSI) / (MaxRSI-MinRSI)
K = average[smoothK](stochrsi)*100
D = average[smoothD](K)
return StochRSI*100, UPline, DNline//K as "K%", D as "D%"