OPEN-SOURCE SCRIPT

EMA COLOR CHANCE

126

indicator("Renk Değiştiren EMA & Mum Al-Sat", overlay=true)

emaLength = input.int(50, "EMA Periyodu", minval=1)

emaValue = ta.ema(close, emaLength)
trendUp = close > emaValue
trendDown = close < emaValue

plot(emaValue, title="EMA", color = (trendUp ? color.lime : color.red), linewidth=2)
barcolor(trendUp ? color.lime : color.red)

buySignal = ta.crossover(close, emaValue)
sellSignal = ta.crossunder(close, emaValue)

plotshape(buySignal, title="BuySignal", location=location.belowbar, style=shape.triangleup, size=size.large, color=color.lime)
plotshape(sellSignal, title="SellSignal", location=location.abovebar, style=shape.triangledown, size=size.large, color=color.red)


alertcondition(buySignal, title="AL Sinyali", message="AL sinyali - fiyat EMA'yı yukarı kesti")
alertcondition(sellSignal, title="SAT Sinyali", message="SAT sinyali - fiyat EMA'yı aşağı kesti")

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.