Artan
Azalan
İşlem
BIST 30
BIST 50
BIST 100
Hisse Fiyat Fark% Hacim (TL) Düşük / Yüksek
4,40 10% 4,67 Mn 4,40 / 4,40
539,00 10% 232,77 Mn 486,00 / 539,00
59,40 10% 442,53 Mn 52,00 / 59,40
13,31 10% 8,16 Mn 13,31 / 13,31
47,74 10% 4,39 Mr 42,44 / 47,74
Hisse Fiyat Fark% Hacim (TL) Düşük / Yüksek
118,80 -10% 643,70 Mn 118,80 / 132,00
44,48 -10% 315,74 Mn 44,48 / 49,24
66,60 -10% 209,22 Mn 66,60 / 70,85
17,23 -9.98% 2,20 Mr 17,23 / 19,90
33,56 -9.98% 20,79 Mn 33,56 / 36,78
Hisse Fiyat Fark% Hacim (TL) Düşük / Yüksek
250,25 -3% 17,04 Mr 248,10 / 277,25
282,00 1.9% 14,00 Mr 263,50 / 282,00
73,60 -0.61% 12,02 Mr 69,30 / 73,90
319,00 -4.35% 11,83 Mr 318,50 / 337,75
14,07 -1.05% 10,64 Mr 13,31 / 14,14
Hisse Fiyat Fark% Hacim (TL) Düşük / Yüksek
16,89 0% 1,14 Mr 15,68 / 16,89
73,60 -0.61% 12,02 Mr 69,30 / 73,90
319,00 -4.35% 11,83 Mr 318,50 / 337,75
180,90 2.38% 4,91 Mr 169,80 / 180,90
639,50 2.98% 3,66 Mr 607,50 / 640,00
Hisse Fiyat Fark% Hacim (TL) Düşük / Yüksek
16,89 0% 1,14 Mr 15,68 / 16,89
73,60 -0.61% 12,02 Mr 69,30 / 73,90
92,65 -0.43% 574,22 Mn 89,70 / 93,15
107,60 -1.28% 238,15 Mn 104,20 / 108,10
319,00 -4.35% 11,83 Mr 318,50 / 337,75
Hisse Fiyat Fark% Hacim (TL) Düşük / Yüksek
16,89 0% 1,14 Mr 15,68 / 16,89
29,08 -2.02% 148,99 Mn 27,98 / 29,22
73,60 -0.61% 12,02 Mr 69,30 / 73,90
9,96 -0.99% 226,40 Mn 9,80 / 10,27
67,00 -1.54% 453,42 Mn 65,95 / 68,65
Sayfa 385/387 İlkİlk ... 285335375383384385386387 SonSon
Arama sonucu : 3094 madde; 3,073 - 3,080 arası.

