Artan
Azalan
lem
BIST 30
BIST 50
BIST 100
NASDAQ 100
Hisse Fiyat Fark% Hacim (TL) Dk / Yksek
119,90 10% 1,03 Mr 110,30 / 119,90
34,80 9.99% 87,55 Mn 34,80 / 34,80
85,95 9.98% 218,93 Mn 76,30 / 85,95
6,39 9.98% 502,56 Mn 6,02 / 6,39
13,12 9.97% 4,81 Mr 11,64 / 13,12
Hisse Fiyat Fark% Hacim (TL) Dk / Yksek
2,90 -9.94% 876,90 Mn 2,90 / 3,13
7,80 -8.24% 5,48 Mn 7,80 / 8,01
1.377,00 -8.08% 124,92 Mn 1.357,00 / 1.508,00
6,60 -7.17% 73,09 Mn 6,55 / 6,88
22,06 -7.15% 212,09 Mn 22,06 / 24,44
Hisse Fiyat Fark% Hacim (TL) Dk / Yksek
3,29 7.52% 16,68 Mr 3,06 / 3,32
321,25 1.26% 6,68 Mr 317,75 / 322,25
13,12 9.97% 4,81 Mr 11,64 / 13,12
411,25 0.06% 3,52 Mr 407,00 / 416,25
23,88 6.13% 3,41 Mr 22,36 / 24,18
Hisse Fiyat Fark% Hacim (TL) Dk / Yksek
18,42 -0.86% 353,92 Mn 18,38 / 18,66
77,70 -0.51% 2,56 Mr 77,40 / 78,50
411,25 0.06% 3,52 Mr 407,00 / 416,25
191,20 -0.42% 2,48 Mr 189,40 / 193,10
744,00 -0.27% 1,20 Mr 743,00 / 752,00
Hisse Fiyat Fark% Hacim (TL) Dk / Yksek
18,42 -0.86% 353,92 Mn 18,38 / 18,66
77,70 -0.51% 2,56 Mr 77,40 / 78,50
93,35 0.16% 192,17 Mn 92,75 / 94,05
115,60 -0.34% 86,18 Mn 114,90 / 116,30
411,25 0.06% 3,52 Mr 407,00 / 416,25
Hisse Fiyat Fark% Hacim (TL) Dk / Yksek
18,42 -0.86% 353,92 Mn 18,38 / 18,66
31,02 0.65% 86,23 Mn 30,62 / 31,62
77,70 -0.51% 2,56 Mr 77,40 / 78,50
10,78 0.75% 94,04 Mn 10,71 / 10,82
82,60 1.47% 173,86 Mn 81,35 / 82,95

Masrafsz Bankaclk + 1.000 TL Nakit! Enparadan ifte Avantaj

Masrafsz Bankaclk + 1.000 TL Nakit! Enparadan ifte Avantaj
Sayfa 391/393 lklk ... 291341381389390391392393 SonSon
Arama sonucu : 3138 madde; 3,121 - 3,128 aras.

