//@version=5
////BU INDIKATORDE KAUFMAN, ALMA, HARKETLI ORTALAMALAR KULLANILMISTIR.
indicator('SOKE OVASI', overlay=true)
///////////////ALMA
// INPUTS:
len5 = input.int(14, title='Arnaud Legoux MA Length', minval=1, group="ALMA")
src22 = input(close, title='Source', group="ALMA")
offset = input.float(0.85, title='ALMA Offset', minval=0.0001)
sigma = input.int(6, title='ALMA Sigma Value', minval=1)
trendALMA = ta.alma(src22, len5, offset, sigma)
res18 = input.timeframe('1W', "Resolution", title="ALMAPeriyod")
out18 = request.security(syminfo.tickerid, res18, trendALMA)
// PLOTTING:
almaColor = trendALMA >= trendALMA[1] ? color.rgb(42, 1, 248) : color.rgb(42, 1,
248)
// barColor = low < trendALMA ? color.red : color.green
p01 = plot(trendALMA, title='ALMA', color=almaColor, linewidth=2)
// p11 = plot(close, color=color.new(color.black, 100))
// fill(p01, p11, color=low > trendALMA ? #00ff00 : #c2185b, transp=82)
// barcolor(barColor)
/////////////KAUFMAN
length1 = input(title='Length', defval=14)
fastLength = input(title='Fast EMA Length', defval=2)
slowLength = input(title='Slow EMA Length', defval=30)
src = input(title='Source', defval=close)
highlight = input(title='Highlight ?', defval=true)
awaitBarConfirmation = input(title='Await Bar Confirmation ?', defval=true)
mom = math.abs(ta.change(src, length1))
volatility = math.sum(math.abs(ta.change(src)), length1)
// Efficiency Ratio
er = volatility != 0 ? mom / volatility : 0
fastAlpha = 2 / (fastLength + 1)
slowAlpha = 2 / (slowLength + 1)
alpha = math.pow(er * (fastAlpha - slowAlpha) + slowAlpha, 2)
kama = 0.0
kama := alpha * src + (1 - alpha) * nz(kama[1], src)
await = awaitBarConfirmation ? barstate.isconfirmed : true
maColor = highlight ? kama > kama[1] and await ? color.rgb(251, 1, 1) :
color.rgb(251, 1, 1) : #6d1e7f
plot(kama, title='KAMA', linewidth=2, color=maColor, transp=0)
alertCond = maColor != maColor[1]
alertcondition(alertCond, title='Color Change', message='KAMA has changed its
color!')
//
///EMA
ma3_len = input(5, "Length", group='EMA8')
src3 = input(close, "Source")
res3 = input.timeframe('1W', "Resolution", title="EMA8Periyod")
htf_ma3 = ta.ema(src3, ma3_len)
out3 = request.security(syminfo.tickerid, res3, htf_ma3)
plot(out3, color=color.rgb(0, 226, 251), linewidth=2, title='EMA-8')
ma31_len = input(8, "Length", group='EMA8')
src31 = input(close, "Source")
res31 = input.timeframe('1W', "Resolution", title="EMA8Periyod")
htf_ma31 = ta.ema(src31, ma31_len)
out31 = request.security(syminfo.tickerid, res31, htf_ma31)
plot(out31, color=color.rgb(221, 217, 0), linewidth=2, title='EMA-8')
ma4_len = input(13, "Length", group='EMA14')
src4 = input(close, "Source")
res4 = input.timeframe('1W', "Resolution", title="EMA-14")
htf_ma4 = ta.ema(src4, ma4_len)
out4 = request.security(syminfo.tickerid, res4, htf_ma4)
plot(out4, color=color.rgb(239, 0, 0), linewidth=2, title='EMA-14')
ma5_len = input(34, "Length", group='EMA34')
src5 = input(close, "Source")
res5 = input.timeframe('1W', "Resolution", title="EMA34Periyod")
htf_ma5 = ta.ema(src5, ma5_len)
out5 = request.security(syminfo.tickerid, res5, htf_ma5)
plot(out5, color=color.rgb(233, 2, 140), linewidth=2, title='EMA34')
ma6_len = input(55, "Length", group='EMA55')
src6 = input(close, "Source")
res6 = input.timeframe('1W', "Resolution", title="EMA55")
htf_ma6 = ta.ema(src6, ma6_len)
out6 = request.security(syminfo.tickerid, res6, htf_ma6)
plot(out6, color=color.rgb(102, 2, 224), linewidth=2, title='EMA55')
ma7_len = input(144, "Length", group='EMA144')
src7 = input(close, "Source")
res7 = input.timeframe('1W', "Resolution", title="EMA144")
htf_ma7 = ta.ema(src7, ma7_len)
out7 = request.security(syminfo.tickerid, res7, htf_ma7)
plot(out7, color=color.rgb(2, 161, 224), linewidth=2, title='EMA144')
/////BAR HACİM
length77 = input.int(21, 'length', minval=1, group="HACİM BAR")
avrg = ta.sma(volume, length77)
vold1 = volume > avrg * 1.5 and close < open
vold2 = volume >= avrg * 0.5 and volume <= avrg * 1.5 and close < open
vold3 = volume < avrg * 0.5 and close < open
volu1 = volume > avrg * 1.5 and close > open
volu2 = volume >= avrg * 0.5 and volume <= avrg * 1.5 and close > open
volu3 = volume < avrg * 0.5 and close > open
cold1 = #800000
cold2 = #FF0000
cold3 = color.orange
colu1 = #006400
colu2 = color.lime
colu3 = #7FFFD4
color_1 = vold1 ? cold1 : vold2 ? cold2 : vold3 ? cold3 : volu1 ? colu1 : volu2 ?
colu2 : volu3 ? colu3 : na
barcolor(color_1)
/////////////////////////
//////////////HAFTALIK
// Calculate MACD on the weekly timeframe
[macdLine, signalLine, _] = request.security(syminfo.tickerid, "1W", ta.macd(close,
12, 26, 9))
// Check for MACD crossover on the weekly timeframe
macdCrossover = ta.crossover(macdLine, signalLine)
// Plot "M" label when there is a MACD crossover
plotshape(macdCrossover, color=color.new(color.orange, 0), style=shape.labelup,
title="HAFTALIK MACD", textcolor=color.new(color.white, 0), text="M-H",
location=location.belowbar)
//////////////RSI
////////////////
// Calculate RSI on the weekly timeframe
rsiValue = request.security(syminfo.tickerid, "1W", ta.rsi(close, 14))
// Calculate 14-period SMA of RSI
rsiSMA = ta.sma(rsiValue, 14)
///////////////EKLEME
// Check for RSI being above its 14-period SMA and crossing above 50 on the weekly
timeframe
rsiAboveSMA = rsiValue > rsiSMA
rsiAbove50 = ta.crossover(rsiValue, 50)
// Plot "R" label when RSI is above its SMA and crosses above 50
plotshape(rsiAboveSMA and rsiAbove50, color=color.new(#4400ff, 0),
style=shape.labelup, title="RSI-HAF", textcolor=color.new(color.white, 0), text="R-
H", location=location.belowbar)
////////////////////AYLIK
// Calculate MACD on the AYLIK timeframe
[macdLine1, signalLine1, _] = request.security(syminfo.tickerid, "1M",
ta.macd(close, 12, 26, 9))
// Check for MACD crossover on the AYLIK timeframe
macdCrossover1 = ta.crossover(macdLine1, signalLine1)
// Plot "M" label when there is a MACD crossover
plotshape(macdCrossover1, color=color.new(color.orange, 0), style=shape.labelup,
title="AYLIK MACD", textcolor=color.new(color.white, 0), text="M-A",
location=location.belowbar)
//////////////RSI
////////////////
// Calculate RSI on the AYLIK timeframe
rsiValue1 = request.security(syminfo.tickerid, "1M", ta.rsi(close, 14))
// Calculate 14-period SMA of RSI
rsiSMA1 = ta.sma(rsiValue1, 14)
///////////////EKLEME
// Check for RSI being above its 14-period SMA and crossing above 50 on the weekly
timeframe
rsiAboveSMA1 = rsiValue1 > rsiSMA1
rsiAbove501 = ta.crossover(rsiValue1, 50)
// Plot "R" label when RSI is above its SMA and crosses above 50
plotshape(rsiAboveSMA1 and rsiAbove501, color=color.new(#4400ff, 0),
style=shape.labelup, title="RSI-AYLIK", textcolor=color.new(color.white, 0),
transp=0, text="R-A", location=location.belowbar)