study(title="Günlük-Al-Sat-Stratejileri", shorttitle="DayTradingStrategy", overlay = true )
//Blue
Length = input(34, minval=1)
xPrice = close
xEMA1 = ema(xPrice, Length)
xEMA2 = ema(xEMA1, Length)
xEMA3 = ema(xEMA2, Length)
nRes = 3 * xEMA1 - 3 * xEMA2 + xEMA3
//Pembe
Length2 = input(13, minval=1)
xPrice2 = close
xEMA12 = ema(xPrice2, Length2)
xEMA22 = ema(xEMA12, Length2)
xEMA32 = ema(xEMA22, Length2)
nRes2 = 3 * xEMA12 - 3 * xEMA22 + xEMA32
c = cross(nRes, nRes2)
alertcondition(c, title='Çizgiler Kesisti', message='Çizgiler Kesişti')
plot(nRes, color=blue, linewidth = 4)
plot(nRes2, color=orange, linewidth = 4)
plot(cross(nRes, nRes2) and nRes[1] < nRes2[1] ? nRes : na, title="SAT", style=cross, linewidth=4, color=white) // SAT
plot(cross(nRes2, nRes) and nRes2[1] < nRes[1] ? nRes : na, title="AL", style=cross, linewidth=4, color=yellow) // AL
plotshape(cross(nRes, nRes2) and nRes[1] < nRes2[1] ? true : na, style=shape.labeldown,location=location.abovebar, color=red,size=size.tiny,title="Sat Sinyali",text="SAT",transp=false)
plotshape(cross(nRes2, nRes) and nRes2[1] < nRes[1] ? true : na, style=shape.labelup,location=location.belowbar, color=green,size=size.tiny,title="Al Sinyali",text="AL",transp=false)
//bollinger band
length = input(20, minval=1)
srcb = input(close, title="Source")
mult = input(2.0, minval=0.001, maxval=50)
basis = sma(srcb, length)
dev = mult * stdev(srcb, length)
upper = basis + dev
lower = basis - dev
plot(basis, color=purple)
p1 = plot(upper, color=green)
p2 = plot(lower, color=green)
fill(p1, p2)