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

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน