OPEN-SOURCE SCRIPT
Heikin-Ashi Bar & Line with Colored Line & Signals

//version=6
indicator("Heikin-Ashi Bar & Line with Colored Line & Signals", overlay=true)
// Heikin-Ashi hesaplamaları
var float haOpen = na
haClose = (open + high + low + close) / 4
haOpen := na(haOpen) ? (open + close)/2 : (haOpen + haClose[1])/2
haHigh = math.max(high, haOpen, haClose)
haLow = math.min(low, haOpen, haClose)
// Trend hesaplamaları
haBull = haClose >= haOpen
haColor = haBull ? color.new(color.green, 0) : color.new(color.red, 0)
// HA Barları
plotcandle(haOpen, haHigh, haLow, haClose, color=haColor, wickcolor=haColor)
// HA Line (renk değişiyor)
lineColor = haBull ? color.green : color.red
plot(haClose, title="HA Close Line", color=lineColor, linewidth=2)
// Trend arka planı
bgcolor(haBull ? color.new(color.green, 85) : color.new(color.red, 85))
// Al/Sat sinyalleri (trend değişimlerinde)
longSignal = haBull and haClose > haOpen and haClose[1] < haOpen[1]
shortSignal = not haBull and haClose < haOpen and haClose[1] > haOpen[1]
plotshape(longSignal, title="Al Sinyali", style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small)
plotshape(shortSignal, title="Sat Sinyali", style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small)
indicator("Heikin-Ashi Bar & Line with Colored Line & Signals", overlay=true)
// Heikin-Ashi hesaplamaları
var float haOpen = na
haClose = (open + high + low + close) / 4
haOpen := na(haOpen) ? (open + close)/2 : (haOpen + haClose[1])/2
haHigh = math.max(high, haOpen, haClose)
haLow = math.min(low, haOpen, haClose)
// Trend hesaplamaları
haBull = haClose >= haOpen
haColor = haBull ? color.new(color.green, 0) : color.new(color.red, 0)
// HA Barları
plotcandle(haOpen, haHigh, haLow, haClose, color=haColor, wickcolor=haColor)
// HA Line (renk değişiyor)
lineColor = haBull ? color.green : color.red
plot(haClose, title="HA Close Line", color=lineColor, linewidth=2)
// Trend arka planı
bgcolor(haBull ? color.new(color.green, 85) : color.new(color.red, 85))
// Al/Sat sinyalleri (trend değişimlerinde)
longSignal = haBull and haClose > haOpen and haClose[1] < haOpen[1]
shortSignal = not haBull and haClose < haOpen and haClose[1] > haOpen[1]
plotshape(longSignal, title="Al Sinyali", style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small)
plotshape(shortSignal, title="Sat Sinyali", style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small)
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。