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)
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.