Aporio

Combinar dos indicadores CCI + RSI

TVC:SX5E   Indeks Euro Stoxx 50
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)
Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.