//@version=5
indicator("GTSG", overlay=true)
// ===== WT CROSS GÖSTERGESİ PARAMETRELERİ =====
n1 = input.int(10, "Channel Length")
n2 = input.int(21, "Average Length")
obLevel1 = input.int(10, "Over Bought Level 1")
obLevel2 = input.int(20, "Over Bought Level 2")
osLevel1 = input.int(-60, "Over Sold Level 1")
osLevel2 = input.int(-53, "Over Sold Level 2")
obLevel3 = input.int(40, "Over Bought Level 1")
obLevel4 = input.int(60, "Over Bought Level 2")
// WT CROSS HESAPLAMALARI
ap = (high + low + close) / 3
esa = ta.ema(ap, n1)
d = ta.ema(math.abs(ap - esa), n1)
ci = (ap - esa) / (0.015 * d)
tci = ta.ema(ci, n2)
wt1 = tci
wt2 = ta.sma(wt1, 4)
// WT CROSS KOŞULLARI
wt_cross_up = ta.crossover(wt1, wt2)
wt_cross_dn = ta.crossunder(wt1, wt2)
// ===== DİĞER GÖSTERGELER =====
// 1. CCI HESAPLAMA
cci_length = input.int(20, "CCI Uzunluğu")
cci = ta.cci(close, cci_length)
cci_condition = cci <= -100
// 2. MACD HESAPLAMA
[macdLine, signalLine, _] = ta.macd(close, 12, 26, 9)
macd_condition = ta.crossover(macdLine, signalLine)
// 3. BOLLINGER BANDS HESAPLAMA
bb_length = input.int(20, "BB Uzunluğu")
bb_mult = input.float(2.0, "BB Standart Sapma")
bb_basis = ta.sma(close, bb_length)
bb_dev = bb_mult * ta.stdev(close, bb_length)
bb_upper = bb_basis + bb_dev
bb_lower = bb_basis - bb_dev
bb_condition = ta.crossunder(bb_lower,close )
// 4. RSI HESAPLAMA
rsi_length = input.int(14, "RSI Uzunluğu")
rsi = ta.rsi(close, rsi_length)
rsi_condition = rsi < 30
// ===== TREND SKORU HESAPLAMA =====
// 5 koşul: CCI, MACD, BB, RSI, WT Cross Up
trend_score = 0
trend_score := cci_condition ? trend_score + 1 : trend_score
trend_score := macd_condition ? trend_score + 1 : trend_score
trend_score := bb_condition ? trend_score + 1 : trend_score
trend_score := rsi_condition ? trend_score + 1 : trend_score
trend_score := wt_cross_up ? trend_score + 1 : trend_score
// ===== TABLO OLUŞTURMA =====
var table trend_table = table.new(position.top_right, 2, 7, border_width=1, border_color=color.gray)
// Tablo başlığı
if barstate.islast
table.cell(trend_table, 0, 0, "GÖSTERGE",
text_color=color.white, bgcolor=color.blue, text_size=size.small)
table.cell(trend_table, 1, 0, "DURUM",
text_color=color.white, bgcolor=color.blue, text_size=size.small)
// CCI Satırı
table.cell(trend_table, 0, 1, "CCI <-100", text_size=size.small)
cci_color = cci_condition ? color.green : color.red
table.cell(trend_table, 1, 1, str.tostring(cci_condition),
text_color=color.white, bgcolor=cci_color, text_size=size.small)
// MACD Satırı
table.cell(trend_table, 0, 2, "MACD Cross", text_size=size.small)
macd_color = macd_condition ? color.green : color.red
table.cell(trend_table, 1, 2, str.tostring(macd_condition),
text_color=color.white, bgcolor=macd_color, text_size=size.small)
// Bollinger Bands Satırı
table.cell(trend_table, 0, 3, "BB Alt Band", text_size=size.small)
bb_color = bb_condition ? color.green : color.red
table.cell(trend_table, 1, 3, str.tostring(bb_condition),
text_color=color.white, bgcolor=bb_color, text_size=size.small)
// RSI Satırı
table.cell(trend_table, 0, 4, "RSI < 30", text_size=size.small)
rsi_color = rsi_condition ? color.green : color.red
table.cell(trend_table, 1, 4, str.tostring(rsi_condition),
text_color=color.white, bgcolor=rsi_color, text_size=size.small)
// WT Cross Satırı
table.cell(trend_table, 0, 5, "WT Cross Up", text_size=size.small)
wt_color = wt_cross_up ? color.green : color.red
table.cell(trend_table, 1, 5, str.tostring(wt_cross_up),
text_color=color.white, bgcolor=wt_color, text_size=size.small)
// Trend Skoru Satırı
table.cell(trend_table, 0, 6, "TREND SKORU",
text_color=color.white, bgcolor=color.purple, text_size=size.small)
// Skor renklendirmesi
score_color = color.red
if trend_score == 2
score_color := color.orange
else if trend_score == 3
score_color := color.yellow
else if trend_score == 4
score_color := color.lime
else if trend_score >= 5
score_color := color.green
table.cell(trend_table, 1, 6, str.tostring(trend_score) + "/5",
text_color=color.white, bgcolor=score_color, text_size=size.normal)
// ===== GRAFİK ÇİZİMLERİ =====
// WT CROSS çizimleri
//plot(wt1, "WT1", color=color.new(color.green, 0), linewidth=2)
//plot(wt2, "WT2", color=color.new(color.red, 0), linewidth=2)
//plot(wt1 - wt2, "WT Difference", color=color.new(color.blue, 80), style=plot.style_area)
// WT CROSS yatay çizgileri
//hline(0, "Zero Line", color=color.gray, linestyle=hline.style_solid)
//hline(obLevel1, "OB Level 1", color=color.new(color.red, 50), linestyle=hline.style_dashed, linewidth=2)
//hline(osLevel1, "OS Level 1", color=color.new(color.green, 50), linestyle=hline.style_dashed)
//hline(obLevel2, "OB Level 2", color=color.new(color.purple, 50), linestyle=hline.style_dashed, linewidth=2)
//hline(osLevel2, "OS Level 2", color=color.new(color.green, 50), linestyle=hline.style_dashed)
//hline(obLevel3, "OB Level 3", color=color.new(color.red, 30), linestyle=hline.style_dotted, linewidth=1)
//hline(obLevel4, "OB Level 4", color=color.new(color.black, 30), linestyle=hline.style_dotted, linewidth=1)
// CCI çizimi
//cciPlot = plot(cci, "CCI", color=color.new(color.blue, 0), display=display.none)
//hline(0, "CCI Zero", color=color.new(color.gray, 50), linestyle=hline.style_dotted, display=display.none)
// MACD çizimi
//macdPlot = plot(macdLine, "MACD", color=color.new(color.blue, 0), display=display.none)
//signalPlot = plot(signalLine, "Signal", color=color.new(color.red, 0), display=display.none)
// Bollinger Bands çizimi
//bbMiddlePlot = plot(bb_basis, "BB Middle", color=color.new(color.blue, 0), display=display.none)
//bbUpperPlot = plot(bb_upper, "BB Upper", color=color.new(color.red, 0), display=display.none)
//bbLowerPlot = plot(bb_lower, "BB Lower", color=color.new(color.green, 0), display=display.none)
// RSI çizimi
//rsiPlot = plot(rsi, "RSI", color=color.new(color.purple, 0), display=display.none)
//hline(30, "RSI Oversold", color=color.new(color.red, 50), linestyle=hline.style_dashed, display=display.none)
//hline(70, "RSI Overbought", color=color.new(color.green, 50), linestyle=hline.style_dashed, display=display.none)
// ===== SİNYAL ETİKETLERİ =====
// WT Cross sinyalleri
//if wt_cross_up
//label.new(bar_index, wt1, text="▲ WT\nCross",
//color=color.green, textcolor=color.white,
//style=label.style_label_up, yloc=yloc.price, size=size.small)
//if wt_cross_dn
//label.new(bar_index, wt1, text="▼ WT\nCross",
//color=color.red, textcolor=color.white,
//style=label.style_label_down, yloc=yloc.price, size=size.small)
Bu kod, TradingView için Pine Script 5 ile yazılmış çoklu gösterge tabanlı bir trend analiz aracıdır (GTSG). İşlevlerini şu şekilde özetleyebiliriz:
5 farklı teknik göstergeyi birleştirip her birinin sinyal durumunu takip ederek toplam "Trend Skoru" hesaplar ve bunu tablo formatında görselleştirir.
WT Cross (Wavetrend TCI) - Ana gösterge
CCI (Commodity Channel Index)
MACD (Moving Average Convergence Divergence)
Bollinger Bands
RSI (Relative Strength Index)
Her gösterge için mevcut sinyal durumunu gösterir (True/False)
Her sinyal için renkli durum göstergesi:
✅ Yeşil: Sinyal aktif (koşul sağlanıyor)
🔴 Kırmızız: Sinyal pasif (koşul sağlanmıyor)
Trend Skoru: 5 göstergeyi toplar (0-5 arası)
0-1: Kırmızı (Zayıf trend)
2: Turuncu
3: Sarı
4: Açık yeşil
5: Yeşil (Güçlü trend)
ALIM SİNYALİ için aradığı koşullar:
CCI ≤ -100 (aşırı satım)
MACD yukarı kesişim
Fiyat Bollinger alt bandını aşağı kesti
RSI < 30 (aşırı satım)
WT Cross yukarı kesişim
Ne kadar çok koşul eşzamanlı sağlanırsa, trend o kadar güçlü kabul edilir.
Kodda grafik çizimleri (plot) ve etiketler (label) şu an yorum satırında (// ile başlayan satırlar), bu nedenle sadece tablo gözüküyor
Gerçek çizimleri aktifleştirmek için yorum satırlarını kaldırabilirsiniz
Tüm parametreler kullanıcı tarafından ayarlanabilir
Sadece son barda tablo gösterilir (barstate.islast)
Yatırımcıya hızlı ve görsel bir şekilde birden fazla göstergeyi aynı anda kontrol ederek trend gücünü değerlendirme imkanı sağlar. Özellikle alım noktaları arayanlar için tasarlanmış gibi görünüyor.