Konu: Tradingview

  1. sade-tablo alma denemesi....
    PHP Code:
    //@version=6
    indicator(":]"overlay=truemax_lines_count=50max_labels_count=500)

    // ==========================================
    // 1. 5 KADEMEL EXTENDED SAR MOTORU
    // ==========================================
    sarext(simple float start_value=0.0simple float offset_on_reverse=0.0,
           
    simple float af_init_long=0.simple float af_long=0.02simple float af_max_long=0.20,
           
    simple float af_init_short=0.simple float af_short=0.02simple float af_max_short=0.20) =>
        if 
    af_init_long 0
            runtime
    .error("AF init long must be >= 0")
        if 
    af_long 0
            runtime
    .error("AF long must be >= 0")
        if 
    af_max_long af_init_long
            runtime
    .error("AF max long must be >= AF init long")
        if 
    af_init_short 0
            runtime
    .error("AF init short must be >= 0")
        if 
    af_short 0
            runtime
    .error("AF short must be >= 0")
        if 
    af_max_short af_init_short
            runtime
    .error("AF max short must be >= AF init short")

        var 
    bool is_long true
        
    var float sar na
        
    var float ep na
        
    var float af af_init_long
        
    var float result na

        
    if bar_index == 0
            result 
    := na
        
    else if bar_index == 1
            
    if start_value 0
                is_long 
    := true
                sar 
    := math.abs(start_value)
            else if 
    start_value 0
                is_long 
    := false
                sar 
    := math.abs(start_value)
            else
                
    float plus_dm high high[1]
                
    float minus_dm low[1] - low
                
    if plus_dm 0
                    plus_dm 
    := 0
                
    if minus_dm 0
                    minus_dm 
    := 0
                is_long 
    := plus_dm minus_dm
                sar 
    := is_long low[1] : high[1]

            
    ep := is_long high low
            af 
    := is_long af_init_long af_init_short

            
    if is_long
                
    if sar low[1]
                    
    sar := low[1]
                if 
    sar low
                    sar 
    := low
            
    else
                if 
    sar high[1]
                    
    sar := high[1]
                if 
    sar high
                    sar 
    := high

            result 
    := is_long sar : -sar
        
    else
            
    float new_sar sar af * (ep sar)

            if 
    is_long
                new_sar 
    := math.min(new_sarlow[1])
                
    new_sar := math.min(new_sarlow[2])
                if 
    low new_sar
                    is_long 
    := false
                    new_sar 
    := ep
                    
    if offset_on_reverse != 0
                        new_sar 
    := new_sar offset_on_reverse
                    ep 
    := low
                    af 
    := af_init_short
                
    else
                    if 
    high ep
                        ep 
    := high
                        af 
    := math.min(af af_longaf_max_long)
            else
                
    new_sar := math.max(new_sarhigh[1])
                
    new_sar := math.max(new_sarhigh[2])
                if 
    high new_sar
                    is_long 
    := true
                    new_sar 
    := ep
                    
    if offset_on_reverse != 0
                        new_sar 
    := new_sar offset_on_reverse
                    ep 
    := high
                    af 
    := af_init_long
                
    else
                    if 
    low ep
                        ep 
    := low
                        af 
    := math.min(af af_shortaf_max_short)

            
    sar := new_sar
            result 
    := is_long new_sar : -new_sar
        result

    // vme (AF) Deerleri
    i_af_h1 0.20   // Hzl 1
    i_af_h2 0.05   // Hzl 2
    i_af_de 0.02   // Denge
    i_af_y1 0.005  // Yava 1
    i_af_y2 0.001  // Yava 2
    i_af_mx 0.2    

    // Motorlar altr
    s_h1 sarext(0.00.0i_af_h1i_af_h1math.max(i_af_h1i_af_mx), i_af_h1i_af_h1math.max(i_af_h1i_af_mx))
    s_h2 sarext(0.00.0i_af_h2i_af_h2math.max(i_af_h2i_af_mx), i_af_h2i_af_h2math.max(i_af_h2i_af_mx))
    s_de sarext(0.00.0i_af_dei_af_demath.max(i_af_dei_af_mx), i_af_dei_af_demath.max(i_af_dei_af_mx))
    s_y1 sarext(0.00.0i_af_y1i_af_y1math.max(i_af_y1i_af_mx), i_af_y1i_af_y1math.max(i_af_y1i_af_mx))
    s_y2 sarext(0.00.0i_af_y2i_af_y2math.max(i_af_y2i_af_mx), i_af_y2i_af_y2math.max(i_af_y2i_af_mx))


    // ==========================================
    // 2. HAKK AYNA (SMETRK HEDEF HESAPLAMASI)
    // ==========================================
    // Denge (0.02) motorunun mesafesini alp fiyatn kar tarafna yanstan Ayna Forml
    float s_de_abs math.abs(s_de)
    bool is_de_up s_de 0
    float delta_de 
    math.abs(close s_de_abs)
    float raw_mirror is_de_up close delta_de close delta_de
    float ayna_hma 
    ta.hma(raw_mirror55// Przszletirilmi Yansma Hedefi

    // ==========================================
    // 3. HAFIZA VE KIRILIM MANTII
    // ==========================================
    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
    var float p_y1 na, var float n_y1 na
    var float p_y2 na, var float n_y2 na

    bool is_p_h1 
    s_h1 0
    bool is_p_h2 
    s_h2 0
    bool is_p_de 
    s_de 0
    bool is_p_y1 
    s_y1 0
    bool is_p_y2 
    s_y2 0

    if is_p_h1
        p_h1 
    := math.abs(s_h1)
    else
        
    n_h1 := math.abs(s_h1)

    if 
    is_p_h2
        p_h2 
    := math.abs(s_h2)
    else
        
    n_h2 := math.abs(s_h2)

    if 
    is_p_de
        p_de 
    := math.abs(s_de)
    else
        
    n_de := math.abs(s_de)

    if 
    is_p_y1
        p_y1 
    := math.abs(s_y1)
    else
        
    n_y1 := math.abs(s_y1)

    if 
    is_p_y2
        p_y2 
    := math.abs(s_y2)
    else
        
    n_y2 := math.abs(s_y2)

    bool prev_h1 bar_index is_p_h1[1] : is_p_h1
    bool prev_h2 
    bar_index is_p_h2[1] : is_p_h2
    bool prev_de 
    bar_index is_p_de[1] : is_p_de
    bool prev_y1 
    bar_index is_p_y1[1] : is_p_y1
    bool prev_y2 
    bar_index is_p_y2[1] : is_p_y2

    bool brk_h1_neg 
    prev_h1 and not is_p_h1 
    bool brk_h1_pos 
    not prev_h1 and is_p_h1 
    bool brk_h2_neg 
    prev_h2 and not is_p_h2
    bool brk_h2_pos 
    not prev_h2 and is_p_h2
    bool brk_de_neg 
    prev_de and not is_p_de
    bool brk_de_pos 
    not prev_de and is_p_de
    bool brk_y1_neg 
    prev_y1 and not is_p_y1
    bool brk_y1_pos 
    not prev_y1 and is_p_y1
    bool brk_y2_neg 
    prev_y2 and not is_p_y2
    bool brk_y2_pos 
    not prev_y2 and is_p_y2

    // ==========================================
    // 4. AI EKRANA ZME VE HESAPLAMALAR
    // ==========================================
    //plot(is_p_h1 ? math.abs(s_h1) : na, "H1 (+)", color=color.new(color.yellow, 0), style=plot.style_cross, linewidth=2)
    //plot(not is_p_h1 ? math.abs(s_h1) : na, "H1 (-)", color=color.new(color.yellow, 0),  style=plot.style_cross, linewidth=2)

    //plot(is_p_h2 ? math.abs(s_h2) : na, "H2 (+)", color=color.new(color.yellow, 0), style=plot.style_cross, linewidth=2)
    //plot(not is_p_h2 ? math.abs(s_h2) : na, "H2 (-)", color=color.new(color.yellow, 0), style=plot.style_cross, linewidth=2)

    //plot(is_p_de ? math.abs(s_de) : na, "D(+)", color=color.new(color.lime, 0), style=plot.style_line, linewidth=2)
    //plot(not is_p_de ? math.abs(s_de) : na, "D(-)", color=color.new(color.red, 0),  style=plot.style_line, linewidth=2)

    // ALTIN AYNAYI ZME (Gelecek Hedefi)
    //plot(ayna_hma, "SarAyna", color=color.new(#f700ff, 0), linewidth=2, style=plot.style_line)

    //plot(is_p_y1 ? math.abs(s_y1) : na, "Y1 (+)", color=color.new(color.blue, 0), style=plot.style_cross, linewidth=2) 
    //plot(not is_p_y1 ? math.abs(s_y1) : na, "Y1 (-)", color=color.new(color.blue, 0), style=plot.style_cross, linewidth=2) 

    //plot(is_p_y2 ? math.abs(s_y2) : na, "Y2 (+)", color=color.new(color.blue, 0),   style=plot.style_cross, linewidth=2)
    //plot(not is_p_y2 ? math.abs(s_y2) : na, "Y2 (-)", color=color.new(color.blue, 0), style=plot.style_cross, linewidth=2)

    float avg_sar_val = (math.abs(s_h1) + math.abs(s_h2) + math.abs(s_de) + math.abs(s_y1) + math.abs(s_y2)) / 5.0

    // TEMZ HAVA SAHASI: DURUM HESAPLAMASI
    bool durum_al = (close n_de) and (close p_h1) and (close n_h1) and (close p_h2) and (close n_h2)
    bool durum_sat = (close p_de) and (close p_h1) and (close n_h1) and (close p_h2) and (close n_h2)

    string durum_metni durum_al "AL" durum_sat "SAT" "BEKLE"
    color durum_rengi  durum_al color.lime durum_sat color.red color.gray
    color durum_yazi_rengi 
    durum_al color.black durum_sat color.white color.black

    // ==========================================
    // 5. MOMENTUM RADARLI KOMUTA MERKEZ
    // ==========================================
    var table dash table.new(position.top_right316border_width 1border_color color.new(color.gray80))

    if 
    barstate.islast
        table
    .cell(dash00"@yrk@ Yatrm Tavsiyesi DELDR."text_color=color.whitebgcolor=color.new(color.black0), text_size=size.normaltext_halign=text.align_center)
        
    table.merge_cells(dash0020)
        
        
    table.cell(dash01"Anlk Fiyat:"text_color=color.whitebgcolor=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)

        
    table.cell(dash02"Ortak Merkez (Ort):"text_color=color.yellowbgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash12str.tostring(avg_sar_valformat.mintick), text_color=color.yellowbgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.merge_cells(dash1222)

        
    table.cell(dash03"Genel Durum:"text_color=color.whitebgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash13durum_metnitext_color=durum_yazi_rengibgcolor=durum_rengitext_halign=text.align_right)
        
    table.merge_cells(dash1323)

        
    // ALTIN AYNA HEDEF SATIRI EKLEND
        
    table.cell(dash04"Hedef (TP/SL):"text_color=#FFD700, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
        
    table.cell(dash14str.tostring(ayna_hmaformat.mintick), text_color=#FFD700, bgcolor=color.new(color.black, 40), text_halign=text.align_right)
        
    table.cell(dash24is_de_up "DREN" "DESTEK"text_color=color.blackbgcolor=#FFD700, text_halign=text.align_center)

        // --- HIZLI 1 (0.20) ---
        
    c_bg_p1 brk_h1_neg color.yellow color.new(color.black40)
        
    c_tx_p1 brk_h1_neg color.black : (is_p_h1 color.lime color.gray)
        
    t_st_p1 brk_h1_neg "KIRILDI!" : (is_p_h1 "AKTF (+)" "Pasif")
        
    table.cell(dash05"Hzl 1 (+):"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash15str.tostring(p_h1format.mintick), text_color=c_tx_p1bgcolor=c_bg_p1text_halign=text.align_right)
        
    table.cell(dash25t_st_p1text_color=c_tx_p1bgcolor=c_bg_p1text_halign=text.align_center)

        
    c_bg_n1 brk_h1_pos color.yellow color.new(color.black40)
        
    c_tx_n1 brk_h1_pos color.black : (not is_p_h1 color.red color.gray)
        
    t_st_n1 brk_h1_pos "KIRILDI!" : (not is_p_h1 "AKTF (-)" "Pasif")
        
    table.cell(dash06"Hzl 1 (-):"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash16str.tostring(n_h1format.mintick), text_color=c_tx_n1bgcolor=c_bg_n1text_halign=text.align_right)
        
    table.cell(dash26t_st_n1text_color=c_tx_n1bgcolor=c_bg_n1text_halign=text.align_center)

        
    // --- HIZLI 2 (0.05) ---
        
    c_bg_p2 brk_h2_neg color.yellow color.new(color.black40)
        
    c_tx_p2 brk_h2_neg color.black : (is_p_h2 color.lime color.gray)
        
    t_st_p2 brk_h2_neg "KIRILDI!" : (is_p_h2 "AKTF (+)" "Pasif")
        
    table.cell(dash07"Hzl 2 (+):"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash17str.tostring(p_h2format.mintick), text_color=c_tx_p2bgcolor=c_bg_p2text_halign=text.align_right)
        
    table.cell(dash27t_st_p2text_color=c_tx_p2bgcolor=c_bg_p2text_halign=text.align_center)

        
    c_bg_n2 brk_h2_pos color.yellow color.new(color.black40)
        
    c_tx_n2 brk_h2_pos color.black : (not is_p_h2 color.red color.gray)
        
    t_st_n2 brk_h2_pos "KIRILDI!" : (not is_p_h2 "AKTF (-)" "Pasif")
        
    table.cell(dash08"Hzl 2 (-):"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash18str.tostring(n_h2format.mintick), text_color=c_tx_n2bgcolor=c_bg_n2text_halign=text.align_right)
        
    table.cell(dash28t_st_n2text_color=c_tx_n2bgcolor=c_bg_n2text_halign=text.align_center)

        
    // --- DENGE (0.02) ---
        
    c_bg_pd brk_de_neg color.yellow color.new(color.black40)
        
    c_tx_pd brk_de_neg color.black : (is_p_de color.lime color.gray)
        
    t_st_pd brk_de_neg "KIRILDI!" : (is_p_de "AKTF (+)" "Pasif")
        
    table.cell(dash09"Denge   (+):"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash19str.tostring(p_deformat.mintick), text_color=c_tx_pdbgcolor=c_bg_pdtext_halign=text.align_right)
        
    table.cell(dash29t_st_pdtext_color=c_tx_pdbgcolor=c_bg_pdtext_halign=text.align_center)

        
    c_bg_nd brk_de_pos color.yellow color.new(color.black40)
        
    c_tx_nd brk_de_pos color.black : (not is_p_de color.red color.gray)
        
    t_st_nd brk_de_pos "KIRILDI!" : (not is_p_de "AKTF (-)" "Pasif")
        
    table.cell(dash010"Denge   (-):"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash110str.tostring(n_deformat.mintick), text_color=c_tx_ndbgcolor=c_bg_ndtext_halign=text.align_right)
        
    table.cell(dash210t_st_ndtext_color=c_tx_ndbgcolor=c_bg_ndtext_halign=text.align_center)

        
    // --- YAVA 1 (0.005) ---
        
    c_bg_py1 brk_y1_neg color.yellow color.new(color.black40)
        
    c_tx_py1 brk_y1_neg color.black : (is_p_y1 color.lime color.gray)
        
    t_st_py1 brk_y1_neg "KIRILDI!" : (is_p_y1 "AKTF (+)" "Pasif")
        
    table.cell(dash011"Yava 1 (+):"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash111str.tostring(p_y1format.mintick), text_color=c_tx_py1bgcolor=c_bg_py1text_halign=text.align_right)
        
    table.cell(dash211t_st_py1text_color=c_tx_py1bgcolor=c_bg_py1text_halign=text.align_center)

        
    c_bg_ny1 brk_y1_pos color.yellow color.new(color.black40)
        
    c_tx_ny1 brk_y1_pos color.black : (not is_p_y1 color.red color.gray)
        
    t_st_ny1 brk_y1_pos "KIRILDI!" : (not is_p_y1 "AKTF (-)" "Pasif")
        
    table.cell(dash012"Yava 1 (-):"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash112str.tostring(n_y1format.mintick), text_color=c_tx_ny1bgcolor=c_bg_ny1text_halign=text.align_right)
        
    table.cell(dash212t_st_ny1text_color=c_tx_ny1bgcolor=c_bg_ny1text_halign=text.align_center)

        
    // --- YAVA 2 (0.001) ---
        
    c_bg_py2 brk_y2_neg color.yellow color.new(color.black40)
        
    c_tx_py2 brk_y2_neg color.black : (is_p_y2 color.lime color.gray)
        
    t_st_py2 brk_y2_neg "KIRILDI!" : (is_p_y2 "AKTF (+)" "Pasif")
        
    table.cell(dash013"Yava 2 (+):"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash113str.tostring(p_y2format.mintick), text_color=c_tx_py2bgcolor=c_bg_py2text_halign=text.align_right)
        
    table.cell(dash213t_st_py2text_color=c_tx_py2bgcolor=c_bg_py2text_halign=text.align_center)

        
    c_bg_ny2 brk_y2_pos color.yellow color.new(color.black40)
        
    c_tx_ny2 brk_y2_pos color.black : (not is_p_y2 color.red color.gray)
        
    t_st_ny2 brk_y2_pos "KIRILDI!" : (not is_p_y2 "AKTF (-)" "Pasif")
        
    table.cell(dash014"Yava 2 (-):"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash114str.tostring(n_y2format.mintick), text_color=c_tx_ny2bgcolor=c_bg_ny2text_halign=text.align_right)
        
    table.cell(dash214t_st_ny2text_color=c_tx_ny2bgcolor=c_bg_ny2text_halign=text.align_center)

    // ==========================================
    // 6. SAVA BORUSU (ALARM ENTEGRASYONU)
    // ==========================================
    alertcondition(durum_al and barstate.isconfirmedtitle="🟢 HCUM: Temiz Hava Sahas!"message="Btn direnler krld! Yn: YUKARI (AL)")
    alertcondition(durum_sat and barstate.isconfirmedtitle="🔴 D: Ar Bask!"message="Btn destekler krld! Yn: AAI (SAT)")
    //////////////

    // ==========================================
    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 1. SAR MOTORLARI (HIZLI VE YAVA)                                            │
    // └──────────────────────────────────────────────────────────────────────────────┘
    float yemre ta.sar(0.0.010.2
    float yusuf ta.sar(0.0.050.2)
    float fato ta.sar(0.0.090.2)
    float mf = (yemre yusuf fato) / 3

    // ==========================================
    // 5. KALKAN GC (MUM BOYAMA)
    // ==========================================
    int kalkan 0
    if close yemre 
        kalkan 
    += 1
    if close yusuf 
        kalkan 
    += 1
    if close fato 
        kalkan 
    += 1

    if close yemre and close mf
        kalkan 
    += 1
    if close yusuf and close mf
        kalkan 
    += 1
    if close fato and close mf
        kalkan 
    += 1

    color bar_col 
    na
    if kalkan >= 3
        bar_col 
    := close mf color.rgb(025513250) : color.rgb(2504450)
    else if 
    kalkan == 2
        bar_col 
    := color.rgb(215249)
    else
        
    bar_col := color.rgb(2123249)

    barcolor(bar_col)

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

    //////////////////

    // MZA
    var table ytd_table table.new(position.bottom_center11)
    if 
    barstate.islast
        table
    .cell(ytd_table00"(A) Eitim almasdr. Yatrm tavsiyesi KULLANILAMAZ."text_color=color.new(color.white00), text_size=size.normal)
    ///////////////// 
    16.07.2024 - 10.12.2024

  2. tablosuz aynal deneme...
    PHP Code:
    //@version=6
    indicator(":]"overlay=truemax_lines_count=50max_labels_count=500)

    // ==========================================
    // 1. 5 KADEMEL EXTENDED SAR MOTORU
    // ==========================================
    sarext(simple float start_value=0.0simple float offset_on_reverse=0.0,
           
    simple float af_init_long=0.02simple float af_long=0.02simple float af_max_long=0.20,
           
    simple float af_init_short=0.02simple float af_short=0.02simple float af_max_short=0.20) =>
        if 
    af_init_long 0
            runtime
    .error("AF init long must be >= 0")
        if 
    af_long 0
            runtime
    .error("AF long must be >= 0")
        if 
    af_max_long af_init_long
            runtime
    .error("AF max long must be >= AF init long")
        if 
    af_init_short 0
            runtime
    .error("AF init short must be >= 0")
        if 
    af_short 0
            runtime
    .error("AF short must be >= 0")
        if 
    af_max_short af_init_short
            runtime
    .error("AF max short must be >= AF init short")

        var 
    bool is_long true
        
    var float sar na
        
    var float ep na
        
    var float af af_init_long
        
    var float result na

        
    if bar_index == 0
            result 
    := na
        
    else if bar_index == 1
            
    if start_value 0
                is_long 
    := true
                sar 
    := math.abs(start_value)
            else if 
    start_value 0
                is_long 
    := false
                sar 
    := math.abs(start_value)
            else
                
    float plus_dm high high[1]
                
    float minus_dm low[1] - low
                
    if plus_dm 0
                    plus_dm 
    := 0
                
    if minus_dm 0
                    minus_dm 
    := 0
                is_long 
    := plus_dm minus_dm
                sar 
    := is_long low[1] : high[1]

            
    ep := is_long high low
            af 
    := is_long af_init_long af_init_short

            
    if is_long
                
    if sar low[1]
                    
    sar := low[1]
                if 
    sar low
                    sar 
    := low
            
    else
                if 
    sar high[1]
                    
    sar := high[1]
                if 
    sar high
                    sar 
    := high

            result 
    := is_long sar : -sar
        
    else
            
    float new_sar sar af * (ep sar)

            if 
    is_long
                new_sar 
    := math.min(new_sarlow[1])
                
    new_sar := math.min(new_sarlow[2])
                if 
    low new_sar
                    is_long 
    := false
                    new_sar 
    := ep
                    
    if offset_on_reverse != 0
                        new_sar 
    := new_sar offset_on_reverse
                    ep 
    := low
                    af 
    := af_init_short
                
    else
                    if 
    high ep
                        ep 
    := high
                        af 
    := math.min(af af_longaf_max_long)
            else
                
    new_sar := math.max(new_sarhigh[1])
                
    new_sar := math.max(new_sarhigh[2])
                if 
    high new_sar
                    is_long 
    := true
                    new_sar 
    := ep
                    
    if offset_on_reverse != 0
                        new_sar 
    := new_sar offset_on_reverse
                    ep 
    := high
                    af 
    := af_init_long
                
    else
                    if 
    low ep
                        ep 
    := low
                        af 
    := math.min(af af_shortaf_max_short)

            
    sar := new_sar
            result 
    := is_long new_sar : -new_sar
        result

    // vme (AF) Deerleri
    i_af_h1 0.20   // Hzl 1
    i_af_h2 0.05   // Hzl 2
    i_af_de 0.02   // Denge
    i_af_y1 0.005  // Yava 1
    i_af_y2 0.001  // Yava 2
    i_af_mx 0.2    

    // Motorlar altr
    s_h1 sarext(0.00.0i_af_h1i_af_h1math.max(i_af_h1i_af_mx), i_af_h1i_af_h1math.max(i_af_h1i_af_mx))
    s_h2 sarext(0.00.0i_af_h2i_af_h2math.max(i_af_h2i_af_mx), i_af_h2i_af_h2math.max(i_af_h2i_af_mx))
    s_de sarext(0.00.0i_af_dei_af_demath.max(i_af_dei_af_mx), i_af_dei_af_demath.max(i_af_dei_af_mx))
    s_y1 sarext(0.00.0i_af_y1i_af_y1math.max(i_af_y1i_af_mx), i_af_y1i_af_y1math.max(i_af_y1i_af_mx))
    s_y2 sarext(0.00.0i_af_y2i_af_y2math.max(i_af_y2i_af_mx), i_af_y2i_af_y2math.max(i_af_y2i_af_mx))


    // ==========================================
    // 2. HAKK AYNA (SMETRK HEDEF HESAPLAMASI)
    // ==========================================
    // Denge (0.02) motorunun mesafesini alp fiyatn kar tarafna yanstan Ayna Forml
    float s_de_abs math.abs(s_de)
    bool is_de_up s_de 0
    float delta_de 
    math.abs(close s_de_abs)
    float raw_mirror is_de_up close delta_de close delta_de
    float ayna_hma 
    ta.hma(raw_mirror55// Przszletirilmi Yansma Hedefi


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

    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 3. FT AYNALI OMURGA MOTORU (12 ve 32)                                      │
    // └──────────────────────────────────────────────────────────────────────────────┘
    float s_start_sabit 0.08
    float s_inc_sabit   
    0.05
    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)

    // GNE (32) VE AY (12) YRNGELER
    float ayna_12 f_katman_ana(s_start_sabits_inc_sabits_max_sabit22)
    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)

    aort= (ayna_12+ayna_32)/2
    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 lk", color=col_ayna_12, linewidth=2, style=plot.style_stepline)
    //plot(ayna_32, "Ayna Son", color=col_ayna_32, linewidth=2, style=plot.style_stepline)
    plot(aort"@yrk@"color=col_ayna_32linewidth=2style=plot.style_stepline)

    // ==========================================
    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 1. SAR MOTORLARI (HIZLI VE YAVA)                                            │
    // └──────────────────────────────────────────────────────────────────────────────┘
    float yemre ta.sar(0.010.010.2
    float yusuf ta.sar(0.010.050.2)
    float fato ta.sar(0.010.090.2)
    float mf = (yemre yusuf fato) / 3

    // ==========================================
    // 5. KALKAN GC (MUM BOYAMA)
    // ==========================================
    int kalkan 0
    if close yemre 
        kalkan 
    += 1
    if close yusuf 
        kalkan 
    += 1
    if close fato 
        kalkan 
    += 1

    if close yemre and close mf
        kalkan 
    += 1
    if close yusuf and close mf
        kalkan 
    += 1
    if close fato and close mf
        kalkan 
    += 1

    color bar_col 
    na
    if kalkan >= 3
        bar_col 
    := close mf color.rgb(025513250) : color.rgb(2504450)
    else if 
    kalkan == 2
        bar_col 
    := color.rgb(215249)
    else
        
    bar_col := color.rgb(2123249)

    barcolor(bar_col)

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

    //////////////////

    // MZA
    var table ytd_table table.new(position.bottom_center11)
    if 
    barstate.islast
        table
    .cell(ytd_table00"(A) Eitim almasdr. Yatrm tavsiyesi KULLANILAMAZ."text_color=color.new(color.white00), text_size=size.normal)
    ///////////////// 
    16.07.2024 - 10.12.2024

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

    // ==========================================
    // 1. 5 KADEMEL EXTENDED SAR MOTORU
    // ==========================================
    sarext(simple float start_value=0.0simple float offset_on_reverse=0.0,
           
    simple float af_init_long=0.02simple float af_long=0.02simple float af_max_long=0.20,
           
    simple float af_init_short=0.02simple float af_short=0.02simple float af_max_short=0.20) =>
        if 
    af_init_long 0
            runtime
    .error("AF init long must be >= 0")
        if 
    af_long 0
            runtime
    .error("AF long must be >= 0")
        if 
    af_max_long af_init_long
            runtime
    .error("AF max long must be >= AF init long")
        if 
    af_init_short 0
            runtime
    .error("AF init short must be >= 0")
        if 
    af_short 0
            runtime
    .error("AF short must be >= 0")
        if 
    af_max_short af_init_short
            runtime
    .error("AF max short must be >= AF init short")

        var 
    bool is_long true
        
    var float sar na
        
    var float ep na
        
    var float af af_init_long
        
    var float result na

        
    if bar_index == 0
            result 
    := na
        
    else if bar_index == 1
            
    if start_value 0
                is_long 
    := true
                sar 
    := math.abs(start_value)
            else if 
    start_value 0
                is_long 
    := false
                sar 
    := math.abs(start_value)
            else
                
    float plus_dm high high[1]
                
    float minus_dm low[1] - low
                
    if plus_dm 0
                    plus_dm 
    := 0
                
    if minus_dm 0
                    minus_dm 
    := 0
                is_long 
    := plus_dm minus_dm
                sar 
    := is_long low[1] : high[1]

            
    ep := is_long high low
            af 
    := is_long af_init_long af_init_short

            
    if is_long
                
    if sar low[1]
                    
    sar := low[1]
                if 
    sar low
                    sar 
    := low
            
    else
                if 
    sar high[1]
                    
    sar := high[1]
                if 
    sar high
                    sar 
    := high

            result 
    := is_long sar : -sar
        
    else
            
    float new_sar sar af * (ep sar)

            if 
    is_long
                new_sar 
    := math.min(new_sarlow[1])
                
    new_sar := math.min(new_sarlow[2])
                if 
    low new_sar
                    is_long 
    := false
                    new_sar 
    := ep
                    
    if offset_on_reverse != 0
                        new_sar 
    := new_sar offset_on_reverse
                    ep 
    := low
                    af 
    := af_init_short
                
    else
                    if 
    high ep
                        ep 
    := high
                        af 
    := math.min(af af_longaf_max_long)
            else
                
    new_sar := math.max(new_sarhigh[1])
                
    new_sar := math.max(new_sarhigh[2])
                if 
    high new_sar
                    is_long 
    := true
                    new_sar 
    := ep
                    
    if offset_on_reverse != 0
                        new_sar 
    := new_sar offset_on_reverse
                    ep 
    := high
                    af 
    := af_init_long
                
    else
                    if 
    low ep
                        ep 
    := low
                        af 
    := math.min(af af_shortaf_max_short)

            
    sar := new_sar
            result 
    := is_long new_sar : -new_sar
        result

    // vme (AF) Deerleri
    i_af_h1 0.20   // Hzl 1
    i_af_h2 0.05   // Hzl 2
    i_af_de 0.02   // Denge
    i_af_y1 0.005  // Yava 1
    i_af_y2 0.001  // Yava 2
    i_af_mx 0.2    

    // Motorlar altr
    s_h1 sarext(0.00.0i_af_h1i_af_h1math.max(i_af_h1i_af_mx), i_af_h1i_af_h1math.max(i_af_h1i_af_mx))
    s_h2 sarext(0.00.0i_af_h2i_af_h2math.max(i_af_h2i_af_mx), i_af_h2i_af_h2math.max(i_af_h2i_af_mx))
    s_de sarext(0.00.0i_af_dei_af_demath.max(i_af_dei_af_mx), i_af_dei_af_demath.max(i_af_dei_af_mx))
    s_y1 sarext(0.00.0i_af_y1i_af_y1math.max(i_af_y1i_af_mx), i_af_y1i_af_y1math.max(i_af_y1i_af_mx))
    s_y2 sarext(0.00.0i_af_y2i_af_y2math.max(i_af_y2i_af_mx), i_af_y2i_af_y2math.max(i_af_y2i_af_mx))


    // ==========================================
    // 2. HAKK AYNA (SMETRK HEDEF HESAPLAMASI)
    // ==========================================
    // Denge (0.02) motorunun mesafesini alp fiyatn kar tarafna yanstan Ayna Forml
    float s_de_abs math.abs(s_de)
    bool is_de_up s_de 0
    float delta_de 
    math.abs(close s_de_abs)
    float raw_mirror is_de_up close delta_de close delta_de
    float ayna_hma 
    ta.hma(raw_mirror55// Przszletirilmi Yansma Hedefi

    // ==========================================
    // 3. HAFIZA VE KIRILIM MANTII
    // ==========================================
    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
    var float p_y1 na, var float n_y1 na
    var float p_y2 na, var float n_y2 na

    bool is_p_h1 
    s_h1 0
    bool is_p_h2 
    s_h2 0
    bool is_p_de 
    s_de 0
    bool is_p_y1 
    s_y1 0
    bool is_p_y2 
    s_y2 0

    if is_p_h1
        p_h1 
    := math.abs(s_h1)
    else
        
    n_h1 := math.abs(s_h1)

    if 
    is_p_h2
        p_h2 
    := math.abs(s_h2)
    else
        
    n_h2 := math.abs(s_h2)

    if 
    is_p_de
        p_de 
    := math.abs(s_de)
    else
        
    n_de := math.abs(s_de)

    if 
    is_p_y1
        p_y1 
    := math.abs(s_y1)
    else
        
    n_y1 := math.abs(s_y1)

    if 
    is_p_y2
        p_y2 
    := math.abs(s_y2)
    else
        
    n_y2 := math.abs(s_y2)

    bool prev_h1 bar_index is_p_h1[1] : is_p_h1
    bool prev_h2 
    bar_index is_p_h2[1] : is_p_h2
    bool prev_de 
    bar_index is_p_de[1] : is_p_de
    bool prev_y1 
    bar_index is_p_y1[1] : is_p_y1
    bool prev_y2 
    bar_index is_p_y2[1] : is_p_y2

    bool brk_h1_neg 
    prev_h1 and not is_p_h1 
    bool brk_h1_pos 
    not prev_h1 and is_p_h1 
    bool brk_h2_neg 
    prev_h2 and not is_p_h2
    bool brk_h2_pos 
    not prev_h2 and is_p_h2
    bool brk_de_neg 
    prev_de and not is_p_de
    bool brk_de_pos 
    not prev_de and is_p_de
    bool brk_y1_neg 
    prev_y1 and not is_p_y1
    bool brk_y1_pos 
    not prev_y1 and is_p_y1
    bool brk_y2_neg 
    prev_y2 and not is_p_y2
    bool brk_y2_pos 
    not prev_y2 and is_p_y2

    // ==========================================
    // 4. AI EKRANA ZME VE HESAPLAMALAR
    // ==========================================
    plot(is_p_h1 math.abs(s_h1) : na"H1 (+)"color=color.new(color.yellow0), style=plot.style_crosslinewidth=2)
    plot(not is_p_h1 math.abs(s_h1) : na"H1 (-)"color=color.new(color.yellow0),  style=plot.style_crosslinewidth=2)

    plot(is_p_h2 math.abs(s_h2) : na"H2 (+)"color=color.new(color.yellow0), style=plot.style_crosslinewidth=2)
    plot(not is_p_h2 math.abs(s_h2) : na"H2 (-)"color=color.new(color.yellow0), style=plot.style_crosslinewidth=2)

    plot(is_p_de math.abs(s_de) : na"D(+)"color=color.new(color.lime0), style=plot.style_linelinewidth=2)
    plot(not is_p_de math.abs(s_de) : na"D(-)"color=color.new(color.red0),  style=plot.style_linelinewidth=2)

    // ALTIN AYNAYI ZME (Gelecek Hedefi)
    //plot(ayna_hma, "SarAyna", color=color.new(#f700ff, 0), linewidth=2, style=plot.style_line)

    plot(is_p_y1 math.abs(s_y1) : na"Y1 (+)"color=color.new(color.blue0), style=plot.style_crosslinewidth=2
    plot(not is_p_y1 math.abs(s_y1) : na"Y1 (-)"color=color.new(color.blue0), style=plot.style_crosslinewidth=2

    plot(is_p_y2 math.abs(s_y2) : na"Y2 (+)"color=color.new(color.blue0),   style=plot.style_crosslinewidth=2)
    plot(not is_p_y2 math.abs(s_y2) : na"Y2 (-)"color=color.new(color.blue0), style=plot.style_crosslinewidth=2)

    float avg_sar_val = (math.abs(s_h1) + math.abs(s_h2) + math.abs(s_de) + math.abs(s_y1) + math.abs(s_y2)) / 5.0

    // TEMZ HAVA SAHASI: DURUM HESAPLAMASI
    bool durum_al = (close n_de) and (close p_h1) and (close n_h1) and (close p_h2) and (close n_h2)
    bool durum_sat = (close p_de) and (close p_h1) and (close n_h1) and (close p_h2) and (close n_h2)

    string durum_metni durum_al "AL" durum_sat "SAT" "BEKLE"
    color durum_rengi  durum_al color.lime durum_sat color.red color.gray
    color durum_yazi_rengi 
    durum_al color.black durum_sat color.white color.black

    // ==========================================
    // 5. MOMENTUM RADARLI KOMUTA MERKEZ
    // ==========================================
    var table dash table.new(position.top_right316border_width 1border_color color.new(color.gray80))

    if 
    barstate.islast
        table
    .cell(dash00"@yrk@ Yatrm Tavsiyesi DELDR."text_color=color.whitebgcolor=color.new(color.black0), text_size=size.normaltext_halign=text.align_center)
        
    table.merge_cells(dash0020)
        
        
    table.cell(dash01"Anlk Fiyat:"text_color=color.whitebgcolor=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)

        
    table.cell(dash02"Ortak Merkez (Ort):"text_color=color.yellowbgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash12str.tostring(avg_sar_valformat.mintick), text_color=color.yellowbgcolor=color.new(color.black40), text_halign=text.align_right)
        
    table.merge_cells(dash1222)

        
    table.cell(dash03"Genel Durum:"text_color=color.whitebgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash13durum_metnitext_color=durum_yazi_rengibgcolor=durum_rengitext_halign=text.align_right)
        
    table.merge_cells(dash1323)

        
    // ALTIN AYNA HEDEF SATIRI EKLEND
        
    table.cell(dash04"Hedef (TP/SL):"text_color=#FFD700, bgcolor=color.new(color.black, 40), text_halign=text.align_left)
        
    table.cell(dash14str.tostring(ayna_hmaformat.mintick), text_color=#FFD700, bgcolor=color.new(color.black, 40), text_halign=text.align_right)
        
    table.cell(dash24is_de_up "DREN" "DESTEK"text_color=color.blackbgcolor=#FFD700, text_halign=text.align_center)

        // --- HIZLI 1 (0.20) ---
        
    c_bg_p1 brk_h1_neg color.yellow color.new(color.black40)
        
    c_tx_p1 brk_h1_neg color.black : (is_p_h1 color.lime color.gray)
        
    t_st_p1 brk_h1_neg "KIRILDI!" : (is_p_h1 "AKTF (+)" "Pasif")
        
    table.cell(dash05"Hzl 1 (+):"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash15str.tostring(p_h1format.mintick), text_color=c_tx_p1bgcolor=c_bg_p1text_halign=text.align_right)
        
    table.cell(dash25t_st_p1text_color=c_tx_p1bgcolor=c_bg_p1text_halign=text.align_center)

        
    c_bg_n1 brk_h1_pos color.yellow color.new(color.black40)
        
    c_tx_n1 brk_h1_pos color.black : (not is_p_h1 color.red color.gray)
        
    t_st_n1 brk_h1_pos "KIRILDI!" : (not is_p_h1 "AKTF (-)" "Pasif")
        
    table.cell(dash06"Hzl 1 (-):"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash16str.tostring(n_h1format.mintick), text_color=c_tx_n1bgcolor=c_bg_n1text_halign=text.align_right)
        
    table.cell(dash26t_st_n1text_color=c_tx_n1bgcolor=c_bg_n1text_halign=text.align_center)

        
    // --- HIZLI 2 (0.05) ---
        
    c_bg_p2 brk_h2_neg color.yellow color.new(color.black40)
        
    c_tx_p2 brk_h2_neg color.black : (is_p_h2 color.lime color.gray)
        
    t_st_p2 brk_h2_neg "KIRILDI!" : (is_p_h2 "AKTF (+)" "Pasif")
        
    table.cell(dash07"Hzl 2 (+):"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash17str.tostring(p_h2format.mintick), text_color=c_tx_p2bgcolor=c_bg_p2text_halign=text.align_right)
        
    table.cell(dash27t_st_p2text_color=c_tx_p2bgcolor=c_bg_p2text_halign=text.align_center)

        
    c_bg_n2 brk_h2_pos color.yellow color.new(color.black40)
        
    c_tx_n2 brk_h2_pos color.black : (not is_p_h2 color.red color.gray)
        
    t_st_n2 brk_h2_pos "KIRILDI!" : (not is_p_h2 "AKTF (-)" "Pasif")
        
    table.cell(dash08"Hzl 2 (-):"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash18str.tostring(n_h2format.mintick), text_color=c_tx_n2bgcolor=c_bg_n2text_halign=text.align_right)
        
    table.cell(dash28t_st_n2text_color=c_tx_n2bgcolor=c_bg_n2text_halign=text.align_center)

        
    // --- DENGE (0.02) ---
        
    c_bg_pd brk_de_neg color.yellow color.new(color.black40)
        
    c_tx_pd brk_de_neg color.black : (is_p_de color.lime color.gray)
        
    t_st_pd brk_de_neg "KIRILDI!" : (is_p_de "AKTF (+)" "Pasif")
        
    table.cell(dash09"Denge   (+):"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash19str.tostring(p_deformat.mintick), text_color=c_tx_pdbgcolor=c_bg_pdtext_halign=text.align_right)
        
    table.cell(dash29t_st_pdtext_color=c_tx_pdbgcolor=c_bg_pdtext_halign=text.align_center)

        
    c_bg_nd brk_de_pos color.yellow color.new(color.black40)
        
    c_tx_nd brk_de_pos color.black : (not is_p_de color.red color.gray)
        
    t_st_nd brk_de_pos "KIRILDI!" : (not is_p_de "AKTF (-)" "Pasif")
        
    table.cell(dash010"Denge   (-):"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash110str.tostring(n_deformat.mintick), text_color=c_tx_ndbgcolor=c_bg_ndtext_halign=text.align_right)
        
    table.cell(dash210t_st_ndtext_color=c_tx_ndbgcolor=c_bg_ndtext_halign=text.align_center)

        
    // --- YAVA 1 (0.005) ---
        
    c_bg_py1 brk_y1_neg color.yellow color.new(color.black40)
        
    c_tx_py1 brk_y1_neg color.black : (is_p_y1 color.lime color.gray)
        
    t_st_py1 brk_y1_neg "KIRILDI!" : (is_p_y1 "AKTF (+)" "Pasif")
        
    table.cell(dash011"Yava 1 (+):"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash111str.tostring(p_y1format.mintick), text_color=c_tx_py1bgcolor=c_bg_py1text_halign=text.align_right)
        
    table.cell(dash211t_st_py1text_color=c_tx_py1bgcolor=c_bg_py1text_halign=text.align_center)

        
    c_bg_ny1 brk_y1_pos color.yellow color.new(color.black40)
        
    c_tx_ny1 brk_y1_pos color.black : (not is_p_y1 color.red color.gray)
        
    t_st_ny1 brk_y1_pos "KIRILDI!" : (not is_p_y1 "AKTF (-)" "Pasif")
        
    table.cell(dash012"Yava 1 (-):"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash112str.tostring(n_y1format.mintick), text_color=c_tx_ny1bgcolor=c_bg_ny1text_halign=text.align_right)
        
    table.cell(dash212t_st_ny1text_color=c_tx_ny1bgcolor=c_bg_ny1text_halign=text.align_center)

        
    // --- YAVA 2 (0.001) ---
        
    c_bg_py2 brk_y2_neg color.yellow color.new(color.black40)
        
    c_tx_py2 brk_y2_neg color.black : (is_p_y2 color.lime color.gray)
        
    t_st_py2 brk_y2_neg "KIRILDI!" : (is_p_y2 "AKTF (+)" "Pasif")
        
    table.cell(dash013"Yava 2 (+):"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash113str.tostring(p_y2format.mintick), text_color=c_tx_py2bgcolor=c_bg_py2text_halign=text.align_right)
        
    table.cell(dash213t_st_py2text_color=c_tx_py2bgcolor=c_bg_py2text_halign=text.align_center)

        
    c_bg_ny2 brk_y2_pos color.yellow color.new(color.black40)
        
    c_tx_ny2 brk_y2_pos color.black : (not is_p_y2 color.red color.gray)
        
    t_st_ny2 brk_y2_pos "KIRILDI!" : (not is_p_y2 "AKTF (-)" "Pasif")
        
    table.cell(dash014"Yava 2 (-):"text_color=color.graybgcolor=color.new(color.black40), text_halign=text.align_left)
        
    table.cell(dash114str.tostring(n_y2format.mintick), text_color=c_tx_ny2bgcolor=c_bg_ny2text_halign=text.align_right)
        
    table.cell(dash214t_st_ny2text_color=c_tx_ny2bgcolor=c_bg_ny2text_halign=text.align_center)

    // ==========================================
    // 6. SAVA BORUSU (ALARM ENTEGRASYONU)
    // ==========================================
    alertcondition(durum_al and barstate.isconfirmedtitle="🟢 HCUM: Temiz Hava Sahas!"message="Btn direnler krld! Yn: YUKARI (AL)")
    alertcondition(durum_sat and barstate.isconfirmedtitle="🔴 D: Ar Bask!"message="Btn destekler krld! Yn: AAI (SAT)")
    //////////////
    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 3. FT AYNALI OMURGA MOTORU (12 ve 32)                                      │
    // └──────────────────────────────────────────────────────────────────────────────┘
    float s_start_sabit 0.08
    float s_inc_sabit   
    0.05
    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)

    // GNE (32) VE AY (12) YRNGELER
    float ayna_12 f_katman_ana(s_start_sabits_inc_sabits_max_sabit22)
    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)

    aort= (ayna_12+ayna_32)/2
    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 lk", color=col_ayna_12, linewidth=2, style=plot.style_stepline)
    //plot(ayna_32, "Ayna Son", color=col_ayna_32, linewidth=2, style=plot.style_stepline)
    plot(aort"@yrk@"color=col_ayna_32linewidth=2style=plot.style_stepline)

    // ==========================================
    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 1. SAR MOTORLARI (HIZLI VE YAVA)                                            │
    // └──────────────────────────────────────────────────────────────────────────────┘
    float yemre ta.sar(0.010.010.2
    float yusuf ta.sar(0.010.050.2)
    float fato ta.sar(0.010.090.2)
    float mf = (yemre yusuf fato) / 3

    // ==========================================
    // 5. KALKAN GC (MUM BOYAMA)
    // ==========================================
    int kalkan 0
    if close yemre 
        kalkan 
    += 1
    if close yusuf 
        kalkan 
    += 1
    if close fato 
        kalkan 
    += 1

    if close yemre and close mf
        kalkan 
    += 1
    if close yusuf and close mf
        kalkan 
    += 1
    if close fato and close mf
        kalkan 
    += 1

    color bar_col 
    na
    if kalkan >= 3
        bar_col 
    := close mf color.rgb(025513250) : color.rgb(2504450)
    else if 
    kalkan == 2
        bar_col 
    := color.rgb(215249)
    else
        
    bar_col := color.rgb(2123249)

    barcolor(bar_col)

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

    //////////////////

    // MZA
    var table ytd_table table.new(position.bottom_center11)
    if 
    barstate.islast
        table
    .cell(ytd_table00"(A) Eitim almasdr. Yatrm tavsiyesi KULLANILAMAZ."text_color=color.new(color.white00), text_size=size.normal)
    /////////////////

    // ─────────────────────────────────────────────────────────────────
    //  MTK-1-2-3 DARE FORMLU PSAR MOTORU
    // ─────────────────────────────────────────────────────────────────
    f_ozel_sar33(src_hsrc_l_start_inc_max_reset_hiz) =>
        var 
    int trend 0
        
    var float sar_val 0.0
        
    var float ep 0.0
        
    var float af 0.0

        
    if trend == and not na(src_h[1])
            
    trend   := src_h >= src_h[1] or src_l >= src_l[1] ? : -1
            sar_val 
    := trend src_l[1] : src_h[1]
            
    ep      := trend src_h[1] : src_l[1]
            
    af      := _start
        
    else 
            if 
    _reset_hiz
                af 
    := _start

            float nextsar 
    sar_val
            
    if trend 0
                
    if src_h[1] > ep
                    ep 
    := src_h[1]
                    
    af := math.min(_maxaf _inc)
                
                
    nextsar := sar_val af * (ep sar_val)
                
    nextsar := math.min(math.min(src_l[1], src_l[2]), nextsar)
                
                if 
    nextsar src_l
                    trend   
    := -1
                    nextsar 
    := ep
                    ep      
    := src_l
                    af      
    := _start
            
    else 
                if 
    src_l[1] < ep
                    ep 
    := src_l[1]
                    
    af := math.min(_maxaf _inc)
                
                
    nextsar := sar_val af * (ep sar_val)
                
    nextsar := math.max(math.max(src_h[1], src_h[2]), nextsar)
                
                if 
    nextsar src_h
                    trend   
    := 1
                    nextsar 
    := ep
                    ep      
    := src_h
                    af      
    := _start
                    
            sar_val 
    := nextsar
        
        
    [sar_valtrend]

    // ─────────────────────────────────────────────────────────────────
    //  HESAPLAMALAR VE EKM
    // ─────────────────────────────────────────────────────────────────
    yeni_gun ta.change(time("D")) != 0

    // Orijinal kodda belirtilen (0.01 - 0.02 - 0.03) ivme deerlerine gre ekimler
    [roSarSlow_]     = f_ozel_sar33(highlow0.0.010.2yeni_gun)
    [
    roSarModerate_] = f_ozel_sar33(highlow0.0.020.2yeni_gun)
    [
    roSarFast_]     = f_ozel_sar33(highlow0.0.030.2yeni_gun)

    // ─────────────────────────────────────────────────────────────────
    //  ZMLER
    // ─────────────────────────────────────────────────────────────────
    plot(roSarSlow,     title="C"color=color.new(color.lime0),  style=plot.style_crosslinewidth=1)
    plot(roSarModeratetitle="B",  color=color.new(color.yellow0), style=plot.style_crosslinewidth=1)
    plot(roSarFast,     title="A"color=color.new(color.white0),   style=plot.style_crosslinewidth=1
    16.07.2024 - 10.12.2024

  4. deneme...
    PHP Code:
    //@version=6
    indicator(":]"overlay=falsemax_labels_count=500)
    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 1. SAR MOTORLARI (HIZLI VE YAVA)                                            │
    // └──────────────────────────────────────────────────────────────────────────────┘
    float s_fast_1 ta.sar(0.010.010.2
    float s_fast_2 ta.sar(0.010.050.2)
    float s_fast_3 ta.sar(0.040.040.2)

    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)


    // ┌──────────────────────────────────────────────────────────────────────────────┐
    // │ 3. NC AYNA (12) VE ALAN (RANGE) BELRLEME                                  │
    // └──────────────────────────────────────────────────────────────────────────────┘
    float s_start_sabit 0.01
    float s_inc_sabit   
    0.01
    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)

    // Sadece nc Ayna'y (12) hesaplyoruz
    float ayna_oncu f_katman_ana(s_start_sabits_inc_sabits_max_sabit12)
    plot(ayna_oncu"@yrk@"color=color.new(color.white0), style=plot.style_stepline_diamondlinewidth=1)

    // nc Ayna'nn Tepelerini (Diren) ve Diplerini (Destek) bulma mant
    // Ayna yn deitirdiinde (kavis yaptnda) o noktay mhrler.
    bool ayna_dondu_asagi ayna_oncu ayna_oncu[1] and ayna_oncu[1] > ayna_oncu[2]
    bool ayna_dondu_yukari ayna_oncu ayna_oncu[1] and ayna_oncu[1] < ayna_oncu[2]

    var 
    float ayna_tepe na
    var float ayna_dip  na

    if ayna_dondu_asagi
        ayna_tepe 
    := ayna_oncu[1]

    if 
    ayna_dondu_yukari
        ayna_dip 
    := ayna_oncu[1]

    // ALAN (SAVA MEYDANI) ZM
    plot(ayna_tepe"(Diren)"color=color.new(color.red00), style=plot.style_linebrlinewidth=2)
    plot(ayna_dip"(Destek)"color=color.new(color.lime00), style=plot.style_linebrlinewidth=2)
    //////////////

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

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

    float avg_fast = (s_fast_1 s_fast_2 s_fast_3) / 3

    // ==========================================
    // 3. YAPAY ZEKA (DL) MODL (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 katsays
    float ai_factor = (0.2 + (math.abs(dl_val) * 0.5)) * ayar_genislik

    // ==========================================
    // 4. DNAMK RENKL ATMOSFER (3 KADEMEL NANGAH)
    // ==========================================
    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.lime all_fast_above color.red 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 Oranlarn: 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 Hazrlanmas
    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 dtan (effaf) en ie (koyu) doru boyama yapyoruz ki renkler ezilmesin
    fill(p_swing_top,  p_swing_bot,  color=color.new(base_color00), title="Swing Alan (2.0x)")
    fill(p_trend_top,  p_trend_bot,  color=color.new(base_color00), title="Trend Alan (1.0x)")
    fill(p_vurkac_topp_vurkac_botcolor=color.new(base_color00), title="Vurka Alan (0.5x)")

    // ==========================================
    // 5. KALKAN GC (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(0255132) : color.rgb(25044)
    else if 
    kalkan == 2
        bar_col 
    := color.rgb(215249)
    else
        
    bar_col := color.rgb(2123249)

    barcolor(bar_col)

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

    ////////////////// 
    16.07.2024 - 10.12.2024

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

    // ─────────────────────────────────────────────────────────────────
    //  1. ZIT KUTUPLARIN GRDLER
    // ─────────────────────────────────────────────────────────────────
    // YANG (ATE): Hzl balar, abuk tkanr.
    y_start input.float(0.05"Yang (Ate) Balang"step=0.01)
    y_inc   input.float(0.01"Yang (Ate) vme"step=0.01)
    y_max   input.float(0.08"Yang (Ate) Max"step=0.01)

    // YN (SU): Yava balar,  gibi byr, snr yoktur.
    i_start input.float(0.005"Yin (Su) Balang"step=0.001)
    i_inc   input.float(0.05,  "Yin (Su) vme"step=0.01)
    i_max   input.float(0.50,  "Yin (Su) Max"step=0.05)

    // ─────────────────────────────────────────────────────────────────
    //  2. ORTAK SAR MOTORU
    // ─────────────────────────────────────────────────────────────────
    f_ozel_sar(src_hsrc_l_start_inc_max) =>
        var 
    int trend 0
        
    var float sar_val 0.0
        
    var float ep 0.0
        
    var float af 0.0

        
    if trend == and not na(src_h[1])
            
    trend   := src_h >= src_h[1] or src_l >= src_l[1] ? : -1
            sar_val 
    := trend src_l[1] : src_h[1]
            
    ep      := trend src_h[1] : src_l[1]
            
    af      := _start
        
    else 
            
    float nextsar sar_val
            
    if trend 0
                
    if src_h[1] > ep
                    ep 
    := src_h[1]
                    
    af := math.min(_maxaf _inc)
                
    nextsar := sar_val af * (ep sar_val)
                
    nextsar := math.min(math.min(src_l[1], src_l[2]), nextsar)
                if 
    nextsar src_l
                    trend   
    := -1
                    nextsar 
    := ep
                    ep      
    := src_l
                    af      
    := _start
            
    else 
                if 
    src_l[1] < ep
                    ep 
    := src_l[1]
                    
    af := math.min(_maxaf _inc)
                
    nextsar := sar_val af * (ep sar_val)
                
    nextsar := math.max(math.max(src_h[1], src_h[2]), nextsar)
                if 
    nextsar src_h
                    trend   
    := 1
                    nextsar 
    := ep
                    ep      
    := src_h
                    af      
    := _start
            sar_val 
    := nextsar
        
    [sar_valtrend]

    // ─────────────────────────────────────────────────────────────────
    //  3. YN, YANG VE AYNA HESAPLAMALARI
    // ─────────────────────────────────────────────────────────────────
    [sar_yangdir_yang] = f_ozel_sar(highlowy_starty_incy_max)
    [
    sar_yindir_yin]   = f_ozel_sar(highlowi_starti_inci_max)

    // *** AYNA HESAPLAMALARI ***
    // Ayna mant: Fiyat ile SAR arasndaki mesafeyi kar tarafa yanst
    ayna_yang close + (close sar_yang)
    ayna_yin  close + (close sar_yin)

    // ─────────────────────────────────────────────────────────────────
    //  4. AHENK VE KAOS (MUM RENKLER)
    // ─────────────────────────────────────────────────────────────────
    bool ahenk_boga = (dir_yang 0) and (dir_yin 0)
    bool ahenk_ayi  = (dir_yang 0) and (dir_yin 0)

    // Renklendirme: kisi ayn yndeyse Trend (Ahenk), farkl yndeyse Flat (Kaos/Pusu)
    barcolor(ahenk_boga color.lime ahenk_ayi color.red color.new(color.gray60))

    // ─────────────────────────────────────────────────────────────────
    //  5. GRSEL LEN (ZMLER)
    // ─────────────────────────────────────────────────────────────────
    // YN (SU) Noktalar - Derinden gelir, kaln ve mavidir.
    color col_yin dir_yin color.aqua color.blue
    plot
    (sar_yintitle="(0)"color=col_yinstyle=plot.style_circleslinewidth=3)

    // YANG (ATE) Noktalar - Fiyata yapktr, ince ve turuncudur.
    color col_yang dir_yang color.orange color.maroon
    plot
    (sar_yangtitle="(1)"color=col_yangstyle=plot.style_circleslinewidth=1)

    // *** AYNA ZMLER ***
    // YN (SU) Aynas
    color col_ayna_yin dir_yin color.new(color.aqua50) : color.new(color.blue50)
    plot(ayna_yintitle="(0)A"color=col_ayna_yinstyle=plot.style_linelinewidth=1)

    // YANG (ATE) Aynas
    color col_ayna_yang dir_yang color.new(color.orange50) : color.new(color.maroon50)
    plot(ayna_yangtitle="(1)A"color=col_ayna_yangstyle=plot.style_linelinewidth=1)

    // ─────────────────────────────────────────────────────────────────
    //  6. KESM UYARISI (DOYGUNLUK VE DNAMK RENK)
    // ─────────────────────────────────────────────────────────────────
    // Su, Ate'i yakaladnda (Trend doygunlua ulatnda) uyar ver!
    bool kesisim ta.cross(sar_yinsar_yang)

    // Doygunluk Ynne Gre Renk: AL (Ykseli) ise SARI, SAT (D) ise BEYAZ
    color kesisim_renk dir_yang color.yellow color.white

    plotshape
    (kesisim sar_yin natitle="Doygunluk Kesiimi"style=shape.xcrosslocation=location.absolutecolor=kesisim_renksize=size.small
    16.07.2024 - 10.12.2024

  6. PHP Code:
    //@version=6
    indicator(":]"overlay=truemax_labels_count=500)

    // ─────────────────────────────────────────────────────────────────
    //  1. ZIT KUTUPLARIN GRDLER (YN & YANG)
    // ─────────────────────────────────────────────────────────────────
    y_start input.float(0.05"Yang (Ate) Balang"step=0.01)
    y_inc   input.float(0.01"Yang (Ate) vme"step=0.01)
    y_max   input.float(0.08"Yang (Ate) Max"step=0.01)

    i_start input.float(0.005"Yin (Su) Balang"step=0.001)
    i_inc   input.float(0.05,  "Yin (Su) vme"step=0.01)
    i_max   input.float(0.50,  "Yin (Su) Max"step=0.05)

    // ─────────────────────────────────────────────────────────────────
    //  2. STATSTKSEL VOLATLTE GRDLER
    // ─────────────────────────────────────────────────────────────────
    grp_vol "statistiksel Hedef (Sigma) Ayarlar"
    volLength   input.int(20,  "Oynaklk Uzunluu (Mum)"minval 5,  maxval 100group grp_vol)
    projBars    input.int(5,  "leriye Projeksiyon (Mum)",  minval 5,  maxval 80,  group grp_vol)
    barsPerYear input.int(50"Yllk Mum arpan",    minval 50maxval 365group grp_vol)

    // ─────────────────────────────────────────────────────────────────
    //  3. ORTAK SAR MOTORU VE OTONOM BEYN (TPLER)
    // ─────────────────────────────────────────────────────────────────
    f_ozel_sar(src_hsrc_l_start_inc_max) =>
        var 
    int trend 0
        
    var float sar_val 0.0
        
    var float ep 0.0
        
    var float af 0.0

        
    if trend == and not na(src_h[1])
            
    trend   := src_h >= src_h[1] or src_l >= src_l[1] ? : -1
            sar_val 
    := trend src_l[1] : src_h[1]
            
    ep      := trend src_h[1] : src_l[1]
            
    af      := _start
        
    else 
            
    float nextsar sar_val
            
    if trend 0
                
    if src_h[1] > ep
                    ep 
    := src_h[1]
                    
    af := math.min(_maxaf _inc)
                
    nextsar := sar_val af * (ep sar_val)
                
    nextsar := math.min(math.min(src_l[1], src_l[2]), nextsar)
                if 
    nextsar src_l
                    trend   
    := -1
                    nextsar 
    := ep
                    ep      
    := src_l
                    af      
    := _start
            
    else 
                if 
    src_l[1] < ep
                    ep 
    := src_l[1]
                    
    af := math.min(_maxaf _inc)
                
    nextsar := sar_val af * (ep sar_val)
                
    nextsar := math.max(math.max(src_h[1], src_h[2]), nextsar)
                if 
    nextsar src_h
                    trend   
    := 1
                    nextsar 
    := ep
                    ep      
    := src_h
                    af      
    := _start
            sar_val 
    := nextsar
        
    [sar_valtrend]

    type SARState
        float sar_value
        float extreme_point
        float accel_factor
        bool  isLong

    method f_initState
    (float accel_start) => SARState.new(nanaaccel_startfalse)

    method f_updateState(SARState statefloat high_valfloat low_valfloat close_valfloat accel_startfloat accel_incfloat accel_max) =>
        
    bool isInitialTrend false
        
    if na(state.sar_value)
            if 
    close_val close_val[1]
                
    state.isLong        := true
                state
    .extreme_point := high_val
                state
    .sar_value     := low_val[1]
            else
                
    state.isLong        := false
                state
    .extreme_point := low_val
                state
    .sar_value     := high_val[1]
            
    isInitialTrend          := true
            state
    .accel_factor      := accel_start
            
        state
    .sar_value += state.accel_factor * (state.extreme_point state.sar_value)
        
        if 
    state.isLong
            
    if state.sar_value low_val
                isInitialTrend      
    := true
                state
    .isLong        := false
                state
    .sar_value     := math.max(high_valstate.extreme_point)
                
    state.extreme_point := low_val
                state
    .accel_factor  := accel_start
        
    else
            if 
    state.sar_value high_val
                isInitialTrend      
    := true
                state
    .isLong        := true
                state
    .sar_value     := math.min(low_valstate.extreme_point)
                
    state.extreme_point := high_val
                state
    .accel_factor  := accel_start
                
        
    if not isInitialTrend
            
    if state.isLong
                
    if high_val state.extreme_point
                    state
    .extreme_point := high_val
                    state
    .accel_factor  := math.min(state.accel_factor accel_incaccel_max)
            else
                if 
    low_val state.extreme_point
                    state
    .extreme_point := low_val
                    state
    .accel_factor  := math.min(state.accel_factor accel_incaccel_max)
                    
        if 
    bar_index 1
            
    if state.isLong
                state
    .sar_value := math.min(state.sar_valuelow_val[1])
                if 
    bar_index 2
                    state
    .sar_value := math.min(state.sar_valuelow_val[2])
            else
                
    state.sar_value := math.max(state.sar_valuehigh_val[1])
                if 
    bar_index 2
                    state
    .sar_value := math.max(state.sar_valuehigh_val[2])
        
    state

    // ─────────────────────────────────────────────────────────────────
    //  4. YN, YANG VE AYNA HESAPLAMALARI (NC HEDEFLER)
    // ─────────────────────────────────────────────────────────────────
    [sar_yangdir_yang] = f_ozel_sar(highlowy_starty_incy_max)
    [
    sar_yindir_yin]   = f_ozel_sar(highlowi_starti_inci_max)

    // Fiyatn Merkezka Yansmas (nc Hedef izgileri)
    ayna_yang close + (close sar_yang)
    ayna_yin  close + (close sar_yin)

    // ─────────────────────────────────────────────────────────────────
    //  5. HARMONK SUPERTREND HESAPLAMASI (SENTEZ)
    // ─────────────────────────────────────────────────────────────────
    [y_fastdir_fast] = f_ozel_sar(highlow0.00.30.3)
    var 
    SARState y_auto f_initState(0.04)
    y_auto := y_auto.f_updateState(highlowclose0.00.040.2)

    float st_avg = (y_fast y_auto.sar_value) / 2

    var int trend_yon 0
    if dir_fast and y_auto.isLong
        trend_yon 
    := 1
    else if dir_fast and not y_auto.isLong
        trend_yon 
    := -1

    color col_st 
    trend_yon color.rgb(0230119100) : trend_yon color.rgb(2558282100) : color.new(color.yellow100)

    // ─────────────────────────────────────────────────────────────────
    //  6. YN-YANG APALI MALYET ZGS (ANCHORED VWAP)
    // ─────────────────────────────────────────────────────────────────
    bool kesisim ta.cross(sar_yinsar_yang)

    bool hacim_bozuk input.bool(true"Hacim Verim Gecikmeli (TWAP Kullan)")
    float vol_safe hacim_bozuk 1.0 nz(volume1.0)
    var 
    float sum_pv 0.0
    var float sum_v  0.0
    var int vwap_trend 0

    if kesisim
        sum_pv 
    := hlc3 vol_safe
        sum_v  
    := vol_safe
        vwap_trend 
    := dir_yang : -1
    else
        
    sum_pv += hlc3 vol_safe
        sum_v  
    += vol_safe

    float yy_vwap 
    sum_v sum_pv sum_v na

    bool ahenk_boga 
    = (dir_yang 0) and (dir_yin 0)
    bool ahenk_ayi  = (dir_yang 0) and (dir_yin 0)
    barcolor(ahenk_boga color.lime ahenk_ayi color.red color.new(color.yellow00))

    // ─────────────────────────────────────────────────────────────────
    //  7. KESKN NANCI TET (PULLBACK AVCISI)
    // ─────────────────────────────────────────────────────────────────
    float tetik_tolerans ta.atr(14) * 0.2

    bool vwap_degdi_long 
    low <= (yy_vwap tetik_tolerans) and close yy_vwap
    bool tetik_al 
    ahenk_boga and (trend_yon == 1) and vwap_degdi_long and not kesisim

    bool vwap_degdi_short 
    high >= (yy_vwap tetik_tolerans) and close yy_vwap
    bool tetik_sat 
    ahenk_ayi and (trend_yon == -1) and vwap_degdi_short and not kesisim

    var int son_sinyal 0
    if kesisim
        son_sinyal 
    := 

    bool gecerli_al 
    tetik_al and son_sinyal != 1
    bool gecerli_sat 
    tetik_sat and son_sinyal != -1

    if gecerli_al
        son_sinyal 
    := 1
    if gecerli_sat
        son_sinyal 
    := -1

    // ─────────────────────────────────────────────────────────────────
    //  8. ZMLER VE ETKETLER
    // ─────────────────────────────────────────────────────────────────
    // nc Hedef izgileri (Aynalar) - Kaln ve Belirgin izgiler!
    color col_ayna_yin dir_yin color.new(color.aqua15) : color.new(color.blue15)
    plot(ayna_yintitle="(0)A"color=col_ayna_yinstyle=plot.style_linelinewidth=2)

    color col_ayna_yang dir_yang color.new(color.orange15) : color.new(color.maroon15)
    plot(ayna_yangtitle="(1)A"color=col_ayna_yangstyle=plot.style_linelinewidth=2)

    // Harmonik SuperTrend
    plot(st_avgtitle="Trend"color=col_stlinewidth=2style=plot.style_linebr)

    // Yin ve Yang Noktalar
    color col_yin dir_yin color.aqua color.blue
    plot
    (sar_yintitle="(0)"color=col_yinstyle=plot.style_circleslinewidth=3)
    color col_yang dir_yang color.orange color.maroon
    plot
    (sar_yangtitle="(1)"color=col_yangstyle=plot.style_circleslinewidth=1)

    // VWAP izgisi
    color base_vwap_col vwap_trend == color.rgb(0230119100) : color.rgb(2558282100)
    color vwap_col = (ahenk_boga or ahenk_ayi) ? color.new(base_vwap_col100) : color.new(base_vwap_col100)
    plot(yy_vwaptitle="Maliyet"color=vwap_collinewidth=2style=plot.style_line)

    // Kesiim (Doygunluk) arps
    color kesisim_renk dir_yang color.yellow color.white
    plotshape
    (kesisim sar_yin natitle="Doygunluk Kesiimi"style=shape.xcrosslocation=location.absolutecolor=kesisim_renksize=size.small)

    // Tetiin ekilmesi (AL/SAT Etiketleri)
    plotshape(gecerli_al,  title="VUR (Long)",  style=shape.labelup,   location=location.belowbarcolor=color.limetext="AL"textcolor=color.blacksize=size.tiny)
    plotshape(gecerli_sattitle="VUR (Short)"style=shape.labeldownlocation=location.abovebarcolor=color.red,  text="SAT"textcolor=color.whitesize=size.tiny)

    alertcondition(gecerli_al,  title="Yrk Keskin Nianc: AL",  message="Fiyat Maliyet Trambolininden (VWAP) sekti. Harmonik Zrh Onayl: AL!")
    alertcondition(gecerli_sattitle="Yrk Keskin Nianc: SAT"message="Fiyat Maliyet Trambolininden (VWAP) reddedildi. Harmonik Zrh Onayl: SAT!")

    // ─────────────────────────────────────────────────────────────────
    //  9. STATSTKSEL VOLATLTE (SAF RAKAMLAR VE ETKETLER)
    // ─────────────────────────────────────────────────────────────────
    logReturn math.log(close close[1])
    rawVol    ta.stdev(logReturnvolLength)
    annualVol rawVol math.sqrt(barsPerYear)

    conePrice(float basePricefloat volint tfloat sigmaMultiplierint direction) =>
        
    drift direction sigmaMultiplier vol math.sqrt(float(t) / float(barsPerYear))
        
    basePrice math.exp(drift)

    var 
    label[] sigmaLabels = array.new<label>()

    if 
    barstate.islast
        
    if sigmaLabels.size() > 0
            
    for 0 to sigmaLabels.size() - 1
                label
    .delete(sigmaLabels.get(i))
            
    sigmaLabels.clear()

        
    float tip1up conePrice(closeannualVolprojBars1.0,  1)
        
    float tip1dn conePrice(closeannualVolprojBars1.0, -1)
        
    float tip2up conePrice(closeannualVolprojBars2.0,  1)
        
    float tip2dn conePrice(closeannualVolprojBars2.0, -1)

        
    int tipX bar_index projBars
        bool show_up 
    not ahenk_ayi
        bool show_dn 
    not ahenk_boga

        
    if show_up
            sigmaLabels
    .push(label.new(tipXtip1up"1σ (%68)\n" str.tostring(tip1upformat.mintick), color=color.new(color.lime80), textcolor=color.limestyle=label.style_label_leftsize=size.small))
            
    sigmaLabels.push(label.new(tipXtip2up"2σ (%95)\n" str.tostring(tip2upformat.mintick), color=color.new(color.lime80), textcolor=color.limestyle=label.style_label_leftsize=size.small))

        if 
    show_dn
            sigmaLabels
    .push(label.new(tipXtip1dn"1σ (%68)\n" str.tostring(tip1dnformat.mintick), color=color.new(color.red80), textcolor=color.redstyle=label.style_label_leftsize=size.small))
            
    sigmaLabels.push(label.new(tipXtip2dn"2σ (%95)\n" str.tostring(tip2dnformat.mintick), color=color.new(color.red80), textcolor=color.redstyle=label.style_label_leftsize=size.small))
    /////////////////
    cc ta.sar0.0.010.3)
    plot(cc,     title="@yrk@"color=color.new(color.white0), style=plot.style_crosslinewidth=2)
    // ─────────────────────────────────────────────────────────────────
    //  1. GRDLER VE HESAPLAMA
    // ─────────────────────────────────────────────────────────────────
    // Kullancnn belirttii zel SAR deerleri
    startValue     0.0
    incrementValue 
    0.001
    maxValue       
    0.2

    // Parabolic SAR Hesaplamas
    sarValue ta.sar(startValueincrementValuemaxValue)

    // SAR Konum Kontrol (Renk iin)
    sarAboveClose sarValue close

    // ─────────────────────────────────────────────────────────────────
    //  2. KIRILIM VE SEVYE TAKB
    // ─────────────────────────────────────────────────────────────────
    // Krlm anndaki seviyeleri hafzada tutmak iin deikenler
    var float supLevel na
    var float resLevel na

    // Krlm Durumlarn Kontrol Etme
    longBreak  ta.crossover(closesarValue)   // Fiyat SAR' yukar krd -> Destek olutu
    shortBreak ta.crossunder(closesarValue// Fiyat SAR' aa krd -> Diren olutu

    // Krlm annda seviyeleri gncelle
    if longBreak
        supLevel 
    := sarValue // Krlm anndaki SAR deeri destek olur
    if shortBreak
        resLevel 
    := sarValue // Krlm anndaki SAR deeri diren olur

    // ─────────────────────────────────────────────────────────────────
    //  3. ZMLER
    // ─────────────────────────────────────────────────────────────────

    // Destek izgisi (Yeil) - `plot.style_linebr` ile krlm anlarnda izgi kesilir
    plot(supLeveltitle="Destek (Long Stop)"color=color.new(color.green20), style=plot.style_linebrlinewidth=2)

    // Diren izgisi (Krmz)
    plot(resLeveltitle="Diren (Short Stop)"color=color.new(color.red20), style=plot.style_linebrlinewidth=2
    16.07.2024 - 10.12.2024

  7. PHP Code:
    //@version=6
    indicator(":]"overlay=truemax_labels_count=500)

    // ─────────────────────────────────────────────────────────────────
    //  1. ZIT KUTUPLARIN GRDLER (YN & YANG)
    // ─────────────────────────────────────────────────────────────────
    y_start input.float(0.05"Yang (Ate) Balang"step=0.01)
    y_inc   input.float(0.01"Yang (Ate) vme"step=0.01)
    y_max   input.float(0.08"Yang (Ate) Max"step=0.01)

    i_start input.float(0.005"Yin (Su) Balang"step=0.001)
    i_inc   input.float(0.05,  "Yin (Su) vme"step=0.01)
    i_max   input.float(0.50,  "Yin (Su) Max"step=0.05)

    // ─────────────────────────────────────────────────────────────────
    //  2. STATSTKSEL VOLATLTE GRDLER
    // ─────────────────────────────────────────────────────────────────
    grp_vol "statistiksel Hedef (Sigma) Ayarlar"
    volLength   input.int(20,  "Oynaklk Uzunluu (Mum)"minval 5,  maxval 100group grp_vol)
    projBars    input.int(5,  "leriye Projeksiyon (Mum)",  minval 5,  maxval 80,  group grp_vol)
    barsPerYear input.int(50"Yllk Mum arpan",    minval 50maxval 365group grp_vol)

    // ─────────────────────────────────────────────────────────────────
    //  3. ORTAK SAR MOTORU VE OTONOM BEYN (ADIM 1: YALANAN VE ASMETRK EKRDEK)
    // ─────────────────────────────────────────────────────────────────
    f_ozel_sar(src_hsrc_l_start_inc_max) =>
        var 
    int trend 0
        
    var int trend_age 0  // YEN: Trendin ka mumdur srdn sayar
        
    var float sar_val 0.0
        
    var float ep 0.0
        
    var float af 0.0

        
    if trend == and not na(src_h[1])
            
    trend     := src_h >= src_h[1] or src_l >= src_l[1] ? : -1
            trend_age 
    := 0
            sar_val   
    := trend src_l[1] : src_h[1]
            
    ep        := trend src_h[1] : src_l[1]
            
    af        := _start
        
    else 
            
    trend_age += 1
            float nextsar 
    sar_val
            
            
    // YEN: ASMETRK YALANMA (AGING)
            // Ykseliler (Boa) 50 mumda %10 ivmeye derek yorulur (Esnekleir)
            // Dler (Ay) 100 mumda %30 ivmeye der (Daha inat ve baskcdr)
            
    float decay_factor trend math.max(0.11.0 - (trend_age 50.0)) : math.max(0.31.0 - (trend_age 100.0))
            
    float yasli_inc    _inc decay_factor

            
    if trend 0
                
    if src_h[1] > ep
                    ep 
    := src_h[1]
                    
    af := math.min(_maxaf yasli_inc// Klasik inc yerine yorulan ivme kullanld
                
    nextsar := sar_val af * (ep sar_val)
                
    nextsar := math.min(math.min(src_l[1], src_l[2]), nextsar)
                if 
    nextsar src_l
                    trend     
    := -1
                    trend_age 
    := // Yn deitiinde ya sfrlanr
                    
    nextsar   := ep
                    ep        
    := src_l
                    af        
    := _start
            
    else 
                if 
    src_l[1] < ep
                    ep 
    := src_l[1]
                    
    af := math.min(_maxaf yasli_inc// Klasik inc yerine yorulan ivme kullanld
                
    nextsar := sar_val af * (ep sar_val)
                
    nextsar := math.max(math.max(src_h[1], src_h[2]), nextsar)
                if 
    nextsar src_h
                    trend     
    := 1
                    trend_age 
    := // Yn deitiinde ya sfrlanr
                    
    nextsar   := ep
                    ep        
    := src_h
                    af        
    := _start
            sar_val 
    := nextsar
        
    [sar_valtrend]

    type SARState
        float sar_value
        float extreme_point
        float accel_factor
        bool  isLong
        int   trend_age 
    // YEN EKLENT

    method f_initState(float accel_start) => SARState.new(nanaaccel_startfalse0)

    method f_updateState(SARState statefloat high_valfloat low_valfloat close_valfloat accel_startfloat accel_incfloat accel_max) =>
        
    bool isInitialTrend false
        
    if na(state.sar_value)
            if 
    close_val close_val[1]
                
    state.isLong        := true
                state
    .extreme_point := high_val
                state
    .sar_value     := low_val[1]
            else
                
    state.isLong        := false
                state
    .extreme_point := low_val
                state
    .sar_value     := high_val[1]
            
    isInitialTrend          := true
            state
    .accel_factor      := accel_start
            state
    .trend_age         := 0
        
    else
            
    state.trend_age += 1
            
        state
    .sar_value += state.accel_factor * (state.extreme_point state.sar_value)
        
        if 
    state.isLong
            
    if state.sar_value low_val
                isInitialTrend      
    := true
                state
    .isLong        := false
                state
    .sar_value     := math.max(high_valstate.extreme_point)
                
    state.extreme_point := low_val
                state
    .accel_factor  := accel_start
                state
    .trend_age     := // SIFIRLAMA
        
    else
            if 
    state.sar_value high_val
                isInitialTrend      
    := true
                state
    .isLong        := true
                state
    .sar_value     := math.min(low_valstate.extreme_point)
                
    state.extreme_point := high_val
                state
    .accel_factor  := accel_start
                state
    .trend_age     := // SIFIRLAMA
                
        // YEN: OTONOM BEYN N YALANMA
        
    float decay_factor state.isLong math.max(0.11.0 - (state.trend_age 50.0)) : math.max(0.31.0 - (state.trend_age 100.0))
        
    float yasli_inc    accel_inc decay_factor

        
    if not isInitialTrend
            
    if state.isLong
                
    if high_val state.extreme_point
                    state
    .extreme_point := high_val
                    state
    .accel_factor  := math.min(state.accel_factor yasli_incaccel_max)
            else
                if 
    low_val state.extreme_point
                    state
    .extreme_point := low_val
                    state
    .accel_factor  := math.min(state.accel_factor yasli_incaccel_max)
                    
        if 
    bar_index 1
            
    if state.isLong
                state
    .sar_value := math.min(state.sar_valuelow_val[1])
                if 
    bar_index 2
                    state
    .sar_value := math.min(state.sar_valuelow_val[2])
            else
                
    state.sar_value := math.max(state.sar_valuehigh_val[1])
                if 
    bar_index 2
                    state
    .sar_value := math.max(state.sar_valuehigh_val[2])
        
    state

    // ─────────────────────────────────────────────────────────────────
    //  4. YN, YANG VE AYNA HESAPLAMALARI (NC HEDEFLER)
    // ─────────────────────────────────────────────────────────────────
    [sar_yangdir_yang] = f_ozel_sar(highlowy_starty_incy_max)
    [
    sar_yindir_yin]   = f_ozel_sar(highlowi_starti_inci_max)

    // Fiyatn Merkezka Yansmas (nc Hedef izgileri)
    ayna_yang close + (close sar_yang)
    ayna_yin  close + (close sar_yin)

    // ─────────────────────────────────────────────────────────────────
    //  5. HARMONK SUPERTREND HESAPLAMASI (SENTEZ)
    // ─────────────────────────────────────────────────────────────────
    [y_fastdir_fast] = f_ozel_sar(highlow0.00.30.3)
    var 
    SARState y_auto f_initState(0.04)
    y_auto := y_auto.f_updateState(highlowclose0.00.040.2)

    float st_avg = (y_fast y_auto.sar_value) / 2

    var int trend_yon 0
    if dir_fast and y_auto.isLong
        trend_yon 
    := 1
    else if dir_fast and not y_auto.isLong
        trend_yon 
    := -1

    color col_st 
    trend_yon color.rgb(0230119100) : trend_yon color.rgb(2558282100) : color.new(color.yellow100)

    // ─────────────────────────────────────────────────────────────────
    //  6. YN-YANG APALI MALYET ZGS (ANCHORED VWAP)
    // ─────────────────────────────────────────────────────────────────
    bool kesisim ta.cross(sar_yinsar_yang)

    bool hacim_bozuk input.bool(true"Hacim Verim Gecikmeli (TWAP Kullan)")
    float vol_safe hacim_bozuk 1.0 nz(volume1.0)
    var 
    float sum_pv 0.0
    var float sum_v  0.0
    var int vwap_trend 0

    if kesisim
        sum_pv 
    := hlc3 vol_safe
        sum_v  
    := vol_safe
        vwap_trend 
    := dir_yang : -1
    else
        
    sum_pv += hlc3 vol_safe
        sum_v  
    += vol_safe

    float yy_vwap 
    sum_v sum_pv sum_v na

    bool ahenk_boga 
    = (dir_yang 0) and (dir_yin 0)
    bool ahenk_ayi  = (dir_yang 0) and (dir_yin 0)
    barcolor(ahenk_boga color.lime ahenk_ayi color.red color.new(color.yellow00))

    // ─────────────────────────────────────────────────────────────────
    //  7. KESKN NANCI TET (PULLBACK AVCISI)
    // ─────────────────────────────────────────────────────────────────
    float tetik_tolerans ta.atr(14) * 0.2

    bool vwap_degdi_long 
    low <= (yy_vwap tetik_tolerans) and close yy_vwap
    bool tetik_al 
    ahenk_boga and (trend_yon == 1) and vwap_degdi_long and not kesisim

    bool vwap_degdi_short 
    high >= (yy_vwap tetik_tolerans) and close yy_vwap
    bool tetik_sat 
    ahenk_ayi and (trend_yon == -1) and vwap_degdi_short and not kesisim

    var int son_sinyal 0
    if kesisim
        son_sinyal 
    := 

    bool gecerli_al 
    tetik_al and son_sinyal != 1
    bool gecerli_sat 
    tetik_sat and son_sinyal != -1

    if gecerli_al
        son_sinyal 
    := 1
    if gecerli_sat
        son_sinyal 
    := -1

    // ─────────────────────────────────────────────────────────────────
    //  8. ZMLER VE ETKETLER
    // ─────────────────────────────────────────────────────────────────
    // nc Hedef izgileri (Aynalar) - Kaln ve Belirgin izgiler!
    color col_ayna_yin dir_yin color.new(color.aqua15) : color.new(color.blue15)
    plot(ayna_yintitle="(0)A"color=col_ayna_yinstyle=plot.style_linelinewidth=2)

    color col_ayna_yang dir_yang color.new(color.orange15) : color.new(color.maroon15)
    plot(ayna_yangtitle="(1)A"color=col_ayna_yangstyle=plot.style_linelinewidth=2)

    // Harmonik SuperTrend
    plot(st_avgtitle="Trend"color=col_stlinewidth=2style=plot.style_linebr)

    // Yin ve Yang Noktalar
    color col_yin dir_yin color.aqua color.blue
    plot
    (sar_yintitle="(0)"color=col_yinstyle=plot.style_circleslinewidth=3)
    color col_yang dir_yang color.orange color.maroon
    plot
    (sar_yangtitle="(1)"color=col_yangstyle=plot.style_circleslinewidth=1)

    // VWAP izgisi
    color base_vwap_col vwap_trend == color.rgb(0230119100) : color.rgb(2558282100)
    color vwap_col = (ahenk_boga or ahenk_ayi) ? color.new(base_vwap_col100) : color.new(base_vwap_col100)
    plot(yy_vwaptitle="Maliyet"color=vwap_collinewidth=2style=plot.style_line)

    // Kesiim (Doygunluk) arps
    color kesisim_renk dir_yang color.yellow color.white
    plotshape
    (kesisim sar_yin natitle="Doygunluk Kesiimi"style=shape.xcrosslocation=location.absolutecolor=kesisim_renksize=size.small)

    // Tetiin ekilmesi (AL/SAT Etiketleri)
    plotshape(gecerli_al,  title="VUR (Long)",  style=shape.labelup,   location=location.belowbarcolor=color.limetext="AL"textcolor=color.blacksize=size.tiny)
    plotshape(gecerli_sattitle="VUR (Short)"style=shape.labeldownlocation=location.abovebarcolor=color.red,  text="SAT"textcolor=color.whitesize=size.tiny)

    alertcondition(gecerli_al,  title="Yrk Keskin Nianc: AL",  message="Fiyat Maliyet Trambolininden (VWAP) sekti. Harmonik Zrh Onayl: AL!")
    alertcondition(gecerli_sattitle="Yrk Keskin Nianc: SAT"message="Fiyat Maliyet Trambolininden (VWAP) reddedildi. Harmonik Zrh Onayl: SAT!")

    // ─────────────────────────────────────────────────────────────────
    //  9. STATSTKSEL VOLATLTE (SAF RAKAMLAR VE ETKETLER)
    // ─────────────────────────────────────────────────────────────────
    logReturn math.log(close close[1])
    rawVol    ta.stdev(logReturnvolLength)
    annualVol rawVol math.sqrt(barsPerYear)

    conePrice(float basePricefloat volint tfloat sigmaMultiplierint direction) =>
        
    drift direction sigmaMultiplier vol math.sqrt(float(t) / float(barsPerYear))
        
    basePrice math.exp(drift)

    var 
    label[] sigmaLabels = array.new<label>()

    if 
    barstate.islast
        
    if sigmaLabels.size() > 0
            
    for 0 to sigmaLabels.size() - 1
                label
    .delete(sigmaLabels.get(i))
            
    sigmaLabels.clear()

        
    float tip1up conePrice(closeannualVolprojBars1.0,  1)
        
    float tip1dn conePrice(closeannualVolprojBars1.0, -1)
        
    float tip2up conePrice(closeannualVolprojBars2.0,  1)
        
    float tip2dn conePrice(closeannualVolprojBars2.0, -1)

        
    int tipX bar_index projBars
        bool show_up 
    not ahenk_ayi
        bool show_dn 
    not ahenk_boga

        
    if show_up
            sigmaLabels
    .push(label.new(tipXtip1up"1σ (%68)\n" str.tostring(tip1upformat.mintick), color=color.new(color.lime80), textcolor=color.limestyle=label.style_label_leftsize=size.small))
            
    sigmaLabels.push(label.new(tipXtip2up"2σ (%95)\n" str.tostring(tip2upformat.mintick), color=color.new(color.lime80), textcolor=color.limestyle=label.style_label_leftsize=size.small))

        if 
    show_dn
            sigmaLabels
    .push(label.new(tipXtip1dn"1σ (%68)\n" str.tostring(tip1dnformat.mintick), color=color.new(color.red80), textcolor=color.redstyle=label.style_label_leftsize=size.small))
            
    sigmaLabels.push(label.new(tipXtip2dn"2σ (%95)\n" str.tostring(tip2dnformat.mintick), color=color.new(color.red80), textcolor=color.redstyle=label.style_label_leftsize=size.small))

    /////////////////
    cc ta.sar0.0.010.3)
    plot(cc,     title="@yrk@"color=color.new(color.white0), style=plot.style_crosslinewidth=2)
    // ─────────────────────────────────────────────────────────────────
    //  1. GRDLER VE HESAPLAMA
    // ─────────────────────────────────────────────────────────────────
    // Kullancnn belirttii zel SAR deerleri
    startValue     0.0
    incrementValue 
    0.001
    maxValue       
    0.2

    // Parabolic SAR Hesaplamas
    sarValue ta.sar(startValueincrementValuemaxValue)

    // SAR Konum Kontrol (Renk iin)
    sarAboveClose sarValue close

    // ─────────────────────────────────────────────────────────────────
    //  2. KIRILIM VE SEVYE TAKB
    // ─────────────────────────────────────────────────────────────────
    // Krlm anndaki seviyeleri hafzada tutmak iin deikenler
    var float supLevel na
    var float resLevel na

    // Krlm Durumlarn Kontrol Etme
    longBreak  ta.crossover(closesarValue)   // Fiyat SAR' yukar krd -> Destek olutu
    shortBreak ta.crossunder(closesarValue// Fiyat SAR' aa krd -> Diren olutu

    // Krlm annda seviyeleri gncelle
    if longBreak
        supLevel 
    := sarValue // Krlm anndaki SAR deeri destek olur
    if shortBreak
        resLevel 
    := sarValue // Krlm anndaki SAR deeri diren olur

    // ─────────────────────────────────────────────────────────────────
    //  3. ZMLER
    // ─────────────────────────────────────────────────────────────────

    // Destek izgisi (Yeil) - `plot.style_linebr` ile krlm anlarnda izgi kesilir
    plot(supLeveltitle="Destek (Long Stop)"color=color.new(color.green20), style=plot.style_linebrlinewidth=2)

    // Diren izgisi (Krmz)
    plot(resLeveltitle="Diren (Short Stop)"color=color.new(color.red20), style=plot.style_linebrlinewidth=2
    16.07.2024 - 10.12.2024

  8. evet...en son yaplan deneme almalarn...paylaarak...yedeklemi oldum....
    ou alma iin... gemini pro kullanlmtr....
    denemek isteyenler... arada deiiklikleri...
    veya ekledikleri....kodlarla...

    arada paylarlarsa... kendi adma sevinirim....

    beraber gelimi oluruz....
    16.07.2024 - 10.12.2024

Sayfa 391/393 lklk ... 291341381389390391392393 SonSon

Yer mleri

Yer mleri

Gnderi Kurallar

  • Yeni konu aamazsnz
  • Konulara cevap yazamazsnz
  • Yazlara ek gnderemezsiniz
  • Yazlarnz deitiremezsiniz
  •