synapticEx

Nebula Advanced Dynamic Support/Resistance

Still I don't know. Maybe it was not the script, but a bug in trading view that seems to appear when one reach the maximum jackpot: http://imgur.com/5FxvjjL
Eliminar de Scripts favoritos. Añadir a Scripts favoritos.
//@version=2
//synapticex.com
study("Nebula", shorttitle="Nebula", overlay=true)
length = input(title="Length", type=integer, defval=20)

fractal(i, type)=>
    f = 0
    if(type == 1 and n>15)
        f := high[i]<high[i-1] and high[i-1]<high[i-2] and high[i-2]>high[i-3] and high[i-3]>high[i-4] ? 1 : 0
    if(type == 2 and n>15)
        f := low[i]>low[i-1] and low[i-1]>low[i-2] and low[i-2]<low[i-3] and low[i-3]<low[i-4] ? 1 : 0
    f
    
h = fractal(5, 1)
l = fractal(5, 2)
hVal =  h ? high[3] : 0
lVal = l ? low[3] : 0

lSum = n>length*2 ? sum(lVal, length) : 0
hSum = n>length*2 ? sum(hVal, length) : 0
lN = n>length*2 ? sum(l, length) : 0
hN = n>length*2 ? sum(h, length) : 0
r = lSum>0 and hSum>0 and lN>0 and hN>0 ? abs((hSum/hN) - (lSum/lN)): 0

hPlus = hVal  and r?hVal+r:na
hMinus = hVal  and r?hVal-r:na
lPlus = lVal  and r?lVal+r:na
lMinus = lVal  and r?lVal-r:na
    
plot(hPlus, "hPlus", color=lime, linewidth=1, style=cross, transp=0, offset =-3, join=false)
plot(hMinus, "hMinus", color=red, linewidth=1, style=cross, transp=0, offset=-3, join=false)

plot(lPlus, "lPlus", color=white, linewidth=1, style=cross, transp=0, offset =-3, join=false)
plot(lMinus, "lMinus", color=fuchsia, linewidth=1, style=cross, transp=0, offset=-3, join=false)
Great Stuff.
Responder
synapticEx karabogerald
thanks
Responder
Inicio Analizador de acciones Analizador de Forex Crypto Screener Calendario económico Cómo funciona Funcionalidades del gráfico Precios Normas Moderadores Soluciones broker y sitio web Widgets Soluciones de gráficos Conseguir ayuda Solicitud de funcionalidad Blog y Noticias Preguntas frecuentes Wiki Twitter
Perfil Opciones de configuración del perfil Cuenta y facturación Conseguir ayuda Ideas publicadas Seguidores Siguiendo Mensajes privados Chat Cerrar sesión