Aporio

Combinar dos indicadores CCI + RSI

TVC:SX5E   Euro Stoxx 50 Index
Hola, intento combinar el cci + rsi en un mismo indicador pero no me lo pinta. Puede alguien echarle un vistazo?
Saludos
Luis
//RSI
study(title="Relative Strength Index", shorttitle="RSI", format=format.price, precision=2)
//CCI
study(title="Commodity Channel Index", shorttitle="CCI", format=format.price, precision=2)
//RSI
src = close, len = input(14, minval=1, title="Length")
up = rma(max(change(src), 0), len)
down = rma(-min(change(src), 0), len)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
//CCI
length = input(20, minval=1)
src = input(close, title="Source")
ma = sma(src, length)
cci = (src - ma) / (0.015 * dev(src, length))

plot(rsi, color=color.purple)
plot(cci, color=color.olive)
//rsi
band1 = hline(70)
band0 = hline(30)
fill(band1, band0, color=color.purple, transp=90)
//cci
band1 = hline(175, color=color.gray, linestyle=hline.style_dashed)
band0 = hline(-175, color=color.gray, linestyle=hline.style_dashed)
fill(band1, band0, color=color.olive)
Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.