buenas tardes…quiero poner este indicador para prorealtime…ya esta este mismo indicador en el foro pero no funciona..tiene que tener tres variables…os paso el codigo.
//
// @author Jadbrother modified by gero, optimized by yuza
//
//@version=3
study(title = “RCI3lines optimized”, shorttitle = “RCI3lines opt”)
itvs = input(9, “short interval”)
itvm = input(26, “middle interval”)
itvl = input(52, “long interval”)
src = input(close, “source”)
res = input(9, “resolution”, minval=9)
upperband=input(title=”High line[%]”,defval=80,type=integer)
lowerband=input(title=”Low line[%]”,defval=-80,type=integer)
dmul = 600 / res / (res*res-1)
ord(seq, idx, itv) =>
p = seq[idx]
o = 0.5
for i = 0 to res-1
d = (p – seq[i*itv])
o := o + ((d<0) ? 1 : ((d==0) ? 0.5 : 0))
o
d(itv) =>
sum = 0.0
step = itv/res
for i = 0 to res-1
x = (i + 1) – ord(src, i*step, step)
sum := sum + x*x
sum
rci(itv) => sma(100.0 – dmul * d(itv), ceil(itv/res))
hline(upperband,color=gray,linestyle=dashed)
hline(lowerband,color=gray,linestyle=dashed)
plot(rci(itvs), title = “RCI short”, color = red)
plot(rci(itvm), title = “RCI middle”, color = blue)
plot(rci(itvl), title = “RCI long”, color = green)
GRACIAS y a ver un valiente que llo saque….SR Nicolas