Buongiorno,
è possibile avere il codice dell’indicatore Stocastico Rsi che visualizzi anche le linee D e K, cioè la linea lenta e quella veloce?
Grazie
Stefano
Lo stocastico RSI non ha due linee, almeno quello della piattaforma:
DEFPARAM CalculateOnLastBars = 1000
ONCE RsiP= 14
MyRsi = RSI[RsiP](close)
MinRSI = lowest[RsiP](MyRsi)
MaxRSI = highest[RsiP](MyRsi)
StochRSI = ((MyRsi-MinRSI) / (MaxRSI-MinRSI)) * 100
IF StochRSI < 0 THEN
StochRSI = 0
ENDIF
IF StochRSI > 100 THEN
StochRSI = 100
ENDIF
return StochRSI as "Stoch RSI",80 AS "80",20 AS "20"
però ce l’ha questo di Nicolas (https://www.prorealcode.com/prorealtime-indicators/stochastic-rsi/):
//PRC_Stochastic RSI | indicator
//06.12.2016
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
//converted and adapted from Pinescript version
// -- parameters:
lengthRSI = 15 //RSI period
lengthStoch = 10 //Stochastic period
smoothK = 10 //Smooth signal of stochastic RSI
smoothD = 3 //Smooth signal of smoothed stochastic RSI
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 K as "K%", D as "D%"