//version=5
indicator("Basitleştirilmiş Multi-Indicator System (Sadeleştirilmiş Görünürlük)", overlay=true)

// --- Kullanıcı Ayarları ---
macdShortLength = input.int(12, title="MACD Kısa Periyot", minval=1)
macdLongLength = input.int(26, title="MACD Uzun Periyot", minval=1)
macdSignalSmoothing = input.int(9, title="MACD Signal Periyodu", minval=1)

smaLength = input.int(50, title="SMA Periyodu", minval=1)
emaLength = input.int(200, title="EMA Periyodu", minval=1)

atrLength = input.int(14, title="ATR Periyodu", minval=1)
factor = input.float(3.0, title="Supertrend Çarpanı", minval=1.0, step=0.1)

bbLength = input.int(20, title="Bollinger Bands Periyot", minval=1)
bbMultiplier = input.float(2.0, title="Bollinger Band Çarpanı", minval=0.1, step=0.1)

src = close

// --- MACD Hesaplamaları ---
[macdLine, signalLine, _] = ta.macd(src, macdShortLength, macdLongLength, macdSignalSmoothing)
macdBuySignal = ta.crossover(macdLine, signalLine)
macdSellSignal = ta.crossunder(macdLine, signalLine)

// --- SMA ve EMA Hesaplamaları ---
smaLine = ta.sma(src, smaLength)
emaLine = ta.ema(src, emaLength)
maBuySignal = ta.crossover(smaLine, emaLine)
maSellSignal = ta.crossunder(smaLine, emaLine)

// --- Supertrend Hesaplamaları ---
atrValue = ta.atr(atrLength)
upperBand = hl2 - factor * atrValue
lowerBand = hl2 + factor * atrValue
var float supertrend = na
if (na(supertrend[1]))
supertrend := upperBand
else
if (close[1] > supertrend[1])
supertrend := math.max(upperBand, supertrend[1])
else
supertrend := math.min(lowerBand, supertrend[1])
supertrendBuySignal = ta.crossover(close, supertrend)
supertrendSellSignal = ta.crossunder(close, supertrend)

// --- Bollinger Bands Hesaplamaları ---
basis = ta.sma(src, bbLength)
dev = bbMultiplier * ta.stdev(src, bbLength)
bbUpper = basis + dev
bbLower = basis - dev
bbBuySignal = ta.crossover(src, bbLower)
bbSellSignal = ta.crossunder(src, bbUpper)

// --- Çizimler ---

// MACD Çizgileri - sadece sinyal olduğunda gösterilecek
plot(macdLine, title="MACD Line", color=color.blue, linewidth=2)
plot(signalLine, title="Signal Line", color=color.orange, linewidth=2)

// SMA ve EMA Çizgileri - sadece geçerli sinyallerde gösterilecek
plot(smaLine, title="SMA Line", color=color.green, linewidth=2)
plot(emaLine, title="EMA Line", color=color.red, linewidth=2)

// Supertrend Çizgisi - sadece sinyal olduğunda gösterilecek
plot(supertrend, title="Supertrend", color=color.blue, linewidth=2)

// Bollinger Bands Çizgileri - sadece sinyal olduğunda gösterilecek
plot(basis, title="Bollinger Bands Orta Band", color=color.blue, linewidth=2)
plot(bbUpper, title="Bollinger Bands Üst Band", color=color.red, linewidth=2)
plot(bbLower, title="Bollinger Bands Alt Band", color=color.green, linewidth=2)

// --- Sinyaller ve Arka Plan Rengi ---
// Alım ve Satım sinyalleri için şekiller - sadece sinyal olduğunda gösterecek
plotshape(series=macdBuySignal, title="MACD Alım Sinyali", location=location.belowbar, color=color.green, style=shape.triangleup, text="BUY", size=size.small)
plotshape(series=macdSellSignal, title="MACD Satım Sinyali", location=location.abovebar, color=color.red, style=shape.triangledown, text="SELL", size=size.small)

plotshape(series=maBuySignal, title="SMA/EMA Alım Sinyali", location=location.belowbar, color=color.green, style=shape.triangleup, text="BUY", size=size.small)
plotshape(series=maSellSignal, title="SMA/EMA Satım Sinyali", location=location.abovebar, color=color.red, style=shape.triangledown, text="SELL", size=size.small)

plotshape(series=supertrendBuySignal, title="Supertrend Alım Sinyali", location=location.belowbar, color=color.green, style=shape.triangleup, text="BUY", size=size.small)
plotshape(series=supertrendSellSignal, title="Supertrend Satım Sinyali", location=location.abovebar, color=color.red, style=shape.triangledown, text="SELL", size=size.small)

plotshape(series=bbBuySignal, title="Bollinger Bands Alım Sinyali", location=location.belowbar, color=color.green, style=shape.triangleup, text="BUY", size=size.small)
plotshape(series=bbSellSignal, title="Bollinger Bands Satım Sinyali", location=location.abovebar, color=color.red, style=shape.triangledown, text="SELL", size=size.small)

// Arka plan renkleri (trend doğrulama için)
bgcolor(macdBuySignal or maBuySignal or supertrendBuySignal or bbBuySignal ? color.new(color.green, 90) : na, title="Alım Trend Arka Planı")
bgcolor(macdSellSignal or maSellSignal or supertrendSellSignal or bbSellSignal ? color.new(color.red, 90) : na, title="Satım Trend Arka Planı")

// Alerjler (Alert Conditions)
alertcondition(macdBuySignal, title="MACD Alım Sinyali", message="MACD çizgisi, Signal çizgisini yukarıya kesiyor. Alım sinyali!")
alertcondition(macdSellSignal, title="MACD Satım Sinyali", message="MACD çizgisi, Signal çizgisini aşağıya kesiyor. Satım sinyali!")

alertcondition(maBuySignal, title="SMA/EMA Alım Sinyali", message="SMA çizgisi, EMA çizgisini yukarıya doğru kesiyor. Alım sinyali!")
alertcondition(maSellSignal, title="SMA/EMA Satım Sinyali", message="SMA çizgisi, EMA çizgisini aşağıya doğru kesiyor. Satım sinyali!")

alertcondition(supertrendBuySignal, title="Supertrend Alım Sinyali", message="Supertrend çizgisi, fiyatı yukarıya doğru kesiyor. Alım sinyali!")
alertcondition(supertrendSellSignal, title="Supertrend Satım Sinyali", message="Supertrend çizgisi, fiyatı aşağıya doğru kesiyor. Satım sinyali!")

alertcondition(bbBuySignal, title="Bollinger Bands Alım Sinyali", message="Fiyat alt Bollinger Band'ını yukarı kesiyor. Alım sinyali!")
alertcondition(bbSellSignal, title="Bollinger Bands Satım Sinyali", message="Fiyat üst Bollinger Band'ını aşağı kesiyor. Satım sinyali!")
Bands and ChannelsBill Williams IndicatorsBreadth Indicators

نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الرمز في المنشور يخضع لقواعد‎‎قوانين الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟

إخلاء المسؤولية