搜尋
產品
社群
市場
新聞
經紀商
更多
TW
立即開始
社群
/
投資想法
/
Hull Moving Average v1
瑞波幣
Hull Moving Average v1
由ozgurhan提供
關注
關注
2021年9月27日
6
1
1
2021年9月27日
I 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/MPL/2.0/
// © 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[1] and close > hullma
linecolor := color.green
else if (hullma > hullma[1] and close < hullma) or (hullma < hullma[1] 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[1] and close > hullma)
orange=(hullma > hullma[1] and close < hullma) or (hullma < hullma[1] and close > hullma)
b1=barssince(green)
s1=barssince(orange)
plotshape(green and b1[1]>s1[1], size=size.small, style=shape.labelup, location=location.belowbar, color=color.green, text="BUY", textcolor=color.black)
plotshape(orange and s1[1]>b1[1], size=size.small, style=shape.labeldown, location=location.abovebar, color=color.red, text="SELL", textcolor=color.black)
alertcondition(green and b1[1]>s1[1], title="BUY", message="BUY")
alertcondition(orange and s1[1]>b1[1], title="SELL", message="SELL")
hull
pinescript
Trend Analysis
ozgurhan
關注
更多:
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在
使用條款
閱讀更多資訊。