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
Ta bort från favoritskript Lägg till som favoritskript
//@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)
it's very leggy indicator. give signal very late. any way to make it bit fast?
Svara
Great Stuff.
Svara
synapticEx karabogerald
thanks
Svara
Hem Aktie-screener Forex-screener Krypto-screener Ekonomisk kalender Hur det fungerar Diagramfunktioner Priser Ordningsregler Moderatorer Webbsidor och mäklarlösningar Widgets Diagramlösningar Få hjälp Funktionsförfrågan Blogg och nyheter Frågor och svar Wiki Twitter
Profil Profilinställningar Konto och fakturering TradingView Coins Mina kölappar Få hjälp Publicerade idéer Följare Följer Privata meddelanden Chatt Logga ut