vdubus

VDUB_REJECTION_SPIKE_V2

VDUB_REJECTION_SPIKE_V2
Works on all time frames, Tested on 1min, I can't make it any faster
Hull MA
channel
channel 2
Pivot Channel
{RS} spike hunter
Modified Fractals V2

Skript med en öppen källkod

I sann TradingView-anda har författaren publicerat detta skript med öppen källkod så att andra handlare kan förstå och verifiera det. Hatten av för författaren! Du kan använda det gratis men återanvändning av den här koden i en publikation regleras av våra ordningsregler. Du kan ange den som favorit för att använda den i ett diagram.

Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?
study("VDUB_REJECTION_SPIKE_V2", overlay=true, shorttitle="VDUB_REJECTION_SPIKE_V2")
//=============Hull MA-----------------------------
show_hma = input(true, title="Display Centre Band")
hma_src = input(close, title="Centre Band Source:")
hma_base_length = input(1, minval=1, title="Centre Band Base Length:")
hma_length_scalar = input(6, minval=0, title="Centre Band length Scalar:")
hullma(src, length)=>wma(2*wma(src, length/2)-wma(src, length), round(sqrt(length)))
plot(not show_hma ? na : hullma(hma_src, hma_base_length+hma_length_scalar*6), color=black, linewidth=4, title="Centre Band")
//====================channel 1==========================
len = input(34, minval=1, title="Length")
src = input(close, title="Source")
out = ema(src, len)
plot(out, title="EMA", color=blue, style=circles, linewidth=1)
last8h = highest(close, 13)
lastl8 = lowest(close, 13)

plot(last8h, color=red, linewidth=2, title="Upper channel 1")
plot(lastl8, color=green, linewidth=2, title="Lower channel 1")

bearish = cross(close,out) == 1 and close[1] > close 
bullish = cross(close,out) == 1 and close[1] < close 
//======================channel 2==================================
len2 = input(34, minval=1, title="Length2")
src2 = input(close, title="Source2")
out2 = ema(src, len)
plot(out2, title="EMA", color=maroon,style=circles, linewidth=1)
last8h2 = highest(close,34)
lastl82 = lowest(close, 34)

plot(last8h2, color=black,style=line, linewidth=1, title="Upper channel 2")
plot(lastl82, color=black,style=line, linewidth=1, title="Lower channel 2")

bearish2 = cross(close,out) == 1 and close[1] > close 
bullish2 = cross(close,out) == 1 and close[1] < close 
//======================Pivot Channel==================================
length1 = input(13, minval=1, title="Pivot Channel upper")
length2 = input(13, minval=1, title="Pivot Channel lower")

upper = highest(length1)
lower = lowest(length2)

basis = avg(upper, lower)

l = plot(lower, style=circles, linewidth=2, color=green, title="Pivott Channel lower")
u = plot(upper, style=circles, linewidth=2, color=red, title="Pivott Channel upper")

fill(u, l, color=black, transp=100, title="Fill Channel")
//========={RS} spike hunter================================================================================//
_atr = cum(tr)/(n+1)
top = (high - max(close, open)) > tr*0.5 and tr > _atr
bot = (min(close, open)-low) > tr*0.5 and tr > _atr

plotchar(top,color=blue, text="")
plotchar(bot,location=location.belowbar, color=blue, text="")

//------Moddified [RS]Fractals V2
length = 34
filterFractals = input(true, title=" Signal filter")
ftop = high[2] > high[3] and high[2] > high[4] and high[2] > high[1] and high[2] > high[0]
fbot = low[2] < low[3] and low[2] < low[4] and low[2] < low[1] and low[1] < low[0]

topf = ftop ? high[2] >= highest(high, length) ? true : false : false
botf = fbot ? low[2] <= lowest(low, length) ? true : false : false

filteredtopf = filterFractals ? topf : ftop
filteredbotf = filterFractals ? botf : fbot

plotshape(filteredtopf, style=shape.triangledown, location=location.abovebar, color=red, text="************************", offset=-2)
plotshape(filteredbotf, style=shape.triangleup, location=location.belowbar, color=green,text="************************", offset=-2)
//----------------------------------------------------------------------------////