OPEN-SOURCE SCRIPT

SuperTrend Basit BY İNCEBACAK

123
//version=5
indicator("SuperTrend Basit v5", overlay=true)

// === Girdi ayarları ===
factor = input.float(3.0, "ATR Katsayısı")
atrPeriod = input.int(10, "ATR Periyodu")

// === Hesaplamalar ===
[supertrend, direction] = ta.supertrend(factor, atrPeriod)

// === Çizim ===
bodyColor = direction == 1 ? color.new(color.lime, 0) : color.new(color.red, 0)
bgcolor(direction == 1 ? color.new(color.lime, 85) : color.new(color.red, 85))
plot(supertrend, color=bodyColor, linewidth=2, title="SuperTrend Çizgisi")

// === Al/Sat sinyali ===
buySignal = ta.crossover(close, supertrend)
sellSignal = ta.crossunder(close, supertrend)

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

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.