OPEN-SOURCE SCRIPT

EMA Cross Color Buy/Sell

31
//version=5
indicator("EMA Color Cross + Trend Arrows V6", overlay=true, max_bars_back=500)

// === Inputs ===
fastLen = input.int(9, "Hızlı EMA")
slowLen = input.int(21, "Yavaş EMA")

// === EMA Hesapları ===
emaFast = ta.ema(close, fastLen)
emaSlow = ta.ema(close, slowLen)

// Trend Yönü
trendUp = emaFast > emaSlow
trendDown = emaFast < emaSlow

// === Çizgi Renkleri ===
lineColor = trendUp ? color.new(color.green, 0) : color.new(color.red, 0)

// === EMA Çizgileri (agresif kalın) ===
plot(emaFast, "Hızlı EMA", lineColor, 4)
plot(emaSlow, "Yavaş EMA", color.new(color.gray, 70), 2)

// === Ok Sinyalleri ===
buySignal = ta.crossover(emaFast, emaSlow)
sellSignal = ta.crossunder(emaFast, emaSlow)

// Büyük Oklar
plotshape(buySignal, title="AL", style=shape.triangleup, color=color.green, size=size.large, location=location.belowbar)
plotshape(sellSignal, title="SAT", style=shape.triangledown, color=color.red, size=size.large, location=location.abovebar)

// === Trend Bar Color ===
barcolor(trendUp ? color.green : color.red)

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.