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ü")

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.