OPEN-SOURCE SCRIPT

HA Line + Trend Oklar

37
//version=5
indicator("HA Line + Trend Oklar", overlay=true)

// Heiken Ashi hesaplamaları
haClose = (open + high + low + close) / 4
var float haOpen = na
haOpen := na(haOpen) ? (open + close) / 2 : (haOpen + haClose[1]) / 2
haHigh = math.max(high, math.max(haOpen, haClose))
haLow = math.min(low, math.min(haOpen, haClose))

// Trend yönüne göre renk
haColor = haClose >= haClose[1] ? color.green : color.red

// HA kapanış çizgisi
plot(haClose, color=haColor, linewidth=3, title="HA Close Line")

// Agresif oklar ile trend gösterimi
upArrow = ta.crossover(haClose, haClose[1])
downArrow = ta.crossunder(haClose, haClose[1])

plotshape(upArrow, title="Up Arrow", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.large)
plotshape(downArrow, title="Down Arrow", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.large)

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.