OPEN-SOURCE SCRIPT

EMA COLOR BUY SELL

63

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

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.