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, 50) :
all_fast_above ? color.new(color.red, 50) :
color.new(color.yellow, 50)
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
// Renklere değil, doğrudan çekirdeği oluşturan matematiksel mantığa kilitledik!
bool is_green_core = all_fast_below
bool is_red_core = all_fast_above
// TAVAN: Yeşil atmosferin en yüksek noktası
if is_green_core
evreka_tepe := na(evreka_tepe) ? l1_top : math.max(evreka_tepe, l1_top)
// ZEMİN: Kırmızı atmosferin en düşük noktası
if is_red_core
evreka_dip := na(evreka_dip) ? l1_bot : math.min(evreka_dip, l1_bot)
// TREND DÖNÜŞÜNDE HAFIZALARI SIFIRLAMA
if close < s_slow_1
evreka_tepe := na
if close > s_slow_1
evreka_dip := na
// KIRILIMLAR
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. 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.tiny)
plotshape(kesin_sat, "Mavi Başladı (SAT)", shape.labeldown, location.abovebar, color.rgb(33, 150, 243), text="S", textcolor=color.white, size=size.tiny)
// Çift Yönlü Evreka Bayrakları
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ı!")
// ==========================================
// 10. KOMUTA MERKEZİ (DASHBOARD)
// ==========================================
var table dash = table.new(position.top_right, 3, 14, 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 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, 2, "Son Sinyal:", text_color=color.gray, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 2, sig_text, text_color=sig_color, bgcolor=color.new(color.black, 40), text_halign=text.align_right)
table.merge_cells(dash, 1, 2, 2, 2)
table.cell(dash, 0, 3, "Trend:", text_color=color.gray, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 3, 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, 3, 2, 3)
string evreka_tepe_str = na(evreka_tepe) ? "BEKLENİYOR" : str.tostring(evreka_tepe, format.mintick)
table.cell(dash, 0, 4, "Oto Direnç:", text_color=color.fuchsia, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 4, evreka_tepe_str, text_color=color.fuchsia, bgcolor=color.new(color.black, 40), text_halign=text.align_right)
table.merge_cells(dash, 1, 4, 2, 4)
string evreka_dip_str = na(evreka_dip) ? "BEKLENİYOR" : str.tostring(evreka_dip, format.mintick)
table.cell(dash, 0, 5, "Oto Destek:", text_color=color.fuchsia, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 5, evreka_dip_str, text_color=color.fuchsia, bgcolor=color.new(color.black, 40), text_halign=text.align_right)
table.merge_cells(dash, 1, 5, 2, 5)
table.cell(dash, 0, 6, "--- 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, 6, 2, 6)
table.cell(dash, 0, 7, "1:", text_color=color.gray, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 7, 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, 7, 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, 8, "2:", text_color=color.gray, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 8, 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, 8, 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, 9, "3:", text_color=color.gray, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 9, 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, 9, 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, 10, "--- 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, 10, 2, 10)
table.cell(dash, 0, 11, "4:", text_color=color.gray, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 11, 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, 11, 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, 12, "5:", text_color=color.gray, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 12, 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, 12, 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, 13, "6:", text_color=color.gray, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
table.cell(dash, 1, 13, 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, 13, 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)
////////////////////
// ┌────────────────────────────── 1. İÇSEL TAZYİK: PSAR ─────────────────────────────┐
sarStart = input.float(0.01, "Basınç Başlangıcı")
sarInc = input.float(0.02, "Basınç İvmesi")
sarMax = input.float(0.2, "Maksimum Tazyik")
psarVal = ta.sar(sarStart, sarInc, sarMax)
// ┌────────────────────────────── 2. FİZİKSEL DİRENÇ: KABUK ─────────────────────────┐
direncPeriyodu = input.int(2, "Kapakçık (Sınır) Periyodu")
ustKapak = ta.highest(high, direncPeriyodu)[1]
altKapak = ta.lowest(low, direncPeriyodu)[1]
// ┌────────────────────────────── 3. MTK-3: ÇİFTE KIRILIM ───────────────────────────┐
ciftKirilimAtim = ta.crossover(close, psarVal) and (close > ustKapak)
ciftKirilimGevseme = ta.crossunder(close, psarVal) and (close < altKapak)
// ┌────────────────────────────── 4. MUTLAK HEDEFLER (EVREKA) ───────────────────────┐
// Tahmin (forecast) yok. Kırılım anındaki mutlak geçmiş uç nokta hedeftir.
var float tepeHedef = na
var float dipHedef = na
// Kan pompalandığında (Yukarı Kırılım), geride kalan en derin nefes boşluğu DİP HEDEF olur.
if ciftKirilimAtim
dipHedef := ta.lowest(low, direncPeriyodu * 2)[1]
// Sistem gevşediğinde (Aşağı Kırılım), geride kalan en şişkin kapasite TEPE HEDEF olur.
if ciftKirilimGevseme
tepeHedef := ta.highest(high, direncPeriyodu * 2)[1]
// ┌────────────────────────────── GÖRSELLEŞTİRME ────────────────────────────────────┐
plot(psarVal, "@yörük@", style=plot.style_cross, color=close > psarVal ? color.yellow : color.blue, linewidth=2)
//plot(ustKapak, "Üst Kapakçık", color=color.new(color.gray, 60), style=plot.style_stepline)
//plot(altKapak, "Alt Kapakçık", color=color.new(color.gray, 60), style=plot.style_stepline)
// Hedef Çizgileri (Geleceğe uzanan sabit ölçüler)
plot(tepeHedef, "O-Tepe ", color=color.new(color.blue, 30), style=plot.style_linebr, linewidth=1)
plot(dipHedef, "O-Dip ", color=color.new(color.yellow, 30), style=plot.style_linebr, linewidth=1)
//plotshape(ciftKirilimAtim, "MTK-3 Atım", shape.triangleup, location.belowbar, color.teal, size=size.normal)
//plotshape(ciftKirilimGevseme, "MTK-3 Gevşeme", shape.triangledown, location.abovebar, color.maroon, size=size.normal)
// Daire Formu Döngüsü
var int mtkDongu = 0
if ciftKirilimAtim
mtkDongu := 1
else if ciftKirilimGevseme
mtkDongu := -1
bgcolor(mtkDongu == 1 ? color.new(color.lime, 90) : mtkDongu == -1 ? color.new(color.red, 90) : na, title="Döngü Formu")

Alıntı yaparak yanıtla
Yer İmleri