Konu: Tradingview

  1. PHP Code:
    //@version=6
    indicator(":)"overlay=truemax_lines_count=50max_labels_count=50)

    // ==========================================
    // 1. AYARLAR
    // ==========================================
    float ayar_genislik input.float(1.0"Genişlik (0.1 - 2.0)"minval=0.1maxval=2.0step=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_sabits_inc_sabits_max_sabits_smooth_sabit)

    // ==========================================
    // 3. MOTOR BLOKLARI (SAR PARAMETRELERİ)
    // ==========================================
    float s_slow_1 ta.sar(0.020.020.2)
    float s_slow_2 ta.sar(0.0150.0150.15)
    float s_slow_3 ta.sar(0.010.010.1)

    float s_fast_1 ta.sar(0.080.050.2
    float s_fast_2 ta.sar(0.010.050.2)
    float s_fast_3 ta.sar(0.040.040.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) => (math.exp(-v)) / (math.exp(-v))
    td_fn(s)   => nz((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.green50) : 
                       
    all_fast_above color.new(color.red50) : 
                       
    color.new(color.yellow50)

    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_topp1_botcolor=core_colortitle="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(023011900) : color.rgb(255828200)
    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 
    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_tepel1_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_dipl1_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_anaevreka_tepe) and barstate.isconfirmed
    bool evreka_destek_kirilim 
    ta.crossunder(mirror_anaevreka_dip) and barstate.isconfirmed

    // ==========================================
    // 9. GÖRSELLEŞTİRME VE ALARMLAR
    // ==========================================
    plot(mirror_ana"0"color=col_mirror_analinewidth=3style=plot.style_stepline)
    plot(evreka_tepe"+1"color=color.new(color.fuchsia100), style=plot.style_linebrlinewidth=2)
    plot(evreka_dip"-1"color=color.new(color.fuchsia100), style=plot.style_linebrlinewidth=2)

    plotshape(kesin_al"Sarı Başladı (AL)"shape.labeluplocation.belowbarcolor.rgb(25523559), text="L"textcolor=color.blacksize=size.tiny)
    plotshape(kesin_sat"Mavi Başladı (SAT)"shape.labeldownlocation.abovebarcolor.rgb(33150243), text="S"textcolor=color.whitesize=size.tiny)

    // Çift Yönlü Evreka Bayrakları
    plotshape(evreka_direnc_kirilim"(@yörük@) DİRENÇ"shape.flaglocation.abovebarcolor.fuchsiatext="DİR\n(@yörük@)"textcolor=color.fuchsiasize=size.small)
    plotshape(evreka_destek_kirilim"(@yörük@) DESTEK"shape.flaglocation.belowbarcolor.fuchsiatext="DES\n(@yörük@)"textcolor=color.fuchsiasize=size.small)

    alertcondition(evreka_direnc_kirilimtitle="💎 EVREKA (KOPUŞ!)"message="Sistem: Ana Trend, Çekirdek Tepeyi aştı!")
    alertcondition(evreka_destek_kirilimtitle="⚠️ EVREKA (ÇÖKÜŞ!)"message="Sistem: Ana Trend, Çekirdek Dibi aşağı kırdı!")

    // ==========================================
    // 10. KOMUTA MERKEZİ (DASHBOARD)
    // ==========================================
    var table dash table.new(position.top_right314border_width 1border_color color.new(color.gray80))

    if 
    barstate.islast
        table
    .cell(dash00"Yatırım Tavsiyesi DEĞİLDİR."text_color=color.whitebgcolor=color.new(color.black20), text_size=size.normaltext_halign=text.align_center)
        
    table.merge_cells(dash0020)
        
        
    table.cell(dash01"Fiyat:"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash11str.tostring(closeformat.mintick), text_color=color.whitebgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.merge_cells(dash1121)

        
    string sig_text son_yon == "BEKLENİYOR" "YOK" son_yon " @ " str.tostring(son_sinyal_fiyatiformat.mintick)
        
    color sig_color son_yon == "AL" color.rgb(25523559) : son_yon == "SAT" color.rgb(33150243) : color.gray
        table
    .cell(dash02"Son Sinyal:"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash12sig_texttext_color=sig_colorbgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.merge_cells(dash1222)

        
    table.cell(dash03"Trend:"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash13str.tostring(mirror_anaformat.mintick), text_color=col_mirror_anabgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.merge_cells(dash1323)

        
    string evreka_tepe_str na(evreka_tepe) ? "BEKLENİYOR" str.tostring(evreka_tepeformat.mintick)
        
    table.cell(dash04"Oto Direnç:"text_color=color.fuchsiabgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash14evreka_tepe_strtext_color=color.fuchsiabgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.merge_cells(dash1424)

        
    string evreka_dip_str na(evreka_dip) ? "BEKLENİYOR" str.tostring(evreka_dipformat.mintick)
        
    table.cell(dash05"Oto Destek:"text_color=color.fuchsiabgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash15evreka_dip_strtext_color=color.fuchsiabgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.merge_cells(dash1525)

        
    table.cell(dash06"--- Aİ-HIZLI (@yörük@) ---"text_color=color.yellowbgcolor=color.new(color.black20), text_halign=text.align_center)
        
    table.merge_cells(dash0626)

        
    table.cell(dash07"1:"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash17str.tostring(s_fast_1format.mintick), text_color=color.whitebgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.cell(dash27close s_fast_1 "AL" "SAT"text_color=close s_fast_1 color.lime color.redbgcolor=color.new(color.black40), text_halign=text.align_center)

        
    table.cell(dash08"2:"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash18str.tostring(s_fast_2format.mintick), text_color=color.whitebgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.cell(dash28close s_fast_2 "AL" "SAT"text_color=close s_fast_2 color.lime color.redbgcolor=color.new(color.black40), text_halign=text.align_center)

        
    table.cell(dash09"3:"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash19str.tostring(s_fast_3format.mintick), text_color=color.whitebgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.cell(dash29close s_fast_3 "AL" "SAT"text_color=close s_fast_3 color.lime color.redbgcolor=color.new(color.black40), text_halign=text.align_center)

        
    table.cell(dash010"--- Aİ-YAVAŞ (@yörük@) ---"text_color=color.yellowbgcolor=color.new(color.black20), text_halign=text.align_center)
        
    table.merge_cells(dash010210)

        
    table.cell(dash011"4:"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash111str.tostring(s_slow_1format.mintick), text_color=color.whitebgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.cell(dash211close s_slow_1 "AL" "SAT"text_color=close s_slow_1 color.lime color.redbgcolor=color.new(color.black40), text_halign=text.align_center)

        
    table.cell(dash012"5:"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash112str.tostring(s_slow_2format.mintick), text_color=color.whitebgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.cell(dash212close s_slow_2 "AL" "SAT"text_color=close s_slow_2 color.lime color.redbgcolor=color.new(color.black40), text_halign=text.align_center)

        
    table.cell(dash013"6:"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash113str.tostring(s_slow_3format.mintick), text_color=color.whitebgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.cell(dash213close s_slow_3 "AL" "SAT"text_color=close s_slow_3 color.lime color.redbgcolor=color.new(color.black40), text_halign=text.align_center)

    var 
    table ytd_table table.new(position.bottom_center11)
    if 
    barstate.islast
        table
    .cell(ytd_table00"(Aİ) - Eğitim çalışmasıdır. Yatırım tavsiyesi KULLANILAMAZ."text_color=color.new(color.white00), 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(sarStartsarIncsarMax)

    // ┌────────────────────────────── 2. FİZİKSEL DİRENÇ: KABUK ─────────────────────────┐
    direncPeriyodu input.int(2"Kapakçık (Sınır) Periyodu")
    ustKapak ta.highest(highdirencPeriyodu)[1]
    altKapak ta.lowest(lowdirencPeriyodu)[1]

    // ┌────────────────────────────── 3. MTK-3: ÇİFTE KIRILIM ───────────────────────────┐
    ciftKirilimAtim    ta.crossover(closepsarVal) and (close ustKapak)
    ciftKirilimGevseme ta.crossunder(closepsarVal) 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(lowdirencPeriyodu 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(highdirencPeriyodu 2)[1]

    // ┌────────────────────────────── GÖRSELLEŞTİRME ────────────────────────────────────┐
    plot(psarVal"@yörük@"style=plot.style_crosscolor=close psarVal color.yellow color.bluelinewidth=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.blue30), style=plot.style_linebrlinewidth=1)
    plot(dipHedef,  "O-Dip ",  color=color.new(color.yellow30), style=plot.style_linebrlinewidth=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 == color.new(color.lime90) : mtkDongu == -color.new(color.red90) : natitle="Döngü Formu"
    16.07.2024 - 10.12.2024

  2. PHP Code:
    //@version=6
    indicator("."overlay=true)

    // ==========================================
    // 1. AYARLAR
    // ==========================================
    float ayar_genislik input.float(1.0"Atmosfer Genişliği (0.1 - 2.0)"minval=0.1maxval=2.0step=0.1)

    // ==========================================
    // 2. MOTOR BLOKLARI (PARAMETRELER)
    // ==========================================
    // --- A. YAVAŞ MOTOR (Ana Trend / Omurga) ---
    float s_slow_1 ta.sar(0.020.020.2)
    float s_slow_2 ta.sar(0.0150.0150.15)
    float s_slow_3 ta.sar(0.010.010.1)

    // --- B. HIZLI MOTOR (Scalp / Nitro) ---
    float s_fast_1 ta.sar(0.080.050.2// Hızlı Referans
    float s_fast_2 ta.sar(0.010.050.2)
    float s_fast_3 ta.sar(0.040.040.2)
    float avg_fast = (s_fast_1 s_fast_2 s_fast_3) / 3

    // ==========================================
    // 3. YAPAY ZEKA (DL) MODÜLÜ (ATMOSFER ESNEKLİĞİ)
    // ==========================================
    tanh_fn(v) => (math.exp(-v)) / (math.exp(-v))
    td_fn(s)   => nz((nz(s[1])) / nz(s[1]))

    var 
    w_c = array.from(22.4271, -26.69174.93719.0349, -10.6929, -38.288010.0500, -44.7063, -17.816330.5662, -33.995414.5017, -43.2865, -13.387424.7080, -14.392928.4830, -22.9793, -7.6582, -5.650528.8379, -26.35440.520625.0049, -17.8832, -4.8113, -4.0364, -8.3327, -1.15710.4667, -22.05333.6525, -4.39042.103020.027211.5101, -0.4150)
    n_in = array.from(tanh_fn(td_fn(open)), tanh_fn(td_fn(high)), tanh_fn(td_fn(low)), tanh_fn(td_fn(close)))

    f_calc_dl(n_arrw_arr) =>
        
    float out 0.0
        
    for 0 to 5
            float s 
    0.0
            
    for 0 to 3
                s 
    += array.get(n_arrj) * array.get(w_arr, (5) + j)
            
    out += tanh_fn(+ array.get(w_arr, (5) + 4)) * array.get(w_arr30 i)
        
    tanh_fn(out + array.get(w_arr36))
        
    float dl_val f_calc_dl(n_inw_c)
    float ai_factor = (0.2 + (math.abs(dl_val) * 0.5)) * ayar_genislik

    // ==========================================
    // 4. DİNAMİK RENKLİ ATMOSFER (ÇEKİRDEK)
    // ==========================================
    // Hızlı SAR'ların Durum Kontrolü
    bool all_fast_below = (close s_fast_1) and (close s_fast_2) and (close s_fast_3// Hepsi altta (TAM GAZ AL)
    bool all_fast_above = (close s_fast_1) and (close s_fast_2) and (close s_fast_3// Hepsi üstte (TAM GAZ SAT)

    // Atmosfer Rengi Belirleme
    color core_color all_fast_below color.new(color.green75) : 
                       
    all_fast_above color.new(color.red75) : 
                       
    color.new(color.yellow75)

    // Atmosfer Sınırları ve Çizimi
    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"Atmosfer Üst"display=display.none)
    p1_bot plot(l1_bot"Atmosfer Alt"display=display.none)
    fill(p1_topp1_botcolor=core_colortitle="Dinamik Çekirdek Atmosferi")

    // ==========================================
    // 5. KALKAN GÜCÜ (MUM BOYAMA)
    // ==========================================
    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(023011900) : color.rgb(255828200)
    else if 
    kalkan == 2
        bar_col 
    := color.blue
    else
        
    bar_col := color.fuchsia

    barcolor
    (bar_col)

    // ==========================================
    // 6. AYNA (MIRROR) HESAPLAMALARI
    // ==========================================
    f_mirror(_sar_sm) =>
        
    float _delta math.abs(close _sar)
        
    float _raw close _sar close _delta close _delta
        ta
    .hma(_raw_sm// Akıcı kıvrımlar için HMA

    // Yavaş Aynalar (Daha pürüzsüz)
    float m_slow_1 f_mirror(s_slow_114)
    float m_slow_2 f_mirror(s_slow_214)
    float m_slow_3 f_mirror(s_slow_314)

    // Hızlı Aynalar (Daha reaktif)
    float m_fast_1 f_mirror(s_fast_17)
    float m_fast_2 f_mirror(s_fast_27)
    float m_fast_3 f_mirror(s_fast_37)

    // ==========================================
    // 7. GÖRSELLEŞTİRME (SAR VE AYNA ÇİZİMLERİ)
    // ==========================================
    // YAVAŞ MOTOR VE AYNALARI
    plot(s_slow_1"4"style=plot.style_crosscolor=color.new(color.white00), linewidth=2)
    plot(s_slow_2"5"style=plot.style_crosscolor=color.new(color.white00), linewidth=2)
    plot(s_slow_3"6"style=plot.style_crosscolor=color.new(color.white00), linewidth=2)

    plot(m_slow_1"+4"color=color.new(color.white0), linewidth=1)
    plot(m_slow_2"+5"color=color.new(color.white0), linewidth=1)
    plot(m_slow_3"+6"color=color.new(color.white0), linewidth=1)

    // HIZLI MOTOR VE AYNALARI
    plot(s_fast_1"1"style=plot.style_crosscolor=color.new(color.yellow0), linewidth=2)
    plot(s_fast_2"2"style=plot.style_crosscolor=color.new(color.yellow0), linewidth=2)
    plot(s_fast_3"3"style=plot.style_crosscolor=color.new(color.yellow0), linewidth=2)

    plot(m_fast_1"+1"color=color.new(color.yellow0), linewidth=1)
    plot(m_fast_2"+2"color=color.new(color.yellow0), linewidth=1)
    plot(m_fast_3"+3"color=color.new(color.yellow0), linewidth=1)

    // İMZA
    var table ytd_table table.new(position.bottom_center11)
    if 
    barstate.islast
        table
    .cell(ytd_table00"(Aİ) eğitim çalışmasıdır. Yatırım tavsiyesi KULLANILAMAZ."text_color=color.new(color.white50), text_size=size.small)
    /////
    // ==========================================
    // 8. HAKİKİ MİZAN (1 NOLU AYNA TEPE/DİP ORTALAMASI)
    // ==========================================
    // 1 Nolu Aynanın yön değiştirdiği (kavis yaptığı) anları tespit et
    bool ayna1_dondu_asagi  m_fast_1 m_fast_1[1] and m_fast_1[1] > m_fast_1[2]
    bool ayna1_dondu_yukari m_fast_1 m_fast_1[1] and m_fast_1[1] < m_fast_1[2]

    // Tepe ve dip noktalarını hafızada tutacak değişkenler
    var float ayna1_tepe na
    var float ayna1_dip  na

    if ayna1_dondu_asagi
        ayna1_tepe 
    := m_fast_1[1// Zirveyi mühürle

    if ayna1_dondu_yukari
        ayna1_dip 
    := m_fast_1[1]  // Dibi mühürle

    // İki uç noktanın tam ortası (Hakiki Mizan)
    float hakiki_mizan = (ayna1_tepe ayna1_dip) / 2

    // Görsel Çizimler
    plot(ayna1_tepe"Ayna-1 Zirve"color=color.new(color.red80), style=plot.style_circleslinewidth=1)
    plot(ayna1_dip"Ayna-1 Dip"color=color.new(color.lime80), style=plot.style_circleslinewidth=1)
    plot(hakiki_mizan"Hakiki Mizan (Denge)"color=color.new(color.orange0), style=plot.style_linebrlinewidth=2)
    /////////////////
    // ==========================================
    // 9. TAZYİK MANTIĞI: SAR İLE MİZAN İLİŞKİSİ
    // ==========================================
    // Fiyatın Hakiki Mizan'a göre nerede olduğu
    bool ust_yari close hakiki_mizan
    bool alt_yari 
    close hakiki_mizan

    // SAR Motorunun (Hızlıların Ortalaması) Fiyatı ne yöne ittiği
    bool sar_yukari_itiyor close avg_fast // SAR altta, fiyatı yukarı itiyor
    bool sar_asagi_itiyor  close avg_fast // SAR üstte, fiyatı aşağı eziyor

    // İLİŞKİ: Merkeze mi itiyor, Merkezden mi koparıyor?
    // Eğer fiyat üstteyse ve SAR aşağı itiyorsa VEYA fiyat alttaysa ve SAR yukarı itiyorsa -> MERKEZE İTİYOR (DARALMA)
    bool merkeze_itiyor = (ust_yari and sar_asagi_itiyor) or (alt_yari and sar_yukari_itiyor)

    // Eğer fiyat üstteyse ve SAR yukarı itiyorsa VEYA fiyat alttaysa ve SAR aşağı itiyorsa -> MERKEZDEN KOPARIYOR (GENİŞLEME/TREND)
    bool merkezden_kopariyor = (ust_yari and sar_yukari_itiyor) or (alt_yari and sar_asagi_itiyor)

    // Görselleştirme (Ekranı yormamak için sadece zemin rengine hafif bir sis veriyoruz)
    color tazyik_sisi merkeze_itiyor color.new(color.orange90) : merkezden_kopariyor color.new(color.lime90) : na
    bgcolor
    (tazyik_sisititle="Tazyik Sisi (Daralma/Genişleme)")
    /////////////////
    // ========================================== 
    16.07.2024 - 10.12.2024

  3. PHP Code:
    //@version=6
    indicator(":]"overlay=truemax_lines_count=50max_labels_count=500)

    // ==========================================
    // 1. AYARLAR
    // ==========================================
    float ayar_genislik input.float(1.0"Ana Atmosfer Çarpanı"minval=0.1maxval=2.0step=0.1)

    // ==========================================
    // 2. MOTOR BLOKLARI (PARAMETRELER)
    // ==========================================
    float s_slow_1 ta.sar(0.020.020.2)
    float s_slow_2 ta.sar(0.0150.0150.15)
    float s_slow_3 ta.sar(0.010.010.1)

    float s_fast_1 ta.sar(0.080.050.2
    float s_fast_2 ta.sar(0.010.050.2)
    float s_fast_3 ta.sar(0.040.040.2)
    float avg_fast = (s_fast_1 s_fast_2 s_fast_3) / 3

    // ==========================================
    // 3. YAPAY ZEKA (DL) MODÜLÜ (ATMOSFER ESNEKLİĞİ)
    // ==========================================
    tanh_fn(v) => (math.exp(-v)) / (math.exp(-v))
    td_fn(s)   => nz((nz(s[1])) / nz(s[1]))

    var 
    w_c = array.from(22.4271, -26.69174.93719.0349, -10.6929, -38.288010.0500, -44.7063, -17.816330.5662, -33.995414.5017, -43.2865, -13.387424.7080, -14.392928.4830, -22.9793, -7.6582, -5.650528.8379, -26.35440.520625.0049, -17.8832, -4.8113, -4.0364, -8.3327, -1.15710.4667, -22.05333.6525, -4.39042.103020.027211.5101, -0.4150)
    n_in = array.from(tanh_fn(td_fn(open)), tanh_fn(td_fn(high)), tanh_fn(td_fn(low)), tanh_fn(td_fn(close)))

    f_calc_dl(n_arrw_arr) =>
        
    float out 0.0
        
    for 0 to 5
            float s 
    0.0
            
    for 0 to 3
                s 
    += array.get(n_arrj) * array.get(w_arr, (5) + j)
            
    out += tanh_fn(+ array.get(w_arr, (5) + 4)) * array.get(w_arr30 i)
        
    tanh_fn(out + array.get(w_arr36))
        
    float dl_val f_calc_dl(n_inw_c)
    // Temel AI katsayısı
    float ai_factor = (0.2 + (math.abs(dl_val) * 0.5)) * ayar_genislik

    // ==========================================
    // 4. DİNAMİK RENKLİ ATMOSFER (3 KADEMELİ NİŞANGAH)
    // ==========================================
    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

    // Ana Renk
    color base_color all_fast_below color.green all_fast_above color.maroon color.yellow

    // Sadece s_fast_1'i kullanarak temel mesafeyi (dist_base) buluyoruz
    float dist_base math.abs(close s_fast_1) * ai_factor

    // Senin Oranların: 0.5 (Vurkaç), 1.0 (Trend), 2.0 (Swing)
    float dist_vurkac dist_base 0.5
    float dist_trend  
    dist_base 1.0
    float dist_swing  
    dist_base 2.0

    // Çizgilerin Hazırlanması
    p_swing_top  plot(close dist_swingdisplay=display.none)
    p_swing_bot  plot(close dist_swingdisplay=display.none)

    p_trend_top  plot(close dist_trenddisplay=display.none)
    p_trend_bot  plot(close dist_trenddisplay=display.none)

    p_vurkac_top plot(close dist_vurkacdisplay=display.none)
    p_vurkac_bot plot(close dist_vurkacdisplay=display.none)

    // En dıştan (şeffaf) en içe (koyu) doğru boyama yapıyoruz ki renkler ezilmesin
    fill(p_swing_top,  p_swing_bot,  color=color.new(base_color75), title="Swing Alanı (2.0x)")
    fill(p_trend_top,  p_trend_bot,  color=color.new(base_color55), title="Trend Alanı (1.0x)")
    fill(p_vurkac_topp_vurkac_botcolor=color.new(base_color35), title="Vurkaç Alanı (0.5x)")

    // ==========================================
    // 5. KALKAN GÜCÜ (MUM BOYAMA)
    // ==========================================
    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(023011900) : color.rgb(255828200)
    else if 
    kalkan == 2
        bar_col 
    := color.blue
    else
        
    bar_col := color.fuchsia

    barcolor
    (bar_col)

    // ==========================================
    // 6. ÇOKLU MİZAN (DENGE) AĞI (7 - 14 - 21 - 55 - 100)
    // ==========================================
    f_hakiki_mizan(_sar_sm) =>
        
    float _delta math.abs(close _sar)
        
    float _raw close _sar close _delta close _delta
        float _mirror 
    ta.hma(_raw_sm)
        
        
    bool _dondu_asagi  _mirror _mirror[1] and _mirror[1] > _mirror[2]
        
    bool _dondu_yukari _mirror _mirror[1] and _mirror[1] < _mirror[2]
        
        var 
    float _tepe na
        
    var float _dip  na
        
        
    if _dondu_asagi
            _tepe 
    := _mirror[1]
        if 
    _dondu_yukari
            _dip 
    := _mirror[1]
            
        (
    _tepe _dip) / 2

    float mizan_7   
    f_hakiki_mizan(s_fast_13)
    float mizan_14  f_hakiki_mizan(s_fast_17)
    float mizan_21  f_hakiki_mizan(s_fast_121)
    float mizan_55  f_hakiki_mizan(s_fast_155)
    float mizan_100 f_hakiki_mizan(s_fast_1100)

    plot(mizan_7,   "1",   color=color.new(color.white0),   linewidth=1)
    plot(mizan_14,  "2",  color=color.new(color.aqua100),    linewidth=1)
    plot(mizan_21,  "3",  color=color.new(color.yellow100),   linewidth=1)
    plot(mizan_55,  "4",  color=color.new(color.orange100),   linewidth=1)
    plot(mizan_100"5"color=color.new(color.fuchsia0),  linewidth=1)

    // İMZA
    var table ytd_table table.new(position.bottom_center11)
    if 
    barstate.islast
        table
    .cell(ytd_table00"(Aİ) eğitim çalışmasıdır. Yatırım tavsiyesi KULLANILAMAZ."text_color=color.new(color.white00), text_size=size.normal
    16.07.2024 - 10.12.2024

  4. PHP Code:
    //@version=6
    indicator(":)"overlay=true)

    // ==========================================
    // 1. MOTOR BLOKLARI (PARAMETRELER)
    // ==========================================

    // --- A. YAVAŞ MOTOR (Ana Trend / Omurga) ---
    // Daha ağır, daha sağlam, gürültüden etkilenmez.
    s_slow_1 ta.sar(0.020.020.2)
    s_slow_2 ta.sar(0.0150.0150.15)
    s_slow_3 ta.sar(0.010.010.1)

    // --- B. HIZLI MOTOR (Scalp / Nitro) ---
    // Çok agresif, fiyata yapışık, anlık tepki verir.
    s_fast_1 ta.sar(0.080.050.2)
    s_fast_2 ta.sar(0.010.050.2)
    s_fast_3 ta.sar(0.040.040.2)


    // ==========================================
    // 2. GÖRSELLEŞTİRME (ÇİZİMLER)
    // ==========================================

    // YAVAŞ SARLAR (Artı İşareti - Destek Gibi)
    // Renkler: Soğuk tonlar (Mavi/Mor) - Güveni temsil eder.
    plot(s_slow_1"Yavaş 1"style=plot.style_linecolor=color.yellowlinewidth=1)
    plot(s_slow_2"Yavaş 2"style=plot.style_linecolor=color.bluelinewidth=1)
    plot(s_slow_3"Yavaş 3"style=plot.style_linecolor=color.redlinewidth=1)

    // HIZLI SARLAR (Daire - Momentum Gibi)
    // Renkler: Sıcak tonlar (Sarı/Turuncu) - Hızı temsil eder.
    plot(s_fast_1"Hızlı 1"style=plot.style_crosscolor=color.yellowlinewidth=1)
    plot(s_fast_2"Hızlı 2"style=plot.style_crosscolor=color.bluelinewidth=1)
    plot(s_fast_3"Hızlı 3"style=plot.style_crosscolor=color.redlinewidth=1)

    // ==========================================

    // ==========================================
    // 1. AYARLAR
    // ==========================================
    float ayar_genislik input.float(0.5"Atmosfer Genişliği (0.1 - 2.0)"minval=0.1maxval=2.0step=0.1)

    // ==========================================
    // 2. ÇEKİRDEK HESAPLAMA
    // ==========================================
    s1 ta.sar(0.080.050.2// Hızlı SAR (Sarı Referansı)
    s2 ta.sar(0.010.050.2)
    s3 ta.sar(0.040.040.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_len0)

    // Ayna hesaplamaları (Arka planda mantık için gerekli)
    m1 f_mirror(s11)
    m2 f_mirror(s22)
    m3 f_mirror(s33)
    avg_mir = (m1 m2 m3) / 3

    // ==========================================
    // 3. YAPAY ZEKA (DL) MODÜLÜ
    // ==========================================
    tanh(v) => (math.exp(-v)) / (math.exp(-v))
    td(s)   => nz((nz(s[1])) / nz(s[1]))

    var 
    w_c = array.from(22.4271, -26.69174.93719.0349, -10.6929, -38.288010.0500, -44.7063, -17.816330.5662, -33.995414.5017, -43.2865, -13.387424.7080, -14.392928.4830, -22.9793, -7.6582, -5.650528.8379, -26.35440.520625.0049, -17.8832, -4.8113, -4.0364, -8.3327, -1.15710.4667, -22.05333.6525, -4.39042.103020.027211.5101, -0.4150)
    n_in = array.from(tanh(td(open)), tanh(td(high)), tanh(td(low)), tanh(td(close)))

    f_calc_dl(n_arrw_arr) =>
        
    float out 0.0
        
    for 0 to 5
            float s 
    0.0
            
    for 0 to 3
                s 
    += array.get(n_arrj) * array.get(w_arr, (5) + j)
            
    out += tanh(+ array.get(w_arr, (5) + 4)) * array.get(w_arr30 i)
        
    tanh(out + array.get(w_arr36))
        
    float dl_val f_calc_dl(n_inw_c)

    // ==========================================
    // 4. ATMOSFER (SADECE SARI)
    // ==========================================
    float ai_factor = (0.2 + (math.abs(dl_val) * 0.5)) * ayar_genislik

    // Sadece Katman 1 (Sarı) Hesaplaması
    float dist_1 math.abs(close s1) * ai_factor
    float l1_top 
    close dist_1
    float l1_bot 
    close dist_1

    // Çizim (Pürüzsüz Sarı Dolgu)
    p1_top plot(l1_top"Atmosfer Üst"display=display.none)
    p1_bot plot(l1_bot"Atmosfer Alt"display=display.none)
    fill(p1_topp1_botcolor=color.new(color.yellow60), title="Sarı Çekirdek")

    // ==========================================
    // 5. KALKAN GÜCÜ (MUM BOYAMA)
    // ==========================================
    int kalkan 0
    if close s1 
        kalkan 
    += 1
    if close s2 
        kalkan 
    += 1
    if close s3 
        kalkan 
    += 1

    if close s1 and close avg_sar
        kalkan 
    += 1
    if close s2 and close avg_sar
        kalkan 
    += 1
    if close s3 and close avg_sar
        kalkan 
    += 1

    color bar_col 
    na
    if kalkan >= 3
        bar_col 
    := close avg_sar color.rgb(0230119100) : color.rgb(2558282100)
    else if 
    kalkan == 2
        bar_col 
    := color.blue
    else
        
    bar_col := color.fuchsia

    barcolor
    (bar_col)
    //////////////////// 
    16.07.2024 - 10.12.2024

  5. PHP Code:
    //@version=6
    indicator(":]"overlay=truemax_lines_count=50max_labels_count=500)

    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 1. AYARLAR VE DL ATMOSFER GÜCÜ                                               │
    // └──────────────────────────────────────────────────────────────────────────────┘
    float ayar_genislik input.float(0.3"Genişlik (0.1 - 2.0)"minval=0.1maxval=2.0step=0.1)

    // Çitanın Kalbi (Merkez Motor - Tazyik Barajları)
    float s_fast_1 ta.sar(0.010.010.2
    float s_fast_12 ta.sar(0.080.050.2

    // Sinir Ağlarından Gelen Gerilme Gücü (DL Modülü)
    tanh_fn(v) => (math.exp(-v)) / (math.exp(-v))
    td_fn(s)   => nz((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

    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 2. MTK-3 İÇ VE DIŞ KALKANLAR (ÇİTANIN MENZİLİ)                               │
    // └──────────────────────────────────────────────────────────────────────────────┘
    // Barajın gerisine sabitlenen baz mesafe (Nefes Payı)
    float baz_mesafe math.abs(close s_fast_1) * ai_factor
    float merkez 
    s_fast_1 

    // Hızlı Barajın gerisine sabitlenen baz mesafe (Hızlı Nefes Payı)
    float baz_mesafe12 math.abs(close s_fast_12) * ai_factor
    float merkez12 
    s_fast_12 

    // İç Kalkan (0.3) - Sapanın Gerilmesi / Tetiğe Basış Hududu
    float ic_ust merkez + (baz_mesafe 0.3)
    float ic_alt merkez - (baz_mesafe 0.3)

    // Dış Kalkan (1.0) - Maksimum Menzil / Tahliye Sınırı
    float dis_ust merkez + (baz_mesafe 1.0)
    float dis_alt merkez - (baz_mesafe 1.0)

    // EVREKA İÇİN GEREKLİ L1_TOP VE L1_BOT
    float dist_1 math.abs(close s_fast_1) * ai_factor
    float l1_top 
    close dist_1
    float l1_bot 
    close dist_1

    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 3. GÖRSEL ŞAHİTLİK (KALKANLAR VE ÇEKİRDEK)                                   │
    // └──────────────────────────────────────────────────────────────────────────────┘
    // Merkez Motorlar
    plot(merkez"Yavaş"color=color.new(color.white00), style=plot.style_crosslinewidth=2)
    plot(merkez12"Hızlı"color=color.new(color.blue00), style=plot.style_crosslinewidth=2)

    // İç Kalkan (Giriş Sınırları - GÖRÜNMEZ, Sadece Tetiği Okur)
    //plot(ic_ust, "Kan-1", color=color.new(color.fuchsia, 100), linewidth=1)
    //plot(ic_alt, "Kan-2", color=color.new(color.fuchsia, 100), linewidth=1)

    p1_top plot(l1_top"Üst"display=display.none)
    p1_bot plot(l1_bot"Alt"display=display.none)

    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 4. MİZAN (DENGE) HATTI VE VİTES HESAPLAMASI (GECİKMESİZ VE GÖRSEL)           │
    // └──────────────────────────────────────────────────────────────────────────────┘
    // SAR'ın yön değiştirdiği "olay" anlarını mühürlüyoruz
    var int sar_yon 0
    sar_yon 
    := close s_fast_1 close s_fast_1 ? -nz(sar_yon[1])
    bool sar_dondu sar_yon != nz(sar_yon[1])

    var 
    float sar_eski_vurus na
    var float sar_son_vurus  na

    if sar_dondu
        sar_eski_vurus 
    := nz(sar_son_vuruss_fast_1
        
    sar_son_vurus  := s_fast_1                    

    // Vadinin Dibi (Mizan Çizgisi)
    float mizan_hatti = (sar_eski_vurus sar_son_vurus) / 2

    // MİZAN VİTESİ (1-2-3) FİZİK MOTORU
    float mizan_uzaklik math.abs(close mizan_hatti)
    int mizan_vitesi mizan_uzaklik < (baz_mesafe 0.3) ? mizan_uzaklik > (baz_mesafe 1.0) ? 2

    // --- ÇİZGİYİ VERİ DAMARINA (1-2-3) DÖNÜŞTÜRME ---
    plot(mizan_hatti"Denge"color=color.new(color.orange100), style=plot.style_linebrlinewidth=2)
    plotchar(mizan_vitesi == mizan_hatti na"Çekim 1"char="1"location=location.absolutecolor=color.new(color.red0), size=size.tiny)
    plotchar(mizan_vitesi == mizan_hatti na"Çekim 2"char="2"location=location.absolutecolor=color.new(color.yellow0), size=size.tiny)
    plotchar(mizan_vitesi == mizan_hatti na"Çekim 3"char="3"location=location.absolutecolor=color.new(color.lime0), size=size.tiny)

    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 5. SCALPING VUR-KAÇ MANTIĞI (MİZAN FİLTRELİ TETİK)                           │
    // └──────────────────────────────────────────────────────────────────────────────┘
    bool scalping_AL_Gir  ta.crossover(closeic_ust) and (close mizan_hatti)
    bool scalping_SAT_Gir ta.crossunder(closeic_alt) and (close mizan_hatti)

    bool scalping_AL_Cik  high >= dis_ust
    bool scalping_SAT_Cik 
    low <= dis_alt

    // ┌────────────────────────────── 6. İÇSEL TAZYİK VE MTK-3 KIRILIM ──────────────┐
    float sarStart input.float(0.02"Basınç Başlangıcı")
    float sarInc   input.float(0.02"Basınç İvmesi")
    float sarMax   input.float(0.2"Maksimum Tazyik")
    float psarVal  ta.sar(sarStartsarIncsarMax)

    int direncPeriyodu input.int(2"Kapakçık (Sınır) Periyodu")
    float ustKapak ta.highest(highdirencPeriyodu)[1// REPAINT ENGELİ
    float altKapak ta.lowest(lowdirencPeriyodu)[1]   // REPAINT ENGELİ

    bool ciftKirilimAtim    ta.crossover(closepsarVal) and (close ustKapak)
    bool ciftKirilimGevseme ta.crossunder(closepsarVal) and (close altKapak)

    plot(psarVal"@yörük@"style=plot.style_crosscolor=close psarVal color.yellow color.redlinewidth=2)


    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 7. ANA OMURGA MOTORU VE BAR BOYANMASI (HMA 55/20)                            │
    // └──────────────────────────────────────────────────────────────────────────────┘
    float s_start_sabit 0.02
    float s_inc_sabit   
    0.02
    float s_max_sabit   
    0.2
    int s_smooth_sabit  
    32

    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_sabits_inc_sabits_max_sabits_smooth_sabit)

    float s_slow_1 ta.sar(0.020.020.2)
    float s_slow_2 ta.sar(0.0150.0150.15)
    float s_slow_3 ta.sar(0.010.010.1)

    float s_fast_2 ta.sar(0.010.050.2)
    float s_fast_3 ta.sar(0.040.040.2)
    float avg_fast = (s_fast_1 s_fast_2 s_fast_3) / 3

    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

    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(023011900) : color.rgb(255828200)
    else if 
    kalkan == 2
        bar_col 
    := color.rgb(33624900)
    else
        
    bar_col := color.rgb(2236425100)

    barcolor(bar_col)

    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 
    var string son_yon "BEKLENİYOR"
    var float son_sinyal_fiyati na

    if barstate.isconfirmed // REPAINT ENGELİ
        
    if (col_mirror_ana == color.yellow) and sinyal_durumu != 1
            sinyal_durumu 
    := 1
            son_yon 
    := "AL"
            
    son_sinyal_fiyati := close
        
    if (col_mirror_ana == color.blue) and sinyal_durumu != -1
            sinyal_durumu 
    := -1
            son_yon 
    := "SAT"
            
    son_sinyal_fiyati := close

    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 8. ÇİFT YÖNLÜ EVREKA MANTIĞI VE OTO DESTEK/DİRENÇ (SIFIR BEKLEME KİLİDİ)     │
    // └──────────────────────────────────────────────────────────────────────────────┘
    // Boşluk (na) ataması kaldırıldı. Değerler 0'dan başlıyor.
    var float evreka_tepe close
    var float evreka_dip  close

    // Tavanı yukarı zorla
    if all_fast_below
        evreka_tepe 
    := math.max(evreka_tepel1_top)
    // Zemini aşağı zorla
    if all_fast_above
        evreka_dip 
    := math.min(evreka_dipl1_bot)

    // Trend döndüğünde hafızayı SİLMEK yerine, YENİ anlık sınıra kilitler (Bekleme iptal edildi)
    if ta.crossunder(closes_slow_1)
        
    evreka_tepe := l1_top
        
    if ta.crossover(closes_slow_1)
        
    evreka_dip := l1_bot

    plot
    (mirror_ana"0"color=col_mirror_analinewidth=2style=plot.style_stepline)
    plot(evreka_tepe"+1"color=color.new(color.teal100), style=plot.style_linebrlinewidth=2)
    plot(evreka_dip"-1"color=color.new(color.maroon100), style=plot.style_linebrlinewidth=2)

    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 9. KOMUTA MERKEZİ (DASHBOARD)                                                │
    // └──────────────────────────────────────────────────────────────────────────────┘
    var table dash table.new(position.top_right315border_width 1border_color color.new(color.gray80))

    if 
    barstate.islast
        table
    .cell(dash00"Yatırım Tavsiyesi DEĞİLDİR."text_color=color.whitebgcolor=color.new(color.black20), text_size=size.normaltext_halign=text.align_center)
        
    table.merge_cells(dash0020)
        
        
    string vites_txt mizan_vitesi == "1" mizan_vitesi == "2" "3"
        
    color vites_col  mizan_vitesi == color.red mizan_vitesi == color.yellow color.lime
        table
    .cell(dash01"Denge İvmesi:"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash11vites_txttext_color=vites_colbgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.merge_cells(dash1121)

        
    table.cell(dash02"Fiyat:"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash12str.tostring(closeformat.mintick), text_color=color.whitebgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.merge_cells(dash1222)

        
    string sig_text son_yon == "BEKLENİYOR" "YOK" son_yon " @ " str.tostring(son_sinyal_fiyatiformat.mintick)
        
    color sig_color son_yon == "AL" color.rgb(25523559) : son_yon == "SAT" color.rgb(33150243) : color.gray
        table
    .cell(dash03"Son Sinyal:"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash13sig_texttext_color=sig_colorbgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.merge_cells(dash1323)

        
    table.cell(dash04"Trend:"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash14str.tostring(mirror_anaformat.mintick), text_color=col_mirror_anabgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.merge_cells(dash1424)

        
    // BEKLEME YALANI KALDIRILDI - DOĞRUDAN DEĞERİ BASIYOR
        
    table.cell(dash05"Oto Direnç (+1):"text_color=color.fuchsiabgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash15str.tostring(evreka_tepeformat.mintick), text_color=color.fuchsiabgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.merge_cells(dash1525)

        
    table.cell(dash06"Oto Destek (-1):"text_color=color.fuchsiabgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash16str.tostring(evreka_dipformat.mintick), text_color=color.fuchsiabgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.merge_cells(dash1626)

        
    table.cell(dash07"--- Aİ-HIZLI (@yörük@) ---"text_color=color.yellowbgcolor=color.new(color.black20), text_halign=text.align_center)
        
    table.merge_cells(dash0727)

        
    table.cell(dash08"1:"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash18str.tostring(s_fast_1format.mintick), text_color=color.whitebgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.cell(dash28close s_fast_1 "AL" "SAT"text_color=close s_fast_1 color.lime color.redbgcolor=color.new(color.black40), text_halign=text.align_center)

        
    table.cell(dash09"2:"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash19str.tostring(s_fast_2format.mintick), text_color=color.whitebgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.cell(dash29close s_fast_2 "AL" "SAT"text_color=close s_fast_2 color.lime color.redbgcolor=color.new(color.black40), text_halign=text.align_center)

        
    table.cell(dash010"3:"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash110str.tostring(s_fast_3format.mintick), text_color=color.whitebgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.cell(dash210close s_fast_3 "AL" "SAT"text_color=close s_fast_3 color.lime color.redbgcolor=color.new(color.black40), text_halign=text.align_center)

        
    table.cell(dash011"--- Aİ-YAVAŞ (@yörük@) ---"text_color=color.yellowbgcolor=color.new(color.black20), text_halign=text.align_center)
        
    table.merge_cells(dash011211)

        
    table.cell(dash012"4:"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash112str.tostring(s_slow_1format.mintick), text_color=color.whitebgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.cell(dash212close s_slow_1 "AL" "SAT"text_color=close s_slow_1 color.lime color.redbgcolor=color.new(color.black40), text_halign=text.align_center)

        
    table.cell(dash013"5:"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash113str.tostring(s_slow_2format.mintick), text_color=color.whitebgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.cell(dash213close s_slow_2 "AL" "SAT"text_color=close s_slow_2 color.lime color.redbgcolor=color.new(color.black40), text_halign=text.align_center)

        
    table.cell(dash014"6:"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash114str.tostring(s_slow_3format.mintick), text_color=color.whitebgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.cell(dash214close s_slow_3 "AL" "SAT"text_color=close s_slow_3 color.lime color.redbgcolor=color.new(color.black40), text_halign=text.align_center)

    var 
    table ytd_table table.new(position.bottom_center11)
    if 
    barstate.islast
        table
    .cell(ytd_table00"(Aİ) - Eğitim çalışmasıdır. Yatırım tavsiyesi KULLANILAMAZ."text_color=color.new(color.white00), text_size=size.normal
    16.07.2024 - 10.12.2024

  6. PHP Code:
    //@version=6
    strategy(":] Fraktal + Çift Ayna Kırılımı"overlay=trueinitial_capital=1000default_qty_type=strategy.percent_of_equitydefault_qty_value=100commission_type=strategy.commission.percentcommission_value=0.04max_lines_count=50max_labels_count=500)

    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 1. AYARLAR VE DL ATMOSFER GÜCÜ                                               │
    // └──────────────────────────────────────────────────────────────────────────────┘
    float ayar_genislik input.float(0.3"Genişlik (0.1 - 2.0)"minval=0.1maxval=2.0step=0.1)

    float s_fast_1 ta.sar(0.010.010.2
    float s_fast_12 ta.sar(0.080.050.2

    tanh_fn(v) => (math.exp(-v)) / (math.exp(-v))
    td_fn(s)   => nz((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

    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 2. GÖRSEL ŞAHİTLİK VE ÇEKİRDEK                                               │
    // └──────────────────────────────────────────────────────────────────────────────┘
    float merkez s_fast_1 
    float merkez12 
    s_fast_12 

    plot
    (merkez"Yavaş SAR"color=color.new(color.white00), style=plot.style_crosslinewidth=2)
    plot(merkez12"Hızlı SAR"color=color.new(color.blue00), style=plot.style_crosslinewidth=2)

    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 3. ÇİFT AYNALI OMURGA MOTORU (12 ve 32)                                      │
    // └──────────────────────────────────────────────────────────────────────────────┘
    float s_start_sabit 0.02
    float s_inc_sabit   
    0.02
    float s_max_sabit   
    0.2

    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)

    // GÜNEŞ (32) VE AY (12) YÖRÜNGELERİ
    float ayna_12 f_katman_ana(s_start_sabits_inc_sabits_max_sabit12)
    float ayna_32 f_katman_ana(s_start_sabits_inc_sabits_max_sabit32)

    bool makro_al_12 ayna_12 close
    color col_ayna_12 
    makro_al_12 ? (ayna_12 ayna_12[1] ? color.blue color.lime) : (ayna_12 ayna_12[1] ? color.yellow color.red)

    bool makro_al_32 ayna_32 close
    color col_ayna_32 
    makro_al_32 ? (ayna_32 ayna_32[1] ? color.blue color.lime) : (ayna_32 ayna_32[1] ? color.yellow color.red)

    bool is_sari_12 col_ayna_12 == color.yellow
    bool is_mavi_12 
    col_ayna_12 == color.blue
    bool is_sari_32 
    col_ayna_32 == color.yellow
    bool is_mavi_32 
    col_ayna_32 == color.blue

    bool ikisi_sari 
    is_sari_12 and is_sari_32
    bool ikisi_mavi 
    is_mavi_12 and is_mavi_32

    plot
    (ayna_12"Ayna 12"color=col_ayna_12linewidth=2style=plot.style_stepline)
    plot(ayna_32"Ayna 32"color=col_ayna_32linewidth=3style=plot.style_stepline)

    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 4. DOĞAL FRAKTALLAR (KAYALAR) VE PSAR TAZYİK KIRILIMI                        │
    // └──────────────────────────────────────────────────────────────────────────────┘
    float sarStart input.float(0.02"Basınç Başlangıcı")
    float sarInc   input.float(0.02"Basınç İvmesi")
    float sarMax   input.float(0.2"Maksimum Tazyik")
    float psarVal  ta.sar(sarStartsarIncsarMax)

    // 5 Mumluk Kusursuz Fraktal Geometrisi (Doğanın Kendini Tekrarı)
    bool is_frac_up high[4] < high[2] and high[3] < high[2] and high[1] < high[2] and high[0] < high[2]
    bool is_frac_dn low[4] > low[2]  and low[3] > low[2]  and low[1] > low[2]  and low[0] > low[2]

    var 
    float fraktal_direnc na
    var float fraktal_destek na

    if is_frac_up
        fraktal_direnc 
    := high[2]
    if 
    is_frac_dn
        fraktal_destek 
    := low[2]

    // Fraktal sınırlarının ekrana çizimi (Kayanın izi)
    plot(fraktal_direnc"Fraktal Direnç"color=color.new(color.red50), style=plot.style_circleslinewidth=1)
    plot(fraktal_destek"Fraktal Destek"color=color.new(color.lime50), style=plot.style_circleslinewidth=1)

    plot(psarVal"@yörük@"style=plot.style_crosscolor=close psarVal color.yellow color.redlinewidth=2)

    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 5. OTOMATİK BOT EMİRLERİ (FRAKTAL VE ÇİFT AYNA)                              │
    // └──────────────────────────────────────────────────────────────────────────────┘
    // NEHRİN YÖNÜ: Çift Ayna (12 ve 32) aynı hizadaysa (Sarı veya Mavi) akıntı bellidir.
    bool akinti_yukari ayna_12 ayna_32 and ikisi_sari
    bool akinti_asagi  
    ayna_12 ayna_32 and ikisi_mavi

    // KIRILIM (TAŞMA): Akıntı yönünde PSAR arkadan iterken, fiyatın Fraktal kayasını parçalaması
    bool fraktal_AL_Kirildi  ta.crossover(closefraktal_direnc) and (close psarVal)
    bool fraktal_SAT_Kirildi ta.crossunder(closefraktal_destek) and (close psarVal)

    // ŞAHİN TETİĞİ
    if akinti_yukari and fraktal_AL_Kirildi
        strategy
    .entry("AL_Fraktal"strategy.long)

    if 
    akinti_asagi and fraktal_SAT_Kirildi
        strategy
    .entry("SAT_Fraktal"strategy.short)

    // ÇIKIŞ: Akıntının yönü değiştiğinde (12 ve 32 kesişimi tersine döndüğünde) çık.
    if strategy.position_size and ta.crossunder(ayna_12ayna_32)
        
    strategy.close("AL_Fraktal"comment="Akıntı_Döndü")

    if 
    strategy.position_size and ta.crossover(ayna_12ayna_32)
        
    strategy.close("SAT_Fraktal"comment="Akıntı_Döndü"
    16.07.2024 - 10.12.2024

  7. PHP Code:
    //@version=6
    indicator(":] Vitesli Tripwire Radarı"overlay=truemax_lines_count=50max_labels_count=500)

    // ==========================================
    // 1. 5 KADEMELİ EXTENDED SAR MOTORU
    // ==========================================
    sarext(simple float _ssimple float _osimple float _aisimple float _asimple float _amsimple float _aissimple float _assimple float _ams) =>
        var 
    bool is_long true
        
    var float sar na, var float ep na, var float af _ai, var float res na
        
    if bar_index == 0
            res 
    := na
        
    else if bar_index == 1
            is_long 
    := (high high[1]) > (low[1] - low)
            
    sar := is_long low[1] : high[1]
            
    ep := is_long high low
            af 
    := is_long _ai _ais
            res 
    := is_long sar : -sar
        
    else
            
    float n_sar sar af * (ep sar)
            if 
    is_long
                n_sar 
    := math.min(n_sarlow[1], low[2])
                if 
    low n_sar
                    is_long 
    := falsen_sar := epep := lowaf := _ais
                
    else if high ep
                    ep 
    := highaf := math.min(af _a_am)
            else
                
    n_sar := math.max(n_sarhigh[1], high[2])
                if 
    high n_sar
                    is_long 
    := truen_sar := epep := highaf := _ai
                
    else if low ep
                    ep 
    := lowaf := math.min(af _as_ams)
            
    sar := n_sarres := is_long n_sar : -n_sar
        res

    // Motorlar (H1, H2, DE)
    s_h1 sarext(0,00.200.200.200.200.200.20)
    s_h2 sarext(0,00.050.050.200.050.050.20)
    s_de sarext(0,00.020.020.200.020.020.20)

    // Hafıza (Hata Payı Olmadan)
    var float p_h1 na, var float n_h1 na
    var float p_h2 na, var float n_h2 na
    var float p_de na, var float n_de na

    p_h1 
    := s_h1 math.abs(s_h1) : p_h1n_h1 := s_h1 math.abs(s_h1) : n_h1
    p_h2 
    := s_h2 math.abs(s_h2) : p_h2n_h2 := s_h2 math.abs(s_h2) : n_h2
    p_de 
    := s_de math.abs(s_de) : p_den_de := s_de math.abs(s_de) : n_de

    // ==========================================
    // 2. VİTES VE TAZYİK HESABI (YENİ)
    // ==========================================
    // Boğa Vitesleri: Fiyatın Tripwire tellerinin üzerinde olma sayısı
    int vites_boga = (close p_h1 0) + (close n_h1 0) + (close p_h2 0) + (close n_h2 0) + (close p_de 0) + (close n_de 0)
    // Ayı Vitesleri: Fiyatın Tripwire tellerinin altında olma sayısı
    int vites_ayi  = (close p_h1 0) + (close n_h1 0) + (close p_h2 0) + (close n_h2 0) + (close p_de 0) + (close n_de 0)

    int aktif_vites math.max(vites_bogavites_ayi)
    color vites_rengi aktif_vites <= color.red aktif_vites <= color.orange color.lime

    // ==========================================
    // 3. ÇİZİMLER VE DASHBOARD
    // ==========================================
    plot(s_de math.abs(s_de) : na"Denge (+)"color.lime2plot.style_linebr)
    plot(s_de math.abs(s_de) : na"Denge (-)"color.red2plot.style_linebr)

    // Vites Okları (Sinyal Değil, İvme Göstergesi)
    plotshape(vites_boga vites_ayi"Boğa İvme"shape.arrowuplocation.belowbarvites_rengisize=size.small)
    plotshape(vites_ayi vites_boga"Ayı İvme"shape.arrowdownlocation.abovebarvites_rengisize=size.small)

    var 
    table dash table.new(position.top_right310border_width 1)
    if 
    barstate.islast
        table
    .cell(dash00"Vites Radarı"text_color=color.whitebgcolor=color.black)
        
    table.merge_cells(dash0020)
        
        
    table.cell(dash01"Aktif Vites:"bgcolor=color.new(color.black40))
        
    table.cell(dash11str.tostring(aktif_vites) + " / 6"text_color=color.blackbgcolor=vites_rengi)
        
    table.merge_cells(dash1121)

        
    table.cell(dash02"Tazyik Oranı:"bgcolor=color.new(color.black40))
        
    table.cell(dash12str.tostring((aktif_vites 6.0) * 100"#.##") + "%"text_color=vites_rengibgcolor=color.new(color.black40))
        
    table.merge_cells(dash1222
    16.07.2024 - 10.12.2024

  8. PHP Code:
    //@version=6
    indicator(":)"overlay=truemax_lines_count=50max_labels_count=50)

    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 1. AYARLAR VE DL ATMOSFER GÜCÜ                                               │
    // └──────────────────────────────────────────────────────────────────────────────┘
    float ayar_genislik input.float(1.0"Atmosfer Çarpanı"minval=0.1maxval=3.0step=0.1)

    // Çitanın Kalbi (Merkez Motor)
    float s_fast_1 ta.sar(0.010.010.2
    float s_fast_12 ta.sar(0.080.050.2

    tanh_fn(v) => (math.exp(-v)) / (math.exp(-v))
    td_fn(s)   => nz((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

    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 2. MTK-3 İÇ VE DIŞ KALKANLAR (ÇİTANIN MENZİLİ)                               │
    // └──────────────────────────────────────────────────────────────────────────────┘
    // Fiyata değil, MERKEZE (s_fast_1) sabitlenen baz mesafe!
    float baz_mesafe math.abs(close s_fast_1) * ai_factor
    float merkez 
    s_fast_1 

    // Fiyata değil, MERKEZE (s_fast_1) sabitlenen baz mesafe!
    float baz_mesafe12 math.abs(close s_fast_12) * ai_factor
    float merkez12 
    s_fast_12 

    // İç Kalkan (0.5) - Sapanın Gerilmesi / Tetiğe Basış
    float ic_ust merkez + (baz_mesafe 0.3)
    float ic_alt merkez - (baz_mesafe 0.3)

    // Dış Kalkan (1.5) - Maksimum Menzil / Tahliye Sınırı
    float dis_ust merkez + (baz_mesafe 1.0)
    float dis_alt merkez - (baz_mesafe 1.0)

    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 3. SCALPING VUR-KAÇ MANTIĞI                                                  │
    // └──────────────────────────────────────────────────────────────────────────────┘
    // İç kalkan yırtıldığı an (Çifte Kırılım) GİRİŞ yapılır.
    bool scalping_AL_Gir  ta.crossover(closeic_ust)
    bool scalping_SAT_Gir ta.crossunder(closeic_alt)

    // Fiyat 1.5'luk dış duvara çarptığı an (Hudut) KÂR ALINIR ve ÇIKILIR.
    bool scalping_AL_Cik  high >= dis_ust
    bool scalping_SAT_Cik 
    low <= dis_alt

    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 4. GÖRSEL ŞAHİTLİK                                                           │
    // └──────────────────────────────────────────────────────────────────────────────┘
    // Merkez Motor
    plot(merkez"Yavaş"color=color.new(color.white00), style=plot.style_crosslinewidth=2)
    plot(merkez12"Hızlı"color=color.new(color.red00), style=plot.style_crosslinewidth=2)

    // İç Kalkan (Giriş Sınırları)
    plot(ic_ust"GİR-1"color=color.new(color.lime00), linewidth=1display=display.none)
    plot(ic_alt"GİR-2"color=color.new(color.red00), linewidth=1display=display.none)

    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ X. MİZAN (DENGE) HATTI HESAPLAMASI (GECİKMESİZ)                              │
    // └──────────────────────────────────────────────────────────────────────────────┘
    // SAR'ın yön değiştirdiği "olay" anlarını mühürlüyoruz
    var int sar_yon 0
    sar_yon 
    := close s_fast_1 close s_fast_1 ? -nz(sar_yon[1])
    bool sar_dondu sar_yon != nz(sar_yon[1])

    var 
    float sar_eski_vurus na
    var float sar_son_vurus  na

    if sar_dondu
        sar_eski_vurus 
    := nz(sar_son_vuruss_fast_1
        
    sar_son_vurus  := s_fast_1                    

    // Vadinin Dibi (Mizan Çizgisi)
    float mizan_hatti = (sar_eski_vurus sar_son_vurus) / 2

    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 3. SCALPING VUR-KAÇ MANTIĞI (MİZAN FİLTRELİ TETİK)                           │
    // └──────────────────────────────────────────────────────────────────────────────┘
    // SİNYALİN FAYDASI BURADA: Tetik düşmesi için fiyatın Mizan'ın DOĞRU tarafında olması ŞARTTIR.
    bool scalping_AL_Gir1  ta.crossover(closeic_ust) and (close mizan_hatti// Akıntı yukarıysa AL
    bool scalping_SAT_Gir1 ta.crossunder(closeic_alt) and (close mizan_hatti// Akıntı aşağıysa SAT

    // Kâr Alma (Çıkış) hudutları değişmez.
    bool scalping_AL_Cik1  high >= dis_ust
    bool scalping_SAT_Cik1 
    low <= dis_alt

    // Mizan Hattını Çiz
    plot(mizan_hatti"(Denge)"color=color.new(color.orange0), style=plot.style_linebrlinewidth=1)
    // ┌──────────────────────────────────────────────────────────────────────────────┐

    // ┌────────────────────────────── 1. İÇSEL TAZYİK: PSAR ─────────────────────────────┐
    sarStart input.float(0.02"Basınç Başlangıcı")
    sarInc   input.float(0.02"Basınç İvmesi")
    sarMax   input.float(0.2"Maksimum Tazyik")
    psarVal  ta.sar(sarStartsarIncsarMax)

    // ┌────────────────────────────── 2. FİZİKSEL DİRENÇ: KABUK ─────────────────────────┐
    direncPeriyodu input.int(2"Kapakçık (Sınır) Periyodu")
    ustKapak ta.highest(highdirencPeriyodu)[1]
    altKapak ta.lowest(lowdirencPeriyodu)[1]

    // ┌────────────────────────────── 3. MTK-3: ÇİFTE KIRILIM ───────────────────────────┐
    ciftKirilimAtim    ta.crossover(closepsarVal) and (close ustKapak)
    ciftKirilimGevseme ta.crossunder(closepsarVal) 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(lowdirencPeriyodu 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(highdirencPeriyodu 2)[1]

    // ┌────────────────────────────── GÖRSELLEŞTİRME ────────────────────────────────────┐
    plot(psarVal"@yörük@"style=plot.style_crosscolor=close psarVal color.yellow color.bluelinewidth=3)


    //////////////////////
    // ┌────────────────────────────── BOSWaves ─ Groups ─────────────────────────────────┐
    // └──────────────────────────────────────────────────────────────────────────────────┘

    GRP_PSAR   "PSAR Settings"
    GRP_KMEANS "K-Means Regime Detection"
    GRP_KNN    "KNN Signal Validation"
    GRP_SMOOTH "Smoothing Settings"
    GRP_VISUAL "Visual Settings"


    // ┌────────────────────────────── BOSWaves ─ Tooltips ───────────────────────────────┐
    // └──────────────────────────────────────────────────────────────────────────────────┘

    // ── PSAR ──
    const string tt_base_start     "The initial Acceleration Factor value when a new trend begins. Lower values make the SAR start further from price, giving the trend more room before flipping."
    const string tt_base_increment "How much the AF increases each time price makes a new extreme. Higher values cause the SAR to accelerate toward price more quickly as the trend matures."
    const string tt_base_max       "The maximum value the AF can reach. Caps how tightly the SAR trails price, preventing it from becoming too sensitive during extended trends."

    // ── K-Means ──
    const string tt_use_kmeans          "When enabled, the indicator classifies the market into choppy, neutral, or trending regimes and adjusts PSAR parameters accordingly. Disable to use fixed base AF values throughout."
    const string tt_training_period     "How many bars of historical data the regime classifier looks back over to measure flip frequency. Longer periods give more stable regime readings but are slower to react to market changes."
    const string tt_choppy_threshold    "Percentile of the flip-frequency range used as the choppy market centroid. At 0.75, a flip frequency in the upper 25% of its historical range is classified as choppy. Higher = harder to enter choppy regime."
    const string tt_trending_threshold  "Percentile of the flip-frequency range used as the trending market centroid. At 0.25, a flip frequency in the lower 25% of its historical range is classified as trending. Lower = harder to enter trending regime."

    // ── KNN ──
    const string tt_use_knn        "When enabled, each SAR flip is scored using K-Nearest Neighbors on historical flips. The score reflects how often similar past setups led to a successful reversal. Disable to treat all flips equally."
    const string tt_k_neighbors    "How many of the closest historical matches to include when computing the confidence score. More neighbors = smoother, more stable scores. Fewer = more sensitive to individual historical examples."
    const string tt_knn_lookback   "How far back (in bars) the KNN search scans for historical flip comparisons. Larger values give the model more examples to learn from but increase computation time."
    const string tt_min_confidence "KNN confidence score threshold (0–100). Flips scoring below this value are treated as low-confidence — they still appear on the chart but are excluded from high-confidence alerts."

    // ── Smoothing ──
    const string tt_use_af_smoothing  "Instead of incrementing the AF in discrete steps, this ramps it gradually using exponential smoothing. Produces a more fluid SAR line that is less prone to sudden jumps."
    const string tt_af_smooth_alpha   "Controls how quickly the AF ramps toward its target on each bar. 1.0 = no smoothing (instant step). 0.01 = very gradual ramp. Has no effect if AF Smoothing is disabled."
    const string tt_use_kalman        "Applies a Kalman filter to the SAR output to smooth the displayed dot positions. The filter snaps to the new SAR value on every flip so reversals are not delayed, then re-smooths from that point."
    const string tt_kalman_proc_noise "Controls how much the Kalman filter trusts the SAR's own dynamics versus measurements. Higher values cause the filter to adapt faster to SAR changes, reducing smoothing lag."
    const string tt_kalman_meas_noise "Controls how much the Kalman filter smooths the SAR line. Higher values apply more smoothing and make the line less responsive to each new SAR value. Lower values track the raw SAR more closely."
    const string tt_use_min_bars      "Prevents SAR flips from occurring unless the current trend has lasted at least a minimum number of bars. Reduces whipsaws in fast, choppy markets."
    const string tt_min_flip_bars     "The minimum number of bars a trend must run before a SAR flip is allowed. For example, 3 means the first two bars of a new trend are always protected from an immediate reversal."

    // ── Visual ──
    const string tt_bull_color             "Color used for the SAR dots, fill, and labels when the trend is bullish (SAR below price)."
    const string tt_bear_color             "Color used for the SAR dots, fill, and labels when the trend is bearish (SAR above price)."
    const string tt_show_confidence_labels "Displays the KNN confidence percentage next to each flip label. Green = 70%+, Orange = 50–69%, Red = below 50%. Only visible when KNN Signal Scoring is enabled."
    const string tt_show_regime_labels     "Displays the current market regime as a number on each bar: 3 = Trending, 2 = Neutral, 1 = Choppy. Useful for understanding how the K-Means system is classifying the market in real time."





    // ┌────────────────────────────── BOSWaves ─ Inputs ─────────────────────────────────┐
    // └──────────────────────────────────────────────────────────────────────────────────┘

    base_start     input.float(0.02"Base AF Start",     minval=0.001step=0.001group=GRP_PSARtooltip=tt_base_start)
    base_increment input.float(0.02"Base AF Increment"minval=0.001step=0.001group=GRP_PSARtooltip=tt_base_increment)
    base_max       input.float(0.2,  "Base AF Maximum",   step=0.01,                group=GRP_PSARtooltip=tt_base_max)

    use_kmeans         input.bool(true,  "Enable K-Means Adaptation",  group=GRP_KMEANStooltip=tt_use_kmeans)
    training_period    input.int(100,    "Training Data Period",        minval=20maxval=500group=GRP_KMEANStooltip=tt_training_period)
    choppy_threshold   input.float(0.75"Choppy Regime Percentile",   maxval=1,              group=GRP_KMEANStooltip=tt_choppy_threshold)
    trending_threshold input.float(0.25"Trending Regime Percentile"maxval=1,              group=GRP_KMEANStooltip=tt_trending_threshold)

    use_knn        input.bool(true,  "Enable KNN Signal Scoring",  group=GRP_KNNtooltip=tt_use_knn)
    k_neighbors    input.int(8,      "K - Number of Neighbors",    minval=1maxval=50,  group=GRP_KNNtooltip=tt_k_neighbors)
    knn_lookback   input.int(200,    "Historical Lookback Period"minval=50maxval=500group=GRP_KNNtooltip=tt_knn_lookback)
    min_confidence input.float(15.0"Minimum Confidence Filter",  minval=0maxval=100,  group=GRP_KNNtooltip=tt_min_confidence)

    use_af_smoothing         input.bool(true,  "Enable AF Smoothing",                    group=GRP_SMOOTHtooltip=tt_use_af_smoothing)
    af_smooth_alpha          input.float(0.01"AF Smoothing Factor (lower = smoother)"minval=0.01step=0.05group=GRP_SMOOTHtooltip=tt_af_smooth_alpha)
    use_kalman               input.bool(true,  "Enable Kalman Filter",                   group=GRP_SMOOTHtooltip=tt_use_kalman)
    kalman_process_noise     input.float(0.015"Kalman Process Noise",                  minval=0.001maxval=0.5,  step=0.005group=GRP_SMOOTHtooltip=tt_kalman_proc_noise)
    kalman_measurement_noise input.float(0.5,   "Kalman Measurement Noise",              minval=0.01,  maxval=5.0,  step=0.1,   group=GRP_SMOOTHtooltip=tt_kalman_meas_noise)
    use_min_bars             input.bool(true,  "Enable Minimum Bars Filter",             group=GRP_SMOOTHtooltip=tt_use_min_bars)
    min_flip_bars            input.int(3,      "Minimum Bars Before Flip",               minval=1maxval=20group=GRP_SMOOTHtooltip=tt_min_flip_bars)

    bull_color             input.color(#00C8FF, "Bullish",                group=GRP_VISUAL, inline="col", tooltip=tt_bull_color)
    bear_color             input.color(#FF005D, "Bearish",                group=GRP_VISUAL, inline="col", tooltip=tt_bear_color)
    show_confidence_labels input.bool(true,     "Show Confidence Scores"group=GRP_VISUALtooltip=tt_show_confidence_labels)
    show_regime_labels     input.bool(true,     "Show Regime Numbers",    group=GRP_VISUALtooltip=tt_show_regime_labels)





    // ┌────────────────────────────── BOSWaves ─ Variables ──────────────────────────────┐
    // └──────────────────────────────────────────────────────────────────────────────────┘

    var float sar               na
    var float af                na
    var float ep                na
    var int   trend             1
    var int   bars_since_flip   0
    var float af_at_last_flip   0.0
    var int   last_trend_duration 0
    var int   current_trend_bars 0
    var float ep_progress       0.0
    var float flip_ep           na
    var int   recent_flips      0
    var float signal_confidence 50.0

    // ── Kalman State Variables ──
    var float kalman_estimate na
    var float kalman_error    1.0

    // ┌────────────────────────────── BOSWaves ─ Initialization ─────────────────────────┐
    // └──────────────────────────────────────────────────────────────────────────────────┘

    if na(sar)
        
    sar               := high[1]
        
    af                := base_start
        ep                
    := low
        trend             
    := -1
        bars_since_flip   
    := 0
        current_trend_bars 
    := 0

    bool raw_bull_flip 
    false
    bool raw_bear_flip 
    false

    current_trend_bars 
    += 1
    bars_since_flip    
    += 1

    // ┌────────────────────────────── BOSWaves ─ PSAR Calculation ───────────────────────┐
    // └──────────────────────────────────────────────────────────────────────────────────┘

    if trend == 1
        
    if high ep
            ep_progress 
    := (high flip_ep) / nz(ta.atr(14), high low)
            
    ep          := high
            float target_af 
    math.min(af base_incrementbase_max)
            
    af := use_af_smoothing af af_smooth_alpha * (target_af af) : target_af
        sar 
    := sar af * (ep sar)
        
    sar := math.min(sarlow[1])
        if 
    bar_index 1
            sar 
    := math.min(sarlow[2])
        if 
    close sar
            bool allow_flip 
    not use_min_bars or current_trend_bars >= min_flip_bars
            
    if allow_flip
                raw_bear_flip       
    := true
                last_trend_duration 
    := current_trend_bars
                af_at_last_flip     
    := af
                trend               
    := -1
                sar                 
    := ep
                flip_ep             
    := ep
                ep                  
    := low
                af                  
    := base_start
                current_trend_bars  
    := 0
                bars_since_flip     
    := 0
                ep_progress         
    := 0.0
                recent_flips        
    += 1
    else
        if 
    low ep
            ep_progress 
    := (flip_ep low) / nz(ta.atr(14), high low)
            
    ep          := low
            float target_af 
    math.min(af base_incrementbase_max)
            
    af := use_af_smoothing af af_smooth_alpha * (target_af af) : target_af
        sar 
    := sar af * (sar ep)
        
    sar := math.max(sarhigh[1])
        if 
    bar_index 1
            sar 
    := math.max(sarhigh[2])
        if 
    close sar
            bool allow_flip 
    not use_min_bars or current_trend_bars >= min_flip_bars
            
    if allow_flip
                raw_bull_flip       
    := true
                last_trend_duration 
    := current_trend_bars
                af_at_last_flip     
    := af
                trend               
    := 1
                sar                 
    := ep
                flip_ep             
    := ep
                ep                  
    := high
                af                  
    := base_start
                current_trend_bars  
    := 0
                bars_since_flip     
    := 0
                ep_progress         
    := 0.0
                recent_flips        
    += 1

    // ┌────────────────────────────── BOSWaves ─ Kalman Filter ──────────────────────────┐
    // └──────────────────────────────────────────────────────────────────────────────────┘

    if na(kalman_estimate)
        
    kalman_estimate := sar
        kalman_error    
    := 1.0

    if use_kalman
        
    if raw_bull_flip or raw_bear_flip
            kalman_estimate 
    := sar
            kalman_error    
    := 1.0
        
    else
            
    float kalman_gain kalman_error / (kalman_error kalman_measurement_noise)
            
    kalman_estimate  := kalman_estimate kalman_gain * (sar kalman_estimate)
            
    kalman_error     := (1.0 kalman_gain) * kalman_error kalman_process_noise

    float display_sar 
    use_kalman kalman_estimate sar

    // ┌────────────────────────────── BOSWaves ─ K-Means Regime Detection ───────────────┐
    // └──────────────────────────────────────────────────────────────────────────────────┘

    bool had_flip_long_ago = (raw_bull_flip[training_period] or raw_bear_flip[training_period])
    if 
    had_flip_long_ago
        recent_flips 
    -= 1
    recent_flips 
    := math.max(0recent_flips)

    float flip_frequency recent_flips training_period 100
    float ff_upper       
    ta.highest(flip_frequencytraining_period)
    float ff_lower       ta.lowest(flip_frequencytraining_period)

    float choppy_centroid   ff_lower + (ff_upper ff_lower) * choppy_threshold
    float neutral_centroid  
    ff_lower + (ff_upper ff_lower) * 0.5
    float trending_centroid 
    ff_lower + (ff_upper ff_lower) * trending_threshold

    float dist_to_choppy   
    math.abs(flip_frequency choppy_centroid)
    float dist_to_neutral  math.abs(flip_frequency neutral_centroid)
    float dist_to_trending math.abs(flip_frequency trending_centroid)

    int market_regime dist_to_choppy dist_to_neutral and dist_to_choppy dist_to_trending dist_to_trending dist_to_choppy and dist_to_trending dist_to_neutral 1

    // ┌────────────────────────────── BOSWaves ─ Adaptive Parameters ────────────────────┐
    // └──────────────────────────────────────────────────────────────────────────────────┘

    float adaptive_start     use_kmeans ? (market_regime == base_start 0.5 market_regime == base_start 1.5 base_start) : base_start
    float adaptive_increment 
    use_kmeans ? (market_regime == base_increment 0.4 market_regime == base_increment 1.4 base_increment) : base_increment
    float adaptive_max       
    use_kmeans ? (market_regime == base_max 0.6 market_regime == base_max 1.3 base_max) : base_max

    if use_kmeans
        af 
    := math.min(afadaptive_max)

    // ┌────────────────────────────── BOSWaves ─ KNN Signal Validation ──────────────────┐
    // └──────────────────────────────────────────────────────────────────────────────────┘

    if use_knn and (raw_bull_flip or raw_bear_flip)
        
    float f1 bars_since_flip[1] / 50.0
        float f2 
    last_trend_duration 50.0
        float f3 
    af_at_last_flip base_max
        float f4 
    flip_frequency 10.0
        float f5 
    math.min(ep_progress[1], 5.0) / 5.0

        
    var distances = array.new_float()
        var 
    outcomes  = array.new_float()
        
    distances.clear()
        
    outcomes.clear()

        for 
    10 to knn_lookback
            
    if bar_index
                bool hist_bull_flip 
    trend[i] == and trend[1] == -1
                bool hist_bear_flip 
    trend[i] == -and trend[1] == 1

                
    if (raw_bull_flip and hist_bull_flip) or (raw_bear_flip and hist_bear_flip)
                    
    float h1 bars_since_flip[1] / 50.0
                    float h2 
    last_trend_duration[i] / 50.0
                    float h3 
    af_at_last_flip[i] / base_max
                    float h4 
    flip_frequency[i] / 10.0
                    float h5 
    math.min(ep_progress[1], 5.0) / 5.0

                    float dist 
    math.sqrt(math.pow(f1 h12) + math.pow(f2 h22) + math.pow(f3 h32) + math.pow(f4 h42) + math.pow(f5 h52))

                    
    float outcome 0.0
                    
    if 10
                        float price_change 
    = (close[5] - close[i]) / close[i]
                        if 
    raw_bull_flip and hist_bull_flip
                            outcome 
    := price_change 0.001 1.0 0.0
                        
    else if raw_bear_flip and hist_bear_flip
                            outcome 
    := price_change < -0.001 1.0 0.0

                    distances
    .push(dist)
                    
    outcomes.push(outcome)

        
    int n distances.size()
        if 
    1
            
    for 0 to math.min(k_neighbors1) - 1
                int   min_idx 
    i
                float min_val 
    distances.get(i)
                for 
    1 to n 1
                    
    if distances.get(j) < min_val
                        min_val 
    := distances.get(j)
                        
    min_idx := j
                
    if min_idx != i
                    float temp_dist 
    distances.get(i)
                    
    float temp_out  outcomes.get(i)
                    
    distances.set(idistances.get(min_idx))
                    
    outcomes.set(ioutcomes.get(min_idx))
                    
    distances.set(min_idxtemp_dist)
                    
    outcomes.set(min_idxtemp_out)

            
    float weighted_success 0.0
            float total_weight     
    0.0
            int   effective_k      
    math.min(k_neighborsn)

            for 
    0 to effective_k 1
                float dist   
    distances.get(i)
                
    float weight dist 0.0001 100.0 1.0 dist
                weighted_success 
    += outcomes.get(i) * weight
                total_weight     
    += weight

            
    if total_weight 0
                signal_confidence 
    := (weighted_success total_weight) * 100

    // ┌────────────────────────────── BOSWaves ─ Signal Logic ───────────────────────────┐
    // └──────────────────────────────────────────────────────────────────────────────────┘

    bool bullish_flip raw_bull_flip
    bool bearish_flip 
    raw_bear_flip

    bool high_conf_bull 
    bullish_flip and (not use_knn or signal_confidence >= min_confidence)
    bool high_conf_bear bearish_flip and (not use_knn or signal_confidence >= min_confidence)
    bool low_conf_bull  bullish_flip and use_knn and signal_confidence min_confidence
    bool low_conf_bear  
    bearish_flip and use_knn and signal_confidence min_confidence

    // ┌────────────────────────────── BOSWaves ─ Plotting ───────────────────────────────┐
    // └──────────────────────────────────────────────────────────────────────────────────┘

    color sar_color trend == bull_color bear_color

    plot
    (display_sar"Ai"sar_colorstyle=plot.style_circleslinewidth=2display=display.none)

    p_sar   plot(display_sar"SAR"color=sar_colorstyle=plot.style_circleslinewidth=2display=display.none)
    p_price plot(trend == low high"Price Anchor"color=color.new(sar_color100), display=display.none)

    int conf_transp int(90 signal_confidence 0.6)
    color conf_color color.new(sar_colorconf_transp)

    //fill(p_sar, p_price,
         //trend == 1 ? low : display_sar,
        // trend == 1 ? display_sar : high,
        // color.new(sar_color, conf_transp + 30),
         //conf_color,
         //title="Confidence Fill")





    // ┌────────────────────────────── BOSWaves ─ Labels ─────────────────────────────────┐
    // └──────────────────────────────────────────────────────────────────────────────────┘



    // ── Confidence Score Labels ──
    if show_confidence_labels and use_knn and (bullish_flip or bearish_flip)
        
    //string conf_text      = str.tostring(math.round(signal_confidence)) + "%"
        
    color  conf_lbl_color signal_confidence >= 70 #00ff88 : signal_confidence >= 50 ? #ffaa00 : #ff4444
        
    label.new(bar_indextrend == display_sar ta.atr(14) * 0.8 display_sar ta.atr(14) * 0.8
             
    style=label.style_nonetextcolor=conf_lbl_colorsize=size.normal)

    // ── Regime Number Labels ──
    if show_regime_labels and bar_index == 0
        string regime_text  
    str.tostring(market_regime)
        
    color  regime_color color.from_gradient(market_regime 113color.new(sar_color00), color.new(sar_color00))
        
    label.new(bar_indextrend == display_sar ta.atr(14) * 1.5 display_sar ta.atr(14) * 1.5regime_text,
             
    style=label.style_nonetextcolor=regime_colorsize=size.normal)

    // 
    16.07.2024 - 10.12.2024

Sayfa 385/387 İlkİlk ... 285335375383384385386387 SonSon

Yer İmleri

Yer İmleri

Gönderi Kuralları

  • Yeni konu açamazsınız
  • Konulara cevap yazamazsınız
  • Yazılara ek gönderemezsiniz
  • Yazılarınızı değiştiremezsiniz
  •