OPEN-SOURCE SCRIPT

SuperTrend Basit v5 - Agresif

47
//version=5
indicator("SuperTrend Basit v5 - Agresif", 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=4, title="SuperTrend Çizgisi") // Kalın çizgi

// === 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.large, text="AL")
plotshape(sellSignal, title="SAT", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.large, 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.