OPEN-SOURCE SCRIPT
SuperTrend Basit BY İNCEBACAK

//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")
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")
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.