PHP Code://@version=6
indicator(":)", overlay=true, max_lines_count=50, max_labels_count=50)
// ┌──────────────────────────────────────────────────────────────────────────────┐
// │ 1. AYARLAR VE ANA OMURGA (ATMOSFER) │
// └──────────────────────────────────────────────────────────────────────────────┘
float ayar_genislik = input.float(1.0, "Genişlik (0.1 - 2.0)", minval=0.1, maxval=2.0, step=0.1)
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(0.02, 0.02, 0.2, 200)
float mirror_ana1 = f_katman_ana(0.02, 0.02, 0.2, 50)
// ┌──────────────────────────────────────────────────────────────────────────────┐
// │ 2. Aİ MOTOR BLOKLARI VE DERİN ÖĞRENME HESAPLAMALARI │
// └──────────────────────────────────────────────────────────────────────────────┘
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
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
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
p1_top = plot(close + dist_1, "Üst", display=display.none)
p1_bot = plot(close - dist_1, "Alt", display=display.none)
fill(p1_top, p1_bot, color=core_color, title="Dinamik Çekirdek")
// ┌──────────────────────────────────────────────────────────────────────────────┐
// │ 3. ANA TREND RENK VE SİNYAL HAFIZASI │
// └──────────────────────────────────────────────────────────────────────────────┘
bool makro_al = mirror_ana > close
color col_mirror_ana = makro_al ? (mirror_ana < mirror_ana[1] ? color.blue : color.lime) : (mirror_ana > mirror_ana[1] ? color.yellow : color.red)
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 col_mirror_ana == color.yellow and sinyal_durumu != 1
kesin_al := true
sinyal_durumu := 1
son_yon := "AL"
son_sinyal_fiyati := close
if col_mirror_ana == color.blue and sinyal_durumu != -1
kesin_sat := true
sinyal_durumu := -1
son_yon := "SAT"
son_sinyal_fiyati := close
// ┌──────────────────────────────────────────────────────────────────────────────┐
// │ 4. SAF MTK-3 ÇİFTE KIRILIM MOTORU (MUSA'NIN ASASI) │
// └──────────────────────────────────────────────────────────────────────────────┘
sarStart = input.float(0.001, "Basınç Başlangıcı", group="MTK-3 Motoru")
sarInc = input.float(0.002, "Basınç İvmesi", group="MTK-3 Motoru")
sarMax = input.float(0.20, "Maksimum Tazyik", group="MTK-3 Motoru")
direncPeriyodu = input.int(2, "Kapakçık (Sınır) Periyodu", group="MTK-3 Motoru")
psarVal = ta.sar(sarStart, sarInc, sarMax)
ustKapak = ta.highest(high, direncPeriyodu)[1]
altKapak = ta.lowest(low, direncPeriyodu)[1]
// Çifte Kırılım (Tetik)
ciftKirilimAtim = ta.crossover(close, psarVal) and (close > ustKapak)
ciftKirilimGevseme = ta.crossunder(close, psarVal) and (close < altKapak)
// Mutlak Hedefler (Evreka)
var float tepeHedef = na
var float dipHedef = na
if ciftKirilimAtim
dipHedef := ta.lowest(low, direncPeriyodu * 2)[1]
if ciftKirilimGevseme
tepeHedef := ta.highest(high, direncPeriyodu * 2)[1]
var int mtkDongu = 0
if ciftKirilimAtim
mtkDongu := 1
else if ciftKirilimGevseme
mtkDongu := -1
// ┌──────────────────────────────────────────────────────────────────────────────┐
// │ 5. GÖRSELLEŞTİRME VE ALARMLAR │
// └──────────────────────────────────────────────────────────────────────────────┘
plot(mirror_ana, "Ana Trend", color=col_mirror_ana, linewidth=3, style=plot.style_stepline)
//plot(mirror_ana1, "Olası Trend", color=color.white, linewidth=2, style=plot.style_stepline)
plot(psarVal, "@yörük@", style=plot.style_cross, color=close > psarVal ? color.yellow : color.blue, linewidth=2)
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)
bgcolor(mtkDongu == 1 ? color.new(color.lime, 90) : mtkDongu == -1 ? color.new(color.red, 90) : na, title="Döngü Formu")
//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)
// Tetiğe bağlanan bayraklar ve alarmlar
//plotshape(ciftKirilimAtim, "(@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(ciftKirilimGevseme, "(@yörük@) DESTEK", shape.flag, location.belowbar, color.fuchsia, text="DES\n(@yörük@)", textcolor=color.fuchsia, size=size.small)
alertcondition(ciftKirilimAtim, title="💎 EVREKA (KOPUŞ!)", message="Sistem: Çifte Kırılım Gerçekleşti, Tazyik Yukarı!")
alertcondition(ciftKirilimGevseme, title="⚠️ EVREKA (ÇÖKÜŞ!)", message="Sistem: Çifte Kırılım Gerçekleşti, Tazyik Aşağı!")
// ┌──────────────────────────────────────────────────────────────────────────────┐
// │ 6. 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)
// Eski hesaplamalar yerine Saf MTK-3'ün Mutlak Hedefleri bağlandı
string evreka_tepe_str = na(tepeHedef) ? "BEKLENİYOR" : str.tostring(tepeHedef, 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(dipHedef) ? "BEKLENİYOR" : str.tostring(dipHedef, 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.gray, 50), text_size=size.small)

Alıntı yaparak yanıtla
Yer İmleri