OPEN-SOURCE SCRIPT

ZLSMA Trend + Al/Sat Sinyali

34
/version=6
indicator("ZLSMA Trend + Al/Sat Sinyali", overlay=true, max_labels_count=500)


length = input.int(25, "ZLSMA Periyodu")
src = input.source(close, "Kaynak")
thickness = input.int(4, "Çizgi Kalınlığı")
colorUp = input.color(color.new(color.lime, 0), "Yükselen Renk")
colorDown = input.color(color.new(color.red, 0), "Düşen Renk")


ema1 = ta.ema(src, length)
ema2 = ta.ema(ema1, length)
zlsma = 2 * ema1 - ema2


trendUp = zlsma > zlsma[1]
trendDown = zlsma < zlsma[1]

zlsmaColor = trendUp ? colorUp : colorDown


plot(zlsma, title="ZLSMA", color=zlsmaColor, linewidth=thickness)


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


plotshape(buySignal, title="Al", location=location.belowbar, color=color.new(color.lime, 0), style=shape.triangleup, size=size.large, text="AL")
plotshape(sellSignal, title="Sat", location=location.abovebar, color=color.new(color.red, 0), style=shape.triangledown, size=size.large, text="SAT")


bgcolor(trendUp ? color.new(color.lime, 90) : color.new(color.red, 90))

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.