Hull Moving Average v1I am publishing the Hull Moving Average v1 pine script code. I hope that will be useful.
// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © ozgurhan
//@version=4
study(title="Hull Moving Average v1", shorttitle="HMA v1", resolution="", overlay=true)
length = input(55, minval=1)
src = input(close, title="Source")
hullma = wma(2*wma(src, length/2)-wma(src, length), floor(sqrt(length)))
var linecolor = color.white
if hullma > hullma and close > hullma
linecolor := color.green
else if (hullma > hullma and close < hullma) or (hullma < hullma and close > hullma)
linecolor := color.orange
else
linecolor := color.red
plot(hullma, color=linecolor, linewidth=2, transp=40)
plot(hullma, color=linecolor, linewidth=10, transp=0)
green=(hullma > hullma and close > hullma)
orange=(hullma > hullma and close < hullma) or (hullma < hullma and close > hullma)
b1=barssince(green)
s1=barssince(orange)
plotshape(green and b1 >s1 , size=size.small, style=shape.labelup, location=location.belowbar, color=color.green, text="BUY", textcolor=color.black)
plotshape(orange and s1 >b1 , size=size.small, style=shape.labeldown, location=location.abovebar, color=color.red, text="SELL", textcolor=color.black)
alertcondition(green and b1 >s1 , title="BUY", message="BUY")
alertcondition(orange and s1 >b1 , title="SELL", message="SELL")
Hull
Hull Moving Average Buy and SellThe buy and sell indicator that I made with the Hull Moving Average formula.
I recommend its use in daily charts.
Hull Moving Average formülü ile apmış olduğum alım ve satım indikatörü.
Günlük gafikte kullanımını tavsiye ederim.
//@version=4
study(title="Hull Moving Average", shorttitle="HMA", resolution="", overlay=true)
length = input(140, minval=1)
src = input(close, title="Source")
hullma = wma(2*wma(src, length/2)-wma(src, length), floor(sqrt(length)))
var cizgiRengi3 = color.white
if hullma > hullma and close > hullma
cizgiRengi3 := color.green
else if (hullma > hullma and close < hullma) or (hullma < hullma and close > hullma)
cizgiRengi3 := color.orange
else
cizgiRengi3 := color.red
plot(hullma, color=cizgiRengi3, linewidth=2, transp=40)
plot(hullma, color=cizgiRengi3, linewidth=10, transp=0)
yesil=(hullma > hullma and close > hullma)
orange=(hullma > hullma and close < hullma) or (hullma < hullma and close > hullma)
b1=barssince(yesil)
s1=barssince(orange)
plotshape(yesil and b1 >s1 , size=size.small, style=shape.labelup, location=location.belowbar, color=color.green, text="BUY", textcolor=color.black)
plotshape(orange and s1 >b1 , size=size.small, style=shape.labeldown, location=location.abovebar, color=color.red, text="SELL", textcolor=color.black)
alertcondition(green and b1 >s1 , title="BUY", message="BUY")
alertcondition(orange and s1 >b1 , title="BUY", message="SELL")