OPEN-SOURCE SCRIPT

Hull MA Al-Sat

510
/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)

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.