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

开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
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)
//----------------------------------------------------------------------------////