OPEN-SOURCE SCRIPT

Hull MA Al-Sat

131
/version=6
indicator("Hull MA Al-Sat", overlay=true, max_lines_count=500, max_labels_count=500)

// Kullanıcı girişi
length = input.int(21, "HMA Periyodu")
hma_source = input.source(close, "HMA Kaynağı")
plotThickness = input.int(3, "Çizgi Kalınlığı")

// HMA hesaplama
wma1 = ta.wma(hma_source, math.round(length / 2))
wma2 = ta.wma(hma_source, length)
diff = 2 * wma1 - wma2
hma = ta.wma(diff, math.round(math.sqrt(length)))

// Renkli çizgi
hmaColor = hma > hma[1] ? color.green : color.red
plot(hma, color=hmaColor, linewidth=plotThickness)

// Al/Sat okları
plotshape(ta.crossover(hma, hma[1]), title="Al", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.large)
plotshape(ta.crossunder(hma, hma[1]), title="Sat", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.large)

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.