//@version=5
indicator("Teknik Göstergeler Filtresi", overlay=true)
// Kullanıcı Ayarlanabilir Parametreler
volume_enabled = input.bool(true, "Volume Göstergelerini Etkinleştir")
ema5_period = input.int(5, "EMA 1 Periodu")
ema8_period = input.int(8, "EMA 2 Periodu")
ema13_period = input.int(13, "EMA 3 Periodu")
ema21_period = input.int(21, "EMA 4 Periodu")
ema5 = ta.ema(close, ema5_period)
ema8 = ta.ema(close, ema8_period)
ema13 = ta.ema(close, ema13_period)
ema21 = ta.ema(close, ema21_period)
plot(ema5, "EMA 1", color=color.new(color.red, 0))
plot(ema8, "EMA 2", color=color.new(color.blue, 0))
plot(ema13, "EMA 3", color=color.new(color.green, 0))
plot(ema21, "EMA 4", color=color.new(color.orange, 0))
ema5_gt_ema8 = ema5 > ema8
ema13_gt_ema21 = ema13 > ema21
ema8_gt_ema13 = ema8 > ema13
rsi_period = input.int(14, "RSI Periodu")
rsi_alt = input.int(40, "RSI Alt Sınır")
rsi_ust = input.int(100, "RSI Üst Sınır")
rsi = ta.rsi(close, rsi_period)
rsi_condition = rsi >= rsi_alt and rsi <= rsi_ust
price_gt_open = close > open
vwma_period = input.int(20, "VWMA Periodu")
vwma20 = ta.vwma(close, vwma_period)
plot(vwma20, "VWMA 20", color=color.new(color.purple, 0))
vwma_condition = volume_enabled ? (vwma20 < close) : true
cci_period = input.int(20, "CCI Periodu")
cci_alt = input.int(-200, "CCI Alt Sınır")
cci = ta.cci(close, cci_period)
cci_condition = cci > cci_alt
bb_period = input.int(20, "BB Periodu")
bb_sapma = input.float(2.0, "BB Sapma")
basis = ta.sma(close, bb_period)
dev = ta.stdev(close, bb_period)
upper = basis + bb_sapma * dev
lower = basis - bb_sapma * dev
plot(basis, "BB Basis", color=color.new(color.black, 0))
plot(upper, "BB Upper", color=color.new(color.blue, 0))
plot(lower, "BB Lower", color=color.new(color.blue, 0))
bb_diff = (upper - close) / close * 100
bb_alt_yuzde = input.float(0.0, "BB Alt Fark %")
bb_ust_yuzde = input.float(10.0, "BB Üst Fark %")
bb_condition = bb_diff >= bb_alt_yuzde and bb_diff <= bb_ust_yuzde
degisim_bars = input.int(1, "Değişim Bar Sayısı")
degisim_alt = input.float(-9.0, "Değişim Alt %")
degisim_ust = input.float(21.0, "Değişim Üst %")
change = ta.change(close, degisim_bars) / close[degisim_bars] * 100
change_condition = change >= degisim_alt and change <= degisim_ust
hma_period = input.int(20, "HMA Periodu")
wma1 = ta.wma(close, hma_period)
wma2 = ta.wma(close, math.round(hma_period/2))
raw_hma = 2 * wma2 - wma1
hma = ta.wma(raw_hma, math.round(math.sqrt(hma_period)))
plot(hma, "HMA", color=color.new(color.teal, 0))
hull_condition = hma < close
buy_signal = ema5_gt_ema8 and ema13_gt_ema21 and ema8_gt_ema13 and rsi_condition and price_gt_open and (volume_enabled ? vwma_condition : true) and cci_condition and bb_condition and change_condition and hull_condition
plotshape(buy_signal, title="Alım Sinyali", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
bgcolor(buy_signal ? color.new(color.green, 90) : na)
// Tablo
if barstate.islast
var table t = table.new(position.top_right, 2, 11, border_width=1)
table.cell(t, 0, 0, "EMA 1 > EMA 2", bgcolor=color.new(color.gray, 50), text_color=color.white)
table.cell(t, 1, 0, str.tostring(ema5_gt_ema8), bgcolor=ema5_gt_ema8 ? color.green : color.red, text_color=color.white)
table.cell(t, 0, 1, "EMA 3 > EMA 4", bgcolor=color.new(color.gray, 50), text_color=color.white)
table.cell(t, 1, 1, str.tostring(ema13_gt_ema21), bgcolor=ema13_gt_ema21 ? color.green : color.red, text_color=color.white)
table.cell(t, 0, 2, "EMA 2 > EMA 3", bgcolor=color.new(color.gray, 50), text_color=color.white)
table.cell(t, 1, 2, str.tostring(ema8_gt_ema13), bgcolor=ema8_gt_ema13 ? color.green : color.red, text_color=color.white)
table.cell(t, 0, 3, "RSI (14) 40-100", bgcolor=color.new(color.gray, 50), text_color=color.white)
table.cell(t, 1, 3, str.tostring(rsi_condition), bgcolor=rsi_condition ? color.green : color.red, text_color=color.white)
table.cell(t, 0, 4, "Fiyat > Açılış", bgcolor=color.new(color.gray,50), text_color=color.white)
table.cell(t, 1, 4, str.tostring(price_gt_open), bgcolor=price_gt_open ? color.green : color.red, text_color=color.white)
table.cell(t, 0, 5, volume_enabled ? "VWMA (20) < Fiyat" : "VWMA (Devre Dışı)", bgcolor=color.new(color.gray, 50), text_color=color.white)
table.cell(t, 1, 5, volume_enabled ? str.tostring(vwma_condition) : "N/A", bgcolor=volume_enabled ? (vwma_condition ? color.green : color.red) : color.gray, text_color=color.white)
table.cell(t, 0, 6, "CCI (20) > -200", bgcolor=color.new(color.gray, 50), text_color=color.white)
table.cell(t, 1, 6, str.tostring(cci_condition), bgcolor=cci_condition ? color.green : color.red, text_color=color.white)
table.cell(t, 0, 7, "BB Diff 0%-10%", bgcolor=color.new(color.gray, 50), text_color=color.white)
table.cell(t, 1, 7, str.tostring(bb_condition), bgcolor=bb_condition ? color.green : color.red, text_color=color.white)
table.cell(t, 0, 8, "Değişim -9% / 21%", bgcolor=color.new(color.gray, 50), text_color=color.white)
table.cell(t, 1, 8, str.tostring(change_condition), bgcolor=change_condition ? color.green : color.red, text_color=color.white)
table.cell(t, 0, 9, "Hull (20) < Fiyat", bgcolor=color.new(color.gray, 50), text_color=color.white)
table.cell(t, 1, 9, str.tostring(hull_condition), bgcolor=hull_condition ? color.green : color.red, text_color=color.white)
table.cell(t, 0, 10, "Alım Sinyali", bgcolor=color.new(color.gray, 50), text_color=color.white)
table.cell(t, 1, 10, str.tostring(buy_signal), bgcolor=buy_signal ? color.green : color.red, text_color=color.white)
// Trendline Entegrasyonu
shortPeriod = input.int(30, title='Short Period')
longPeriod = input.int(100, title='Long Period')
var line sup = na
var line res = na
var float sup_price = na
var float res_price = na
if barstate.islast
float lowest_y2 = 60000
float lowest_x2 = 0
float highest_y2 = 0
float highest_x2 = 0
for i = 1 to shortPeriod
if low[i] < lowest_y2
lowest_y2 := low[i]
lowest_x2 := i
if high[i] > highest_y2
highest_y2 := high[i]
highest_x2 := i
float lowest_y1 = 60000
float lowest_x1 = 0
float highest_y1 = 0
float highest_x1 = 0
for j = shortPeriod + 1 to longPeriod
if low[j] < lowest_y1
lowest_y1 := low[j]
lowest_x1 := j
if high[j] > highest_y1
highest_y1 := high[j]
highest_x1 := j
sup := line.new(x1=bar_index[lowest_x1], y1=lowest_y1, x2=bar_index[lowest_x2], y2=lowest_y2, extend=extend.right, width=2, color=color.green)
res := line.new(x1=bar_index[highest_x1], y1=highest_y1, x2=bar_index[highest_x2], y2=highest_y2, extend=extend.right, width=2, color=color.red)
line.delete(sup[1])
line.delete(res[1])
sup_price := line.get_price(sup, bar_index)
res_price := line.get_price(res, bar_index)
if ta.crossunder(close, sup_price)
alert('Break Support', freq=alert.freq_once_per_bar_close)
if ta.crossover(close, res_price)
alert('Break Resistance', freq=alert.freq_once_per_bar_close)
Bu kod, TradingView için gelişmiş bir teknik analiz göstergesi oluşturur. İşlevlerini maddeler halinde özetleyelim:
4 farklı EMA (5, 8, 13, 21 periyot) çizer
EMA'lar arasındaki sıralamayı kontrol eder (EMA5 > EMA8 > EMA13 > EMA21)
Aşağıdaki koşulları aynı anda kontrol eder:
RSI: 40-100 aralığında mı?
Fiyat: Kapanış > Açılış mı?
VWMA: Hacim ağırlıklı ortalamanın altında mı? (opsiyonel)
CCI: -200'ün üzerinde mi?
Bollinger Bantları: Fiyatın üst banda mesafesi %0-10 arasında mı?
Değişim: Son X barda değişim -%9 ile +%21 arasında mı?
Hull MA: Hull MA'nın altında mı?
Alım sinyali: Tüm koşullar sağlandığında yeşil üçgen
Tablo: Sağ üstte tüm koşulların durumunu gösteren renkli tablo
Arka plan renklendirme: Sinyal oluştuğunda yeşil vurgu
Destek ve Direnç: 30 ve 100 periyotlarda otomatik trend çizgileri çizer
Uyarı Sistemleri:
Destek kırılırsa "Break Support" alarmı
Direnç kırılırsa "Break Resistance" alarmı
Bu gösterge, çoklu teknik göstergelerin aynı anda filtre edilmesi için tasarlanmıştır. Tüm bu filtrelerden geçen hisseleri/alım sinyallerini bulmayı amaçlar. Trend takibi yaparken destek/direnç kırılımlarını da izler.
Strateji testi: Birden fazla göstergeyi bir arada test etmek
Filtreleme: Zayıf sinyalleri elemek için sıkı filtreler
Görselleştirme: Tüm koşulları tek ekranda görmek
Alarm: Önemli seviyeler kırıldığında uyarı almak