PHP Code://@version=6
indicator(":)", overlay=true, max_lines_count=50, max_labels_count=50)
// ==========================================
// 1. AYARLAR
// ==========================================
float ayar_genislik = input.float(1.0, "Genişlik (0.1 - 2.0)", minval=0.1, maxval=2.0, step=0.1)
// ==========================================
// 2. ANA OMURGA MOTORU (HMA 55)
// ==========================================
float s_start_sabit = 0.02
float s_inc_sabit = 0.02
float s_max_sabit = 0.2
int s_smooth_sabit = 55
f_katman_ana(_start, _inc, _max, _smooth) =>
float _sar = ta.sar(_start, _inc, _max)
float _delta = math.abs(close - _sar)
bool _is_up = close > _sar
float _raw_mirror = _is_up ? close + _delta : close - _delta
ta.hma(_raw_mirror, _smooth)
float mirror_ana = f_katman_ana(s_start_sabit, s_inc_sabit, s_max_sabit, s_smooth_sabit)
// ==========================================
// 3. MOTOR BLOKLARI (SAR PARAMETRELERİ)
// ==========================================
float s_slow_1 = ta.sar(0.02, 0.02, 0.2)
float s_slow_2 = ta.sar(0.015, 0.015, 0.15)
float s_slow_3 = ta.sar(0.01, 0.01, 0.1)
float s_fast_1 = ta.sar(0.08, 0.05, 0.2)
float s_fast_2 = ta.sar(0.01, 0.05, 0.2)
float s_fast_3 = ta.sar(0.04, 0.04, 0.2)
float avg_fast = (s_fast_1 + s_fast_2 + s_fast_3) / 3
// ==========================================
// 4. YAPAY ZEKA (DL) MODÜLÜ (SÜRTÜNMESİZ)
// ==========================================
tanh_fn(v) => (1 - math.exp(-2 * v)) / (1 + math.exp(-2 * v))
td_fn(s) => nz((s - nz(s[1])) / nz(s[1]))
float in_o = tanh_fn(td_fn(open))
float in_h = tanh_fn(td_fn(high))
float in_l = tanh_fn(td_fn(low))
float in_c = tanh_fn(td_fn(close))
float h0 = tanh_fn((in_o * 22.4271) + (in_h * -26.6917) + (in_l * 4.9371) + (in_c * 9.0349) - 10.6929)
float h1 = tanh_fn((in_o * -38.2880) + (in_h * 10.0500) + (in_l * -44.7063) + (in_c * -17.8163) + 30.5662)
float h2 = tanh_fn((in_o * -33.9954) + (in_h * 14.5017) + (in_l * -43.2865) + (in_c * -13.3874) + 24.7080)
float h3 = tanh_fn((in_o * -14.3929) + (in_h * 28.4830) + (in_l * -22.9793) + (in_c * -7.6582) - 5.6505)
float h4 = tanh_fn((in_o * 28.8379) + (in_h * -26.3544) + (in_l * 0.5206) + (in_c * 25.0049) - 17.8832)
float h5 = tanh_fn((in_o * -4.8113) + (in_h * -4.0364) + (in_l * -8.3327) + (in_c * -1.1571) + 0.4667)
float dl_val = tanh_fn((h0 * -22.0533) + (h1 * 3.6525) + (h2 * -4.3904) + (h3 * 2.1030) + (h4 * 20.0272) + (h5 * 11.5101) - 0.4150)
float ai_factor = (0.2 + (math.abs(dl_val) * 0.5)) * ayar_genislik
// ==========================================
// 5. DİNAMİK RENKLİ ATMOSFER VE KALKAN
// ==========================================
bool all_fast_below = (close > s_fast_1) and (close > s_fast_2) and (close > s_fast_3)
bool all_fast_above = (close < s_fast_1) and (close < s_fast_2) and (close < s_fast_3)
color core_color = all_fast_below ? color.new(color.green, 75) :
all_fast_above ? color.new(color.red, 75) :
color.new(color.yellow, 75)
float dist_1 = math.abs(close - s_fast_1) * ai_factor
float l1_top = close + dist_1
float l1_bot = close - dist_1
p1_top = plot(l1_top, "Üst", display=display.none)
p1_bot = plot(l1_bot, "Alt", display=display.none)
fill(p1_top, p1_bot, color=core_color, title="Dinamik Çekirdek")
int kalkan = 0
if close > s_fast_1
kalkan += 1
if close > s_fast_2
kalkan += 1
if close > s_fast_3
kalkan += 1
if close < s_fast_1 and close < avg_fast
kalkan += 1
if close < s_fast_2 and close < avg_fast
kalkan += 1
if close < s_fast_3 and close < avg_fast
kalkan += 1
color bar_col = na
if kalkan >= 3
bar_col := close > avg_fast ? color.rgb(0, 230, 119, 00) : color.rgb(255, 82, 82, 00)
else if kalkan == 2
bar_col := color.blue
else
bar_col := color.fuchsia
barcolor(bar_col)
// ==========================================
// 6. ANA OMURGA RENK MANTIĞI
// ==========================================
bool makro_al = mirror_ana > close
color col_mirror_ana = na
if makro_al
if mirror_ana < mirror_ana[1]
col_mirror_ana := color.blue
else
col_mirror_ana := color.lime
else
if mirror_ana > mirror_ana[1]
col_mirror_ana := color.yellow
else
col_mirror_ana := color.red
// ==========================================
// 7. HAFIZALI SİNYAL MANTIĞI VE TAKİP
// ==========================================
bool is_sari = (col_mirror_ana == color.yellow)
bool is_mavi = (col_mirror_ana == color.blue)
var int sinyal_durumu = 0
bool kesin_al = false
bool kesin_sat = false
var string son_yon = "BEKLENİYOR"
var float son_sinyal_fiyati = na
if barstate.isconfirmed
if is_sari and sinyal_durumu != 1
kesin_al := true
sinyal_durumu := 1
son_yon := "AL"
son_sinyal_fiyati := close
if is_mavi and sinyal_durumu != -1
kesin_sat := true
sinyal_durumu := -1
son_yon := "SAT"
son_sinyal_fiyati := close
// ==========================================
// 8. ÇİFT YÖNLÜ EVREKA MANTIĞI (TAVAN VE ZEMİN)
// ==========================================
var float evreka_tepe = na
var float evreka_dip = na
bool is_green_core = all_fast_below
bool is_red_core = all_fast_above
if is_green_core
evreka_tepe := na(evreka_tepe) ? l1_top : math.max(evreka_tepe, l1_top)
if is_red_core
evreka_dip := na(evreka_dip) ? l1_bot : math.min(evreka_dip, l1_bot)
if close < s_slow_1
evreka_tepe := na
if close > s_slow_1
evreka_dip := na
bool evreka_direnc_kirilim = ta.crossover(mirror_ana, evreka_tepe) and barstate.isconfirmed
bool evreka_destek_kirilim = ta.crossunder(mirror_ana, evreka_dip) and barstate.isconfirmed
// ==========================================
// 9. YENİ: Aİ TABANLI DİNAMİK STOP (ESNEYEN ZIRH)
// ==========================================
// Yapay zeka ivmesine göre esneyen stop çarpanı (Trendde 1.0'a daralır, Testerede 2.5'e genişler)
float stop_genis = 2.5
float stop_dar = 1.0
float stop_carpan = stop_genis - (math.abs(dl_val) * (stop_genis - stop_dar))
float stop_mesafe = ta.atr(14) * stop_carpan
var float din_stop = na
if sinyal_durumu == 1 // AL Sinyali aktifse (Long Stop Takipli)
float ham_stop = close - stop_mesafe
din_stop := (sinyal_durumu[1] != 1) ? ham_stop : math.max(nz(din_stop[1], ham_stop), ham_stop)
else if sinyal_durumu == -1 // SAT Sinyali aktifse (Short Stop Takipli)
float ham_stop = close + stop_mesafe
din_stop := (sinyal_durumu[1] != -1) ? ham_stop : math.min(nz(din_stop[1], ham_stop), ham_stop)
// Dinamik Stop Görseli (Küçük Yuvarlak Noktalar)
plot(sinyal_durumu == 1 ? din_stop : na, "Dinamik Stop (AL)", color=color.new(color.lime, 30), style=plot.style_circles, linewidth=1)
plot(sinyal_durumu == -1 ? din_stop : na, "Dinamik Stop (SAT)", color=color.new(color.red, 30), style=plot.style_circles, linewidth=1)
// ==========================================
// 10. HAFİF VİTES (REJİM) ETİKETLERİ
// ==========================================
float cross_val = ta.cross(close, s_fast_1) ? 1.0 : 0.0
float flip_count = math.sum(cross_val, 100)
int vites = flip_count > 15 ? 1 : (flip_count < 8 ? 3 : 2)
color vites_col = vites == 1 ? color.red : (vites == 3 ? color.lime : color.yellow)
if bar_index % 2 == 0
label.new(bar_index, close > s_fast_1 ? s_fast_1 - ta.atr(14)*0.5 : s_fast_1 + ta.atr(14)*0.5, str.tostring(vites), style=label.style_none, textcolor=color.new(vites_col, 30), size=size.small)
// ==========================================
// 11. GÖRSELLEŞTİRME VE ALARMLAR
// ==========================================
plot(mirror_ana, "0", color=col_mirror_ana, linewidth=3, style=plot.style_stepline)
plot(evreka_tepe, "+1", color=color.new(color.fuchsia, 100), style=plot.style_linebr, linewidth=2)
plot(evreka_dip, "-1", color=color.new(color.fuchsia, 100), style=plot.style_linebr, linewidth=2)
plotshape(kesin_al, "Sarı Başladı (AL)", shape.labelup, location.belowbar, color.rgb(255, 235, 59), text="L", textcolor=color.black, size=size.small)
plotshape(kesin_sat, "Mavi Başladı (SAT)", shape.labeldown, location.abovebar, color.rgb(33, 150, 243), text="S", textcolor=color.white, size=size.small)
plotshape(evreka_direnc_kirilim, "(@yörük@) DİRENÇ", shape.flag, location.abovebar, color.fuchsia, text="DİR\n(@yörük@)", textcolor=color.fuchsia, size=size.small)
plotshape(evreka_destek_kirilim, "(@yörük@) DESTEK", shape.flag, location.belowbar, color.fuchsia, text="DES\n(@yörük@)", textcolor=color.fuchsia, size=size.small)
alertcondition(evreka_direnc_kirilim, title="💎 EVREKA (KOPUŞ!)", message="Sistem: Ana Trend, Çekirdek Tepeyi aştı!")
alertcondition(evreka_destek_kirilim, title="⚠️ EVREKA (ÇÖKÜŞ!)", message="Sistem: Ana Trend, Çekirdek Dibi aşağı kırdı!")
// ==========================================
// 12. KOMUTA MERKEZİ (DASHBOARD)
// ==========================================
var table dash = table.new(position.top_right, 3, 16, border_width = 1, border_color = color.new(color.gray, 80))
if barstate.islast
table.cell(dash, 0, 0, "Yatırım Tavsiyesi DEĞİLDİR.", text_color=color.white, bgcolor=color.new(color.black, 20), text_size=size.normal, text_halign=text.align_center)
table.merge_cells(dash, 0, 0, 2, 0)
table.cell(dash, 0, 1, "Fiyat:", text_color=color.gray, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 1, str.tostring(close, format.mintick), text_color=color.white, bgcolor=color.new(color.black, 40), text_halign=text.align_right)
table.merge_cells(dash, 1, 1, 2, 1)
string v_txt = vites == 1 ? "TESTERE (1)" : vites == 3 ? "TREND (3)" : "NÖTR (2)"
table.cell(dash, 0, 2, "Piyasa Vitesi:", text_color=color.gray, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 2, v_txt, text_color=vites_col, bgcolor=color.new(color.black, 40), text_halign=text.align_right)
table.merge_cells(dash, 1, 2, 2, 2)
string sig_text = son_yon == "BEKLENİYOR" ? "YOK" : son_yon + " @ " + str.tostring(son_sinyal_fiyati, format.mintick)
color sig_color = son_yon == "AL" ? color.rgb(255, 235, 59) : son_yon == "SAT" ? color.rgb(33, 150, 243) : color.gray
table.cell(dash, 0, 3, "Son Sinyal:", text_color=color.gray, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 3, sig_text, text_color=sig_color, bgcolor=color.new(color.black, 40), text_halign=text.align_right)
table.merge_cells(dash, 1, 3, 2, 3)
// YENİ: DİNAMİK STOP (ESNEYEN ZIRH) SATIRI
string stop_txt = na(din_stop) ? "HESAPLANIYOR" : str.tostring(din_stop, format.mintick)
color stop_renk = sinyal_durumu == 1 ? color.lime : (sinyal_durumu == -1 ? color.red : color.gray)
table.cell(dash, 0, 4, "Aİ Dinamik Stop:", text_color=color.yellow, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 4, stop_txt, text_color=stop_renk, bgcolor=color.new(color.black, 40), text_halign=text.align_right)
table.merge_cells(dash, 1, 4, 2, 4)
table.cell(dash, 0, 5, "Trend:", text_color=color.gray, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 5, str.tostring(mirror_ana, format.mintick), text_color=col_mirror_ana, bgcolor=color.new(color.black, 40), text_halign=text.align_right)
table.merge_cells(dash, 1, 5, 2, 5)
string evreka_tepe_str = na(evreka_tepe) ? "BEKLENİYOR" : str.tostring(evreka_tepe, format.mintick)
table.cell(dash, 0, 6, "Oto Direnç:", text_color=color.fuchsia, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 6, evreka_tepe_str, text_color=color.fuchsia, bgcolor=color.new(color.black, 40), text_halign=text.align_right)
table.merge_cells(dash, 1, 6, 2, 6)
string evreka_dip_str = na(evreka_dip) ? "BEKLENİYOR" : str.tostring(evreka_dip, format.mintick)
table.cell(dash, 0, 7, "Oto Destek:", text_color=color.fuchsia, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 7, evreka_dip_str, text_color=color.fuchsia, bgcolor=color.new(color.black, 40), text_halign=text.align_right)
table.merge_cells(dash, 1, 7, 2, 7)
table.cell(dash, 0, 8, "--- Aİ-HIZLI (@yörük@) ---", text_color=color.yellow, bgcolor=color.new(color.black, 20), text_halign=text.align_center)
table.merge_cells(dash, 0, 8, 2, 8)
table.cell(dash, 0, 9, "1:", text_color=color.gray, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 9, str.tostring(s_fast_1, format.mintick), text_color=color.white, bgcolor=color.new(color.black, 40), text_halign=text.align_right)
table.cell(dash, 2, 9, close > s_fast_1 ? "AL" : "SAT", text_color=close > s_fast_1 ? color.lime : color.red, bgcolor=color.new(color.black, 40), text_halign=text.align_center)
table.cell(dash, 0, 10, "2:", text_color=color.gray, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 10, str.tostring(s_fast_2, format.mintick), text_color=color.white, bgcolor=color.new(color.black, 40), text_halign=text.align_right)
table.cell(dash, 2, 10, close > s_fast_2 ? "AL" : "SAT", text_color=close > s_fast_2 ? color.lime : color.red, bgcolor=color.new(color.black, 40), text_halign=text.align_center)
table.cell(dash, 0, 11, "3:", text_color=color.gray, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 11, str.tostring(s_fast_3, format.mintick), text_color=color.white, bgcolor=color.new(color.black, 40), text_halign=text.align_right)
table.cell(dash, 2, 11, close > s_fast_3 ? "AL" : "SAT", text_color=close > s_fast_3 ? color.lime : color.red, bgcolor=color.new(color.black, 40), text_halign=text.align_center)
table.cell(dash, 0, 12, "--- Aİ-YAVAŞ (@yörük@) ---", text_color=color.yellow, bgcolor=color.new(color.black, 20), text_halign=text.align_center)
table.merge_cells(dash, 0, 12, 2, 12)
table.cell(dash, 0, 13, "4:", text_color=color.gray, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 13, str.tostring(s_slow_1, format.mintick), text_color=color.white, bgcolor=color.new(color.black, 40), text_halign=text.align_right)
table.cell(dash, 2, 13, close > s_slow_1 ? "AL" : "SAT", text_color=close > s_slow_1 ? color.lime : color.red, bgcolor=color.new(color.black, 40), text_halign=text.align_center)
table.cell(dash, 0, 14, "5:", text_color=color.gray, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 14, str.tostring(s_slow_2, format.mintick), text_color=color.white, bgcolor=color.new(color.black, 40), text_halign=text.align_right)
table.cell(dash, 2, 14, close > s_slow_2 ? "AL" : "SAT", text_color=close > s_slow_2 ? color.lime : color.red, bgcolor=color.new(color.black, 40), text_halign=text.align_center)
table.cell(dash, 0, 15, "6:", text_color=color.gray, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 15, str.tostring(s_slow_3, format.mintick), text_color=color.white, bgcolor=color.new(color.black, 40), text_halign=text.align_right)
table.cell(dash, 2, 15, close > s_slow_3 ? "AL" : "SAT", text_color=close > s_slow_3 ? color.lime : color.red, bgcolor=color.new(color.black, 40), text_halign=text.align_center)
var table ytd_table = table.new(position.bottom_center, 1, 1)
if barstate.islast
table.cell(ytd_table, 0, 0, "(Aİ) - Eğitim çalışmasıdır. Yatırım tavsiyesi KULLANILAMAZ.", text_color=color.new(color.white, 00), text_size=size.small)

Alıntı yaparak yanıtla
Yer İmleri