//@version=5 indicator("İkili İndikatör Stratejisi", overlay=tru

//version=5
indicator("İkili İndikatör Stratejisi", overlay=true)

// Bollinger Bantları
length = input(20, title="Bant Uzunluğu")
src = input(close, title="Kaynak")
mult = input(2.0, title="Standart Sapma Çarpanı")
basis = ta.sma(src, length)
dev = mult * ta.stdev(src, length)
upperBand = basis + dev
lowerBand = basis - dev

// Stokastik Osilatör
kLength = input(14, title="Stokastik K Uzunluğu")
dLength = input(3, title="Stokastik D Uzunluğu")
k = ta.stoch(close, high, low, kLength)
d = ta.sma(k, dLength)

// MACD
[macdLine, signalLine, _] = ta.macd(close, 12, 26, 9)
macdHist = macdLine - signalLine

// Alım ve Satım Sinyalleri
longSignal = ta.crossover(macdLine, signalLine) and k < 20
shortSignal = ta.crossunder(macdLine, signalLine) and k > 80

// Grafik Üzerinde Çizim
plot(upperBand, color=color.red, title="Üst Bant")
plot(lowerBand, color=color.green, title="Alt Bant")
hline(70, "Aşırı Alım", color=color.red)
hline(30, "Aşırı Satım", color=color.green)
plotshape(longSignal, style=shape.labelup, location=location.belowbar, color=color.green, size=size.small, title="Alım Sinyali")
plotshape(shortSignal, style=shape.labeldown, location=location.abovebar, color=color.red, size=size.small, title="Satım Sinyali")

// İndikatör Değerleri
plot(k, color=color.blue, title="Stokastik K")
plot(d, color=color.orange, title="Stokastik D")
Technical Indicators

Wyłączenie odpowiedzialności