Pine Script (TradingView)
Dies ist ein TradingView Pine-Script-Beispiel fur diesen Indikator. Fuge es im TradingView Pine Editor ein, lege es auf den Chart und passe die Eingaben fur Markt und Zeitrahmen an.
//@version=6
indicator("Hull Moving Average (HMA)", overlay=true)
length = input.int(21, "HMA Length")
hma = ta.wma(2 * ta.wma(close, length / 2) - ta.wma(close, length), math.round(math.sqrt(length)))
rising = hma > hma[1]
longSignal = ta.crossover(close, hma)
shortSignal = ta.crossunder(close, hma)
plotshape(longSignal, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small)
plotshape(shortSignal, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small)
plot(hma, "HMA", color=rising ? color.green : color.red, linewidth=2)