PHP Code://@version=6
indicator("(:)", overlay=true, max_lines_count=50, max_bars_back=50)
// ==========================================
// 1. YAPAY ZEKA (DL) ÇEKİRDEĞİ
// ==========================================
// Aktivasyon Fonksiyonları
tanh(v) => (1 - math.exp(-2 * v)) / (1 + math.exp(-2 * v))
td(s) => nz((s - nz(s[1])) / nz(s[1]))
// Ağırlık Matrisi (Senin Modelin)
var w_c = array.from(22.4271, -26.6917, 4.9371, 9.0349, -10.6929, -38.2880, 10.0500, -44.7063, -17.8163, 30.5662, -33.9954, 14.5017, -43.2865, -13.3874, 24.7080, -14.3929, 28.4830, -22.9793, -7.6582, -5.6505, 28.8379, -26.3544, 0.5206, 25.0049, -17.8832, -4.8113, -4.0364, -8.3327, -1.1571, 0.4667, -22.0533, 3.6525, -4.3904, 2.1030, 20.0272, 11.5101, -0.4150)
// Giriş Verileri
n_in = array.from(tanh(td(open)), tanh(td(high)), tanh(td(low)), tanh(td(close)))
// Hesaplama Fonksiyonu
f_calc_dl(n_arr, w_arr) =>
float out = 0.0
for i = 0 to 5
float s = 0.0
for j = 0 to 3
s += array.get(n_arr, j) * array.get(w_arr, (i * 5) + j)
out += tanh(s + array.get(w_arr, (i * 5) + 4)) * array.get(w_arr, 30 + i)
tanh(out + array.get(w_arr, 36))
float dl_val = f_calc_dl(n_in, w_c) // AI Çıktısı (-1 ile 1 arası)
// ==========================================
// 2. SAR HESAPLAMALARI
// ==========================================
s1 = ta.sar(0.08, 0.05, 0.2) // Sarı (Hızlı)
s2 = ta.sar(0.01, 0.05, 0.2) // Mavi (Denge)
s3 = ta.sar(0.04, 0.04, 0.2) // Kırmızı (Yavaş)
// ==========================================
// 3. ATMOSFER KATMANLARI (SAR + AI)
// ==========================================
// AI Faktörü: DL değeri arttıkça atmosfer şişer (Volatilite Çarpanı)
// Normalde 1'dir, risk varsa 2'ye kadar çıkar.
float ai_factor = 0.1 + math.abs(dl_val)
// Mesafeleri Hesapla (ATR yerine geçecekler)
float dist_yellow = math.abs(close - s1) // Çekirdek Mesafesi
float dist_blue = math.abs(s1 - s2) // Manto Mesafesi
float dist_red = math.abs(s2 - s3) // Kabuk Mesafesi
// Katmanları Fiyatın Etrafına Ör (Merkezden Dışa Doğru)
// 1. KATMAN (SARI - Çekirdek)
// Fiyattan s1 kadar uzağa git + AI etkisi
float l1_top = close + (dist_yellow * ai_factor)
float l1_bot = close - (dist_yellow * ai_factor)
// 2. KATMAN (MAVİ - Manto)
// Sarı katmanın bittiği yerden Mavi mesafe kadar daha açıl
float l2_top = l1_top + (dist_blue * ai_factor)
float l2_bot = l1_bot - (dist_blue * ai_factor)
// 3. KATMAN (KIRMIZI - Kabuk)
// Mavi katmanın bittiği yerden Kırmızı mesafe kadar daha açıl
float l3_top = l2_top + (dist_red * ai_factor)
float l3_bot = l2_bot - (dist_red * ai_factor)
// ==========================================
// 4. GÖRSELLEŞTİRME (RENKLİ BARLAR)
// ==========================================
// En dıştan en içe doğru çiziyoruz ki küçükler altta kalmasın.
// DIŞ KABUK (Kırmızı)
plotcandle(l3_bot, l3_top, l3_bot, l3_top, title="Atmosfer (Kırmızı)", color=color.new(color.red, 70), bordercolor=na, wickcolor=na)
// ORTA KATMAN (Mavi)
plotcandle(l2_bot, l2_top, l2_bot, l2_top, title="Atmosfer (Mavi)", color=color.new(color.blue, 70), bordercolor=na, wickcolor=na)
// İÇ ÇEKİRDEK (Sarı)
plotcandle(l1_bot, l1_top, l1_bot, l1_top, title="Atmosfer (Sarı)", color=color.new(color.yellow, 70), bordercolor=na, wickcolor=na)
// Referans için SAR noktalarını da gösterelim (İncecik)
// ==========================================
// 2. LSMA ÖNCÜ HAT
// ==========================================
f_mirror_lsma(_sar_val, _len) =>
float _delta = math.abs(close - _sar_val)
bool _is_up = close > _sar_val
float _raw = _is_up ? close + _delta : close - _delta
ta.linreg(_raw, _len, 0)
// Hesaplama (Uzunluk: 20)
float oncu_hat = f_mirror_lsma(s1, 20)
// Renk Mantığı
bool hat_ustte = oncu_hat > close
color col_oncu = hat_ustte ? color.red : color.lime
// Çizim
plot(oncu_hat, "Öncü", color=col_oncu, linewidth=2)
// ==========================================
// 3. YÖRÜK ÇİZİMLERİ (SAR NOKTALARI)
// ==========================================
plot(s1, "SAR Hızlı", style=plot.style_cross, color=color.yellow, linewidth=2)
plot(s2, "SAR Denge", style=plot.style_cross, color=color.blue, linewidth=2)
plot(s3, "SAR Yavaş", style=plot.style_cross, color=color.red, linewidth=2)
// ==========================================
// 4. "3'LÜ KİLİT" SİNYAL MANTIĞI
// ==========================================
// Sarı, Mavi ve Kırmızı eşit mi?
bool esit_1_2 = math.abs(s1 - s2) < syminfo.mintick
bool esit_2_3 = math.abs(s2 - s3) < syminfo.mintick
bool tam_kilit = esit_1_2 and esit_2_3
// Sinyaller
bool sinyal_al = tam_kilit and close > s1
bool sinyal_sat = tam_kilit and close < s1
// ==========================================
// 5. SİNYAL GÖRSELLERİ (ELMAS)
// ==========================================
// Etiket (Yazı) yerine sadece Şekil (Elmas) kullanıyoruz.
plotshape(sinyal_al, "KİLİT AL", shape.diamond, location.belowbar, color=color.lime, size=size.small)
plotshape(sinyal_sat, "KİLİT SAT", shape.diamond, location.abovebar, color=color.red, size=size.small)
////////////////////)/////
// ==========================================
// 1. SARKAÇ MERKEZİ VE HESAPLAR
// ==========================================
//s1 = ta.sar(0.08, 0.05, 0.2)
//s2 = ta.sar(0.01, 0.05, 0.2)
//s3 = ta.sar(0.04, 0.04, 0.2)
float merkez = (s1 + s2 + s3) / 3
// ==========================================
// 2. ENERJİ GÖRSELLERİ (CANLI)
// ==========================================
// Burası canlı veriyle çalışır, anlık durumu gösterir.
// Potansiyel Enerji (İç Renk)
float dist_sar = math.abs(close - merkez) / close * 1000
color col_pot = color.from_gradient(dist_sar, 0, 5, color.new(color.gray, 30), close > merkez ? color.lime : color.red)
// Kinetik Enerji (Çerçeve Rengi)
float velocity = math.abs(close - open)
float max_vol = ta.highest(velocity, 20)
color col_kin = color.gray
if close > open
col_kin := color.from_gradient(velocity, 0, max_vol, color.blue, color.gray)
else
col_kin := color.from_gradient(velocity, 0, max_vol, color.orange, color.fuchsia)
// Akış Enerjisi (Yılan Çizgisi)
float flow_line = ta.hma(close, 20)
color col_flow = flow_line > flow_line[1] ? color.lime : color.red
// ==========================================
// 3. SINYAL MANTIĞI (NO-REPAINT KİLİDİ)
// ==========================================
// Sinyaller sadece BAR KAPANDIĞINDA (Confirmed) hesaplanır.
// Kural: Akış Çizgisi (HMA) Yön Değiştirdiğinde
// Sarıdan Beyaza Dönüş -> AL
// Beyazdan Sarıya Dönüş -> SAT
bool akis_yukari1 = flow_line > flow_line[1]
bool akis_asagi1 = flow_line < flow_line[1]
// "Barstate.isconfirmed" komutu repaint'i engeller.
// Sinyal sadece mum kapandığı saniye kesinleşir.
bool sinyal_al1 = akis_yukari1 and not akis_yukari1[1] and barstate.isconfirmed
bool sinyal_sat1 = akis_asagi1 and not akis_asagi1[1] and barstate.isconfirmed
// ==========================================
// 4. ÇİZİMLER
// ==========================================
// Özel Mumlar (Görsel)
//plotcandle(open, high, low, close, "Sarkaç", color=col_pot, wickcolor=col_kin, bordercolor=col_kin)
// Akış Hattı
plot(flow_line, "Akış", color=col_flow, linewidth=3)
// Merkez (Destek/Direnç)
plot(merkez, "Merkez", color=color.new(color.gray, 50), style=plot.style_stepline)
// Sinyal Okları (Asla Kaybolmaz)
plotshape(sinyal_al1, "KESİN AL", shape.triangleup, location.belowbar, color=color.white, size=size.small, text="AL", textcolor=color.white)
plotshape(sinyal_sat1, "KESİN SAT", shape.triangledown, location.abovebar, color=color.yellow, size=size.small, text="SAT", textcolor=color.yellow)
// ==========================================
// 5. PANEL (GÜNCEL DURUM)
// ==========================================
var table panel = table.new(position.bottom_right, 2, 4, bgcolor=color.new(color.black, 40))
if barstate.islast
table.cell(panel, 0, 0, "SARKAÇ (NO-REPAINT)", text_color=color.white, bgcolor=color.gray)
table.merge_cells(panel, 0, 0, 1, 0)
// Yön Bilgisi
string yon_txt = akis_yukari1 ? "YÜKSELİŞ" : "DÜŞÜŞ"
color yon_col = akis_yukari1 ? color.lime : color.red
table.cell(panel, 0, 1, "ANA YÖN", text_color=color.white, text_halign=text.align_left)
table.cell(panel, 1, 1, yon_txt, text_color=yon_col, text_halign=text.align_right)
// Sinyal Durumu
string sinyal_txt = "BEKLİYOR..."
if sinyal_al1
sinyal_txt := "AL ONAYLANDI"
if sinyal_sat1
sinyal_txt := "SAT ONAYLANDI"
table.cell(panel, 0, 2, "SON SİNYAL", text_color=color.white, text_halign=text.align_left)
table.cell(panel, 1, 2, sinyal_txt, text_color=color.gray, text_halign=text.align_right)
///////////////
// ==========================================
// 1. HAM VERİLER (SAR ve AYNA)
// ==========================================
//s1 = ta.sar(0.08, 0.05, 0.2)
//s2 = ta.sar(0.01, 0.05, 0.2)
//s3 = ta.sar(0.04, 0.04, 0.2)
avg_sar = (s1 + s2 + s3) / 3 // STOP NOKTASI
f_mirror(_sar, _len) =>
float _delta = math.abs(close - _sar)
float _raw = close > _sar ? close + _delta : close - _delta
ta.linreg(_raw, _len, 0)
m1 = f_mirror(s1, 20)
m2 = f_mirror(s2, 20)
m3 = f_mirror(s3, 20)
avg_mir = (m1 + m2 + m3) / 3 // MERKEZ HATTI
// ==========================================
// 2. GÖLGE HEDEF HESABI
// ==========================================
// Hedef = Ayna + (Fiyat - SAR Farkı)
float vector_force = close - avg_sar
float shadow_target = avg_mir + vector_force
// ==========================================
// 3. RENK VE TREND MANTIĞI
// ==========================================
// Trendin yönünü belirliyoruz.
// Boğa: Fiyat SAR'ın üzerinde.
// Ayı: Fiyat SAR'ın altında.
bool trend_bull = close > avg_sar
bool trend_bear = close < avg_sar
color col_shadow = trend_bull ? color.green : color.red
// ==========================================
// 4. SİNYAL MANTIĞI (RENK DEĞİŞİMİ)
// ==========================================
// Hedefe dokunma değil, RENK DEĞİŞİMİ (Trend Dönüşü) sinyaldir.
// Repaint olmaması için barstate.isconfirmed kullanıyoruz.
bool signal_exit_long = false
bool signal_exit_short = false
if barstate.isconfirmed
// Yeşil'den Kırmızıya Dönüş (Long Çıkış)
if trend_bull[1] and trend_bear
signal_exit_long := true
// Kırmızı'dan Yeşile Dönüş (Short Çıkış)
if trend_bear[1] and trend_bull
signal_exit_short := true
// ==========================================
// 5. GÖRSELLEŞTİRME
// ==========================================
// SAR (Gri Stop Çizgisi)
plot(avg_sar, "Stop Hattı (SAR)", color=color.gray, linewidth=2)
// AYNA (Mavi Merkez Hattı)
plot(avg_mir, "Denge Hattı (Ayna)", color=color.blue, linewidth=1)
// GÖLGE HEDEF (Renkli Noktalar)
plot(shadow_target, "Gölge Hedef", color=col_shadow, linewidth=2, style=plot.style_circles)
// Aradaki Alan (Potansiyel Vakum)
fill(plot(avg_mir, display=display.none), plot(shadow_target, display=display.none), color=color.new(col_shadow, 85), title="Potansiyel Alanı")
// SİNYALLER (Trend Bitişi / Renk Değişimi)
// Ofset -1 veriyoruz ki sinyalin oluştuğu mumun tepesine koysun.
plotshape(signal_exit_long, "LONG ÇIKIŞ", shape.labeldown, location.abovebar, color=color.red, text="L\n(K)", textcolor=color.white, size=size.tiny, offset=-1)
plotshape(signal_exit_short, "SHORT ÇIKIŞ", shape.labelup, location.belowbar, color=color.green, text="S\n(K)", textcolor=color.white, size=size.tiny, offset=-1)
// ==========================================
// 6. DASHBOARD (SABİT WIDGET)
// ==========================================
var table panel1 = table.new(position.middle_right, 2, 5, bgcolor=color.new(color.black, 40), frame_color=color.gray, border_width=1)
if barstate.islast
string yon_txt = "YATAY"
color yon_col = color.gray
if trend_bull
yon_txt := "YÜKSELİŞ (YEŞİL)"
yon_col := color.green
else
yon_txt := "DÜŞÜŞ (KIRMIZI)"
yon_col := color.red
// Başlık
table.cell(panel1, 0, 0, "GÖLGE TREND", text_color=color.white, bgcolor=color.new(color.gray, 20), text_size=size.small)
table.merge_cells(panel1, 0, 0, 1, 0)
// Yön
table.cell(panel1, 0, 1, "TREND YÖNÜ", text_color=color.white, text_size=size.small, text_halign=text.align_left)
table.cell(panel1, 1, 1, yon_txt, text_color=yon_col, text_size=size.small, text_halign=text.align_right)
// Hedef Fiyat (Potansiyel)
table.cell(panel1, 0, 2, "POTANSİYEL HEDEF", text_color=color.white, text_size=size.small, text_halign=text.align_left)
table.cell(panel1, 1, 2, str.tostring(shadow_target, format.mintick), text_color=yon_col, text_size=size.small, text_halign=text.align_right)
// Stop (Trend Değişim Sınırı)
table.cell(panel1, 0, 3, "STOP (SAR)", text_color=color.gray, text_size=size.small, text_halign=text.align_left)
table.cell(panel1, 1, 3, str.tostring(avg_sar, format.mintick), text_color=color.gray, text_size=size.small, text_halign=text.align_right)
// Kalan Mesafe
float dist = math.abs(shadow_target - close)
table.cell(panel1, 0, 4, "KALAN POTANSİYEL", text_color=color.gray, text_size=size.small, text_halign=text.align_left)
table.cell(panel1, 1, 4, str.tostring(dist, format.mintick), text_color=color.white, text_size=size.small, text_halign=text.align_right)
///////////////////
// ==========================================
// 1. MATEMATİK MOTORU (Aynen Korundu)
// ==========================================
//s1 = ta.sar(0.08, 0.05, 0.2)
//s2 = ta.sar(0.01, 0.05, 0.2)
//s3 = ta.sar(0.04, 0.04, 0.2)
//avg_sar = (s1 + s2 + s3) / 3
//f_mirror(_sar, _len) =>
//float _delta = math.abs(close - _sar)
//float _raw = close > _sar ? close + _delta : close - _delta
//ta.linreg(_raw, _len, 0)
//m1 = f_mirror(s1, 9)
//m2 = f_mirror(s2, 21)
//m3 = f_mirror(s3, 50)
//avg_mir = (m1 + m2 + m3) / 3
// Hız ve İvme Hesabı
float raw_acc = math.abs(avg_sar - avg_sar[1]) / syminfo.mintick
float raw_vel = math.abs(avg_mir - avg_mir[1]) / syminfo.mintick
float vector_acc = ta.hma(raw_acc, 9)
float vector_vel = ta.hma(raw_vel, 9)
// ==========================================
// 2. MANTIK VE HAFIZA
// ==========================================
var float max_blue_peak = 0.0
if vector_vel > vector_acc
max_blue_peak := math.max(max_blue_peak, vector_vel)
if ta.crossover(vector_vel, vector_acc)
max_blue_peak := vector_vel
// Durum Analizi
bool red_zone = vector_acc > vector_vel
// MODLAR
bool is_turbo = red_zone and (vector_acc >= max_blue_peak) // Gri Noktaların ÜZERİNDE
bool is_fatigue = red_zone and (vector_acc < max_blue_peak) // Gri Noktaların ALTINDA
bool is_efficient = not red_zone // Mavi Bölge
// ==========================================
// 3. SİNYALLER
// ==========================================
bool signal_buy = ta.crossover(vector_vel, vector_acc) and barstate.isconfirmed
bool signal_sell = ta.crossunder(vector_acc, max_blue_peak) and red_zone and barstate.isconfirmed
// ==========================================
// 4. GÖRSELLEŞTİRME (FİYAT EKRANI MODU)
// ==========================================
// A. Bar Boyama (Osialtördeki Durumu Yansıtır)
color bar_renk = na
if is_efficient
bar_renk := color.blue // Verimli (Al/Tut)
else if is_turbo
bar_renk := color.yellow // Turbo (Gri Noktalar Geçildi - TUT)
else
bar_renk := color.red // Yorgunluk (Gri Noktalar Kırıldı - SAT)
barcolor(bar_renk)
// B. Sadece Sinyaller
//plotshape(signal_buy, "VERİMLİ BAŞLANGIÇ", shape.labelup, location.belowbar, color=color.blue, text="VERİMLİ", textcolor=color.white, size=size.small)
// Kritik Çıkış Sinyali
//plotshape(signal_sell, "TURBO BİTTİ", shape.labeldown, location.abovebar, color=color.red, text="TURBO\nBİTTİ", textcolor=color.white, size=size.small)
// İsteğe Bağlı: Gri Noktaların (Limitin) Sanal Varlığı
// Eğer Turbo modundaysak, mumun üzerine küçük gri bir nokta koyarak "Limitin üzerindesin" mesajı verelim.
//plotshape(is_turbo, "Limit Üstü", shape.circle, location.abovebar, color=color.new(color.gray, 50), size=size.tiny)
//////////////////
// ==========================================
// 1. GÜNEŞ VE HALKALAR (HESAPLAMA MOTORU)
// ==========================================
//s1 = ta.sar(0.08, 0.05, 0.2) // Halka 1
//s2 = ta.sar(0.01, 0.05, 0.2) // Halka 2
//s3 = ta.sar(0.04, 0.04, 0.2) // Halka 3
// Ayna Hesabı
//f_mirror(_sar, _len) =>
//float _delta = math.abs(close - _sar)
//float _raw = close > _sar ? close + _delta : close - _delta
// ta.linreg(_raw, _len, 0)
//m1 = f_mirror(s1, 9)
//m2 = f_mirror(s2, 21)
//m3 = f_mirror(s3, 50)
// Güneş (Merkez Fiyat)
float gunes = ((s1+s2+s3)/3 + (m1+m2+m3)/3) / 2
// ==========================================
// 2. KALKAN GÜCÜNÜ ÖLÇME
// ==========================================
int kalkan_gucu = 0 // 0 ile 3 arası
if close > gunes // Güneş Üstü (Boğa)
if close > s1
kalkan_gucu += 1
if close > s2
kalkan_gucu += 1
if close > s3
kalkan_gucu += 1
else // Güneş Altı (Ayı)
if close < s1
kalkan_gucu += 1
if close < s2
kalkan_gucu += 1
if close < s3
kalkan_gucu += 1
// ==========================================
// 3. BAR BOYAMA MANTIĞI (RENK PALETİ)
// ==========================================
color bar_renk22 = na
string mod_text = ""
//if kalkan_gucu == 3
// TAM GÜÇ (Trend Yönüne Göre)
//bar_renk := close > gunes ? color.lime : color.red
//mod_text := "TAM GÜÇ"
//else if kalkan_gucu == 2
// HAFİF HASAR (Uyarı)
//bar_renk := color.yellow
//mod_text := "YIPRANMA (2/3)"
if kalkan_gucu == 1
// AĞIR HASAR (Kritik)
bar_renk22 := color.new(color.fuchsia, 00) // Daha soluk turuncu
mod_text := "KRİTİK (1/3)"
//else
// KORUMASIZ (Kaos)
//bar_renk := color.gray
//mod_text := "KORUMASIZ"
// Mumları Boya
barcolor(bar_renk22)
// ==========================================
// 4. DESTEK/DİRENÇ ÇİZGİLERİ (GÖRSEL)
// ==========================================
// Sadece Güneş Merkezini (Grand Master) çiziyoruz.
// Böylece fiyatın "Merkezden" ne kadar uzakta olduğunu gözle görürsün.
plot(gunes, "Merkez", color=color.orange, linewidth=2)
// ==========================================
// ==========================================
// 2. ROCHE LİMİTLERİ (YÖRÜNGE KUŞAĞI)
// ==========================================
// Histogramdaki 0.5 ve -0.5 çizgilerini fiyata uyarlıyoruz.
// Güneş'in %0.5 üstü ve altı "Güvenli Yörünge"dir.
float roche_ust = gunes * 1.005 // +%0.5
float roche_alt = gunes * 0.995 // -%0.5
// B. Roche Limitleri (Yörünge Sınırları)
p1 = plot(roche_ust, "Roche Üst", color=color.gray, style=plot.style_circles)
p2 = plot(roche_alt, "Roche Alt", color=color.gray, style=plot.style_circles)
// C. Çekim Alanı (Güneş ile Sınırlar Arasını Boya)
// Fiyat bu gri alanın içindeyse "Normal", dışına taşarsa "Sapma" başlar.
//fill(p1, p2, color=color.new(color.gray, 90), title="Güvenli Yörünge Alanı")
// ==========================================
// ==========================================
// 1. MOTOR (SAR ve AYNA)
// ==========================================
//s1 = ta.sar(0.08, 0.05, 0.2)
//s2 = ta.sar(0.01, 0.05, 0.2)
//s3 = ta.sar(0.04, 0.04, 0.2)
//avg_sar = (s1 + s2 + s3) / 3
//f_mirror(_sar, _len) =>
//float _delta = math.abs(close - _sar)
//float _raw = close > _sar ? close + _delta : close - _delta
//ta.linreg(_raw, _len, 0)
//m1 = f_mirror(s1, 20)
//m2 = f_mirror(s2, 22)
//m3 = f_mirror(s3, 20)
//avg_mir = (m1 + m2 + m3) / 3
// ==========================================
// 2. GÜÇ METRİĞİ
// ==========================================
float power_sar = ta.hma((close - avg_sar) / syminfo.mintick, 9)
float power_mir = ta.hma((avg_mir - close) / syminfo.mintick, 5)
// ==========================================
// 3. OLAYLAR (HESAPLAMA)
// ==========================================
// Ters Pullback (Daireler)
bool event_bull = power_sar > 0 and ta.crossover(power_mir, power_sar) and power_mir > 0
bool event_bear = power_sar < 0 and ta.crossunder(power_mir, power_sar) and power_mir < 0
// Trend Değişimi (X İşaretleri)
bool event_trend_up = ta.crossover(power_sar, 0) // Trend Yukarı Döndü
bool event_trend_dn = ta.crossunder(power_sar, 0) // Trend Aşağı Döndü
// ==========================================
// 4. SİNYAL KİLİDİ (NO-REPAINT)
// ==========================================
// Sadece mum kapandığında (Confirmed) sinyal üret.
bool sig_rev_buy = event_bear and barstate.isconfirmed
bool sig_rev_sell = event_bull and barstate.isconfirmed
bool sig_trend_up = event_trend_up and barstate.isconfirmed
bool sig_trend_dn = event_trend_dn and barstate.isconfirmed
// ==========================================
// 5. GÖRSELLEŞTİRME (FİYAT ÜZERİNDE)
// ==========================================
// Ters AL (Yeşil Daire)
plotshape(sig_rev_buy, "Ters AL", shape.labelup, location.belowbar, color=color.lime, size=size.small, text="P\nL", textcolor=color.white)
// Ters SAT (Kırmızı Daire)
plotshape(sig_rev_sell, "Ters SAT", shape.labeldown, location.abovebar, color=color.red, size=size.small, text="P\nS", textcolor=color.white)
// Trend Başlangıcı (Yeşil X)
plotshape(sig_trend_up, "Trend Başladı", shape.xcross, location.belowbar, color=color.green, size=size.normal)
// Trend Bitişi (Kırmızı X)
plotshape(sig_trend_dn, "Trend Bitti", shape.xcross, location.abovebar, color=color.red, size=size.normal)
// ==========================================
// 6. AKILLI TABLO (SON SİNYAL)
// ==========================================
// Hafıza Değişkenleri
var string last_txt = "BEKLENİYOR..."
var float last_price = 0.0
var color last_col = color.gray
// Güncelleme Mantığı (Hiyerarşi: En son ne olduysa o yazar)
if sig_rev_buy
last_txt := "TERS AL (DAİRE)"
last_col := color.lime
last_price := close
else if sig_rev_sell
last_txt := "TERS SAT (DAİRE)"
last_col := color.red
last_price := close
else if sig_trend_up
last_txt := "TREND BAŞLADI (X)"
last_col := color.green // Daha koyu yeşil
last_price := close
else if sig_trend_dn
last_txt := "TREND BİTTİ (X)"
last_col := color.maroon // Daha koyu kırmızı
last_price := close
// Tablo Çizimi
var table panel5 = table.new(position.top_right, 2, 2, bgcolor=color.new(color.black, 50), border_width=1, border_color=color.gray)
if barstate.islast
// Başlık
table.cell(panel5, 0, 0, "SON SİNYAL:", text_color=color.white, text_size=size.small, text_halign=text.align_left)
// Sinyal Tipi (X veya Daire fark etmez, sonuncusu yazar)
table.cell(panel5, 1, 0, last_txt, text_color=last_col, text_size=size.small, text_halign=text.align_right)
// Fiyat
table.cell(panel5, 0, 1, "FİYAT:", text_color=color.gray, text_size=size.small, text_halign=text.align_left)
table.cell(panel5, 1, 1, str.tostring(last_price, format.mintick), text_color=color.white, text_size=size.small, text_halign=text.align_right)
///////////İMZA//////////////
var table ytd_table = table.new(position.bottom_center, 1, 1)
if barstate.islast
table.cell(ytd_table, 0, 0, "Eğitim çalışmasıdır. YATIRIM TAVSİYESİ olarak KULLANILAMAZ.", text_color=color.new(color.white, 00), text_size=size.normal)
///////////////////////son/////////

Alıntı yaparak yanıtla



Yer İmleri