OPEN-SOURCE SCRIPT

EMA COLOR BUY SELL

47

indicator("Sorunsuz EMA Renk + AL/SAT", overlay=true)

length = input.int(20, "EMA Periyodu")
src = input.source(close, "Kaynak")


emaVal = ta.ema(src, length)

isUp = emaVal > emaVal[1]
emaCol = isUp ? color.green : color.red

plot(emaVal, "EMA", color=emaCol, linewidth=2)

buy = isUp and not isUp[1] // kırmızı → yeşil
sell = not isUp and isUp[1] // yeşil → kırmızı

plotshape(buy, style=shape.arrowup, location=location.belowbar, color=color.green, size=size.large, text="AL")
plotshape(sell, style=shape.arrowdown, location=location.abovebar, color=color.red, size=size.large, text="SAT")
alertcondition(buy, "EMA AL", "EMA yukarı döndü")
alertcondition(sell, "EMA SAT", "EMA aşağı döndü")

Exención de responsabilidad

La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.