Artan
Azalan
��lem
BIST 30
BIST 50
BIST 100
NASDAQ 100
Hisse Fiyat Fark% Hacim (TL) D���k / Y�ksek
9,68 10% 789,89 Mn 8,60 / 9,68
80,30 10% 41,42 Mn 80,30 / 80,30
80,30 10% 2,14 Mr 72,10 / 80,30
19,48 9.99% 1,34 Mr 17,70 / 19,48
155,40 9.98% 1,72 Mr 140,30 / 155,40
Hisse Fiyat Fark% Hacim (TL) D���k / Y�ksek
2.431.800,00 -10% 2,43 Mn 2.431.800,00 / 2.431.800,00
355,75 -9.99% 429,56 Mn 355,75 / 386,50
2.498,00 -9.98% 5,27 Mr 2.498,00 / 2.780,00
11,18 -9.98% 1,93 Mr 11,18 / 12,59
55,35 -9.93% 218,80 Mn 55,35 / 61,40
Hisse Fiyat Fark% Hacim (TL) D���k / Y�ksek
3,52 5.71% 31,52 Mr 3,34 / 3,58
311,00 -0.48% 16,35 Mr 306,75 / 314,75
326,00 1.64% 11,68 Mr 315,00 / 334,00
41,26 7.22% 10,79 Mr 38,30 / 41,30
75,25 0.07% 9,91 Mr 73,90 / 76,15
Hisse Fiyat Fark% Hacim (TL) D���k / Y�ksek
20,46 -0.39% 605,89 Mn 20,16 / 20,72
75,25 0.07% 9,91 Mr 73,90 / 76,15
428,50 0.12% 7,72 Mr 426,25 / 434,50
326,00 1.64% 11,68 Mr 315,00 / 334,00
790,00 0.77% 3,13 Mr 777,00 / 802,50
Hisse Fiyat Fark% Hacim (TL) D���k / Y�ksek
20,46 -0.39% 605,89 Mn 20,16 / 20,72
75,25 0.07% 9,91 Mr 73,90 / 76,15
99,15 -0.8% 503,79 Mn 98,00 / 100,00
114,20 -0.7% 209,55 Mn 113,40 / 115,40
428,50 0.12% 7,72 Mr 426,25 / 434,50
Hisse Fiyat Fark% Hacim (TL) D���k / Y�ksek
20,46 -0.39% 605,89 Mn 20,16 / 20,72
35,06 -2.61% 288,12 Mn 35,06 / 36,86
75,25 0.07% 9,91 Mr 73,90 / 76,15
11,20 0.99% 680,06 Mn 10,85 / 11,45
86,70 -1.81% 469,42 Mn 86,40 / 89,00

Masrafsýz Bankacýlýk + 1.000 TL Nakit! Enpara’dan Çifte Avantaj

Masrafsýz Bankacýlýk + 1.000 TL Nakit! Enpara’dan Çifte Avantaj
Sayfa 417/418 ÝlkÝlk ... 317367407415416417418 SonSon
Arama sonucu : 3337 madde; 3,329 - 3,336 arasý.

Konu: Tradingview

  1. bazý paylaþtýðým kodlarýn içinde ayna yazýsý okursunuz...
    bazen de onu... hesaplatýrken sýralama için 0-1-2 gibi rakamda vermiþ olabilirim...
    bazen de yörük diye yazmýþ olabilirim...

    ayna yazýsýný Ai verdi... üst üste çalýþýldýðýnda...
    aynanýn ivmesini hesapla... aynaya göre bar renklendir...
    ayna þunu yukarý keserse...þöyle yap...
    ayna da çift dip tepe ara..çiz
    aynayý..pivot al..ivmesine göre destek direnç hesapla...
    gibi...
    aklýma gelen bir çok çalýþmayý...burada paylaþtým...

    ayna hesaplamasý... sar ile fiyat arasýndaki fark alýnýr... sarýn zýddýna uygulanýr...
    böylece ayna... her daim sarýn öncüsü olur...

    örneðin...
    sar aldayken...ayna dönmüþ sarý keserse... ya düþüþ baþlýyor gibi olur...

    ama ben aynayý farklý amaçla kullanýyorum...

    nabýz ölçer mantýðýyla...

    hani hoþunuza giden bir þey olur da...kalbiniz güm güm atar ya...
    iþte o esnada nabzýnýz yükselmiþ olur...

    scalping yaparken ayna... hedefleme oluyor...

    en güzeli...anomali yapýnca oluyor....
    anamoliden kastým....
    https://www.tradingview.com/x/mlOPP0e1/
    https://www.tradingview.com/x/ivzmJg8j/
    https://www.tradingview.com/x/NRWXKwa5/
    böyle...görüntüler....

    hele...ayna kullanýlarak yapýlan otomatik trend çizimleri çok farklý oluyor....

    tabi ki...ayna...sardan hesaplandýðý için.. farklý sar deðeri kullanýp...
    farklý çalýþmalar keþisim üzerine yaptýklarýmý da paylaþtým...

    yine... ben hacim karþýtý olduðum için...
    hesaplamalarda hacim verisi kullanmadýðýmdan...
    çoðu kodda twap kullanýlmasý bundadndýr....

    fibo tarzý kullanýlan yerlerde... kaynak genellikle hl2 olur..
    ya zlema...
    ya hma...
    ya medyan içinde hma veya zlema kullanýmý yaptým...

    topiði okuyan...zaten sar takýntýmý bilir ki...
    sar hesaplamalarý ile ilgili çok farklý kodlar görürsünüz...
    hýzlý-yavaþ-döngülü-mtfli-aynalý-aynasýz-ivmeli-
    baþka scripte..sar verisini okutma...
    baþka veriyi..sara okutma...
    en son paylaþýmým ise sanýrým sar füzyon...
    16.07.2024 - 10.12.2024

  2. Oblo hocam...

    bundan önceki çalýþmalarý....açýklayacak zamaným yok...

    ama...bundan sonra yapacaklarýmda (yani saçmalayacaklarýmda)

    dediðini dikkate alýp....kýsada olsa açýklamalar yapmaya çalýþýrým...
    16.07.2024 - 10.12.2024

  3. https://tr.tradingview.com/v/0O1X4gMd/
    bu kodu görünce aklýma gelen....

    kodun fikri güzel...
    son 300 uzunluk içinde birbirine benzer barlarýn hareketini yakalamaya çalýþýyor....

    eðer..
    geçmiþ geleceðin aynasý dersek....

    bize lazým olan ayna...dolayýsýyla aynanýn geçmiþi...

    öyleyse....kodun içinden rsi at...
    volume sma at...
    roc-atr kalsýn...

    scalping için... deðerleri deðiþtir....

    paylaþtýðým hýzlý aynayý al...koda ekle...
    ayna verisini...roc-atr hesaplat....

    aynanýn ikili tepe ve dibinden çizgi çek...
    bunlar medyan sýnýrý olsun...

    zlema kullanýp... medyana baðla...

    çýkan sonuçla...sadece barý renklendir...

    aynanýn benzerliðini... barlarýn üstüne yansýt...

    fill dolgular iptal...

    sonuç...kod hafifler... arraydan kurtulur... gecikme azalýr...

    bunu... fýrsat bulunca yapýp...sonucu görmek lazým...
    16.07.2024 - 10.12.2024

  4.  Alýntý Originally Posted by @yörük@ Yazýyý Oku
    Oblo hocam...

    bundan önceki çalýþmalarý....açýklayacak zamaným yok...

    ama...bundan sonra yapacaklarýmda (yani saçmalayacaklarýmda)

    dediðini dikkate alýp....kýsada olsa açýklamalar yapmaya çalýþýrým...
    Eline, emeðine saðlýk üstadým.
    O kadar uðraþýp, paylaþýyorsun 1 kiþi fazla yararlanýrsa ne âlâ.

  5. PHP Code:
    // © Kinetik Komuta Merkezi [Masterpiece V6.9 Terminal + Z-Vortex + Z-Div]
    //@version=6
    indicator("yörük"shorttitle="."overlay=truemax_labels_count=50max_lines_count=50)

    // ─────────────────────────────────────────────────────────────────
    // 7. SAR HESAPLAMALARI VE ÇÝZÝMLER
    // ─────────────────────────────────────────────────────────────────
    float roSarSlow     ta.sar(0.010.010.2)
    float roSarModerate ta.sar(0.010.020.2)
    float roSarFast     ta.sar(0.010.030.2)

    plot(roSarSlow,     title="C"style=plot.style_crosscolor=color.yellow,  linewidth=1)
    plot(roSarModeratetitle="B",  style=plot.style_crosscolor=color.yellowlinewidth=1)
    plot(roSarFast,     title="A"style=plot.style_crosscolor=color.yellow,   linewidth=1)

    float sarMavi ta.sar(0.00.0030.02), sarSari ta.sar(0.00.0010.02), sarFusya ta.sar(0.0010.00050.02)
    plot(sarMavi"X"color.new(#040cfb, 0), 1, plot.style_cross)
    plot(sarSari"Y"color.new(#040cfb, 0), 1, plot.style_cross)
    plot(sarFusya"Z"color.new(#040cfb, 0), 1, plot.style_cross)
    // 1. GÝRDÝLER
    // ─────────────────────────────────────────────────────────────────
    group_l1 "1. Kinetik Motor (Yörük)"
    int atrLen input.int(20"L1 Hafýza (ATR)"group=group_l1)
    float atrMult input.float(3.5"L1 Gürültü Duvarý"step=0.1group=group_l1)
    float mu input.float(0.6"L1 Yakýnsaklýk (μ)"step=0.1group=group_l1)


    group_holy "3. Kurumsal S-TWAP Filtresi"
    float maxTension input.float(2.0"Maksimum Gerginlik Sýnýrý"step=0.1group=group_holy)

    // ─────────────────────────────────────────────────────────────────
    // 2. ARKA PLAN HESAPLAMALARI (SAF YÖRÜK VE TWAP)
    // ─────────────────────────────────────────────────────────────────
    f_yoruk_pure() =>
        
    float threshold ta.atr(atrLen) * atrMult
        
    var float z na
        
    var float v 0.0
        
    if bar_index == 0
            z 
    := hl2
        
    else
            
    float zPrev z[1], float vPrev v[1]
            
    float zPred zPrev vPrev
            float zTemp 
    zPred mu * (hl2 zPred)
            
    float diff zTemp zPrev
            
    if math.abs(diff) > threshold
                v 
    := math.sign(diff) * (math.abs(diff) - threshold)
            else
                
    := 0.0
            z 
    := zPrev v
        z

    bool isNew15m 
    ta.change(time("15")) != 0
    var float sumPrice15m 0.0, var float barCount15m 0.0
    if isNew15m or bar_index == 0
        sumPrice15m 
    := hl2barCount15m := 1.0
    else
        
    sumPrice15m += hl2barCount15m += 1.0
    float curTwap15m 
    sumPrice15m barCount15m

    bool isNewHour 
    ta.change(time("60")) != 0
    var float sumPriceH 0.0, var float barCountH 0.0
    if isNewHour or bar_index == 0
        sumPriceH 
    := hl2barCountH := 1.0
    else
        
    sumPriceH += hl2barCountH += 1.0
    float curTwapH 
    sumPriceH barCountH

    bool isNewDay 
    ta.change(time("D")) != 0
    var float sumPriceD 0.0, var float barCountD 0.0
    if isNewDay or bar_index == 0
        sumPriceD 
    := hl2barCountD := 1.0
    else
        
    sumPriceD += hl2barCountD += 1.0
    float curTwapD 
    sumPriceD barCountD

    // ─────────────────────────────────────────────────────────────────
    // GÝRDÝLER VE RENKLER
    // ─────────────────────────────────────────────────────────────────
    int len input.int(89"Maliyet Uzunluðu")

    color col_up  input.color(#00e676, "Yükseliþ Rengi (Yeþil)")
    color col_dn  input.color(#ff1744, "Düþüþ Rengi (Kýrmýzý)")
    color col_mid input.color(color.fuchsia"Merkez Çizgi Rengi")

    // ─────────────────────────────────────────────────────────────────
    // HESAPLAMA (Sýfýr Gecikmeli Pürüzsüz Merkez)
    // ─────────────────────────────────────────────────────────────────
    float mid ta.hma(ta.median(hl2len 2), 233)

    // ─────────────────────────────────────────────────────────────────
    // ÇÝZÝM VE BOYA
    // ─────────────────────────────────────────────────────────────────
    // Tek beyaz merkez hattý
    plot(midtitle "Maliyet"color col_midlinewidth 1)

    // Sadece Kýrmýzý ve Yeþil mantýðý
    color bar_col close mid col_up close mid col_dn color.gray

    // Mumlarý ve sýnýrlarý boya
    //plotcandle(open, high, low, close, title='Renk Mumlarý', color = bar_col, wickcolor=bar_col, bordercolor = bar_col)
    barcolor(bar_col)
    // 4. ÞELALE ÇÝZÝMLERÝ (Yörük MTF)
    // ─────────────────────────────────────────────────────────────────
    float y1   f_yoruk_pure() 
    float y3   request.security(syminfo.tickerid"3",   f_yoruk_pure(), lookahead=barmerge.lookahead_off)
    float y5   request.security(syminfo.tickerid"5",   f_yoruk_pure(), lookahead=barmerge.lookahead_off)
    float y15  request.security(syminfo.tickerid"15",  f_yoruk_pure(), lookahead=barmerge.lookahead_off)
    float y60  request.security(syminfo.tickerid"60",  f_yoruk_pure(), lookahead=barmerge.lookahead_off)
    float y240 request.security(syminfo.tickerid"240"f_yoruk_pure(), lookahead=barmerge.lookahead_off
    float yD   request.security(syminfo.tickerid"D",   f_yoruk_pure(), lookahead=barmerge.lookahead_off

    plot(y1,   "1m Yörük",  color=color.new(#03d3f8, 0), linewidth=1, style=plot.style_stepline)


    // ─────────────────────────────────────────────────────────────────
    // 5. MÝKRO ATEÞLEME & MANYETÝK HEDEFLEME MANTIÐI
    // ─────────────────────────────────────────────────────────────────
    float safeAtr math.max(ta.atr(14), syminfo.mintick)
    bool isIgnition = (high low) >= (safeAtr 1.5)

    float atrH request.security(syminfo.tickerid"60"ta.atr(14), lookahead=barmerge.lookahead_off)
    float twapDistAtr atrH math.abs(close curTwapH) / atrH 0
    bool tensionOk 
    twapDistAtr <= maxTension

    bool breakBull 
    close y1 and close y3 and (open y1 or open y3 or close[1] < y1)
    bool breakBear close y1 and close y3 and (open y1 or open y3 or close[1] > y1)

    bool fireBull breakBull and isIgnition and close curTwapH and close open and tensionOk
    bool fireBear 
    breakBear and isIgnition and close curTwapH and close open and tensionOk

    //bgcolor(fireBull ? color.new(#00e676, 85) : fireBear ? color.new(#ff1744, 85) : na, title="Ateþleme Zemin Flaþý")

    var int   activeSide   0
    var float entryPrice   na
    var bool  hasMagnet    false 

    var line lineEntry na, var label lblEntry na

    if (fireBull and activeSide != 1)
        
    activeSide := 1entryPrice := closehasMagnet := y60 close
        
    if not na(lineEntry)
            
    line.delete(lineEntry), label.delete(lblEntry)
        
    lineEntry := line.new(bar_indexentryPricebar_index 5entryPricecolor=color.new(#00e676, 0), width=2)
        
    lblEntry  := label.new(bar_index 5entryPrice"GÝRÝÞ: " str.tostring(math.round(entryPrice2)), color=color.new(#00e676, 80), textcolor=color.white, style=label.style_label_left, size=size.small)

    else if (fireBear and activeSide != -1)
        
    activeSide := -1entryPrice := closehasMagnet := y60 close
        
    if not na(lineEntry)
            
    line.delete(lineEntry), label.delete(lblEntry)
        
    lineEntry := line.new(bar_indexentryPricebar_index 5entryPricecolor=color.new(#ff1744, 0), width=2)
        
    lblEntry  := label.new(bar_index 5entryPrice"GÝRÝÞ: " str.tostring(math.round(entryPrice2)), color=color.new(#ff1744, 80), textcolor=color.white, style=label.style_label_left, size=size.small)

    if activeSide != 0
        line
    .set_x2(lineEntrybar_index 5), label.set_x(lblEntrybar_index 5)
        
        
    bool magnetHitBull activeSide == and hasMagnet and high >= y60
        bool magnetHitBear 
    activeSide == -and hasMagnet and low <= y60
        bool microStopBull 
    activeSide == and close y1
        bool microStopBear 
    activeSide == -and close y1
        
        
    if magnetHitBull or magnetHitBear
            activeSide 
    := 0
            line
    .set_color(lineEntrycolor.new(color.gray60)), label.set_color(lblEntrycolor.new(color.gray60))
            
        else if 
    microStopBull or microStopBear
            activeSide 
    := 0
            line
    .set_color(lineEntrycolor.new(color.gray60)), label.set_color(lblEntrycolor.new(color.gray60))

    // ─────────────────────────────────────────────────────────────────
    // 6. TERMINAL PUSULASI (TAM KONTROL HUD)
    // ─────────────────────────────────────────────────────────────────
    var table terminal table.new(position.bottom_right211bgcolor=color.new(color.black60), border_color=color.new(color.gray80), border_width=1)
    f_col(val) => close val #00e676 : close < val ? #ff1744 : color.silver

    if barstate.islast
        table
    .cell(terminal00"KKM MICRO SNIPER PRO"text_color=color.graytext_size=size.smallbgcolor=color.new(color.black40))
        
    table.merge_cells(terminal0010)
        
        
    string entryState activeSide == " (AKTÝF/AL)" activeSide == -" (AKTÝF/SAT)" " (KAPALI)"
        
    string entryStr not na(entryPrice) ? str.tostring(math.round(entryPrice2)) + entryState "BEKLENÝYOR"
        
    color entryCol activeSide == #00e676 : activeSide == -1 ? #ff1744 : color.silver
        
        
    table.cell(terminal01"SON GÝRÝÞ"text_color=color.whitetext_size=size.small)
        
    table.cell(terminal11entryStrtext_color=entryColtext_size=size.small)
        
        
    float stopAvg = (y1 y3) / 2
        table
    .cell(terminal02"STOP (1m+3m)"text_color=color.whitetext_size=size.small)
        
    table.cell(terminal12str.tostring(math.round(stopAvg2)), text_color=color.orangetext_size=size.small)

        
    table.cell(terminal03"1m Yörük"text_color=color.whitetext_size=size.small)
        
    table.cell(terminal13str.tostring(math.round(y12)), text_color=f_col(y1), text_size=size.small)
        
    table.cell(terminal04"3m Yörük"text_color=color.whitetext_size=size.small)
        
    table.cell(terminal14str.tostring(math.round(y32)), text_color=f_col(y3), text_size=size.small)
        
    table.cell(terminal05"5m Yörük"text_color=color.whitetext_size=size.small)
        
    table.cell(terminal15str.tostring(math.round(y52)), text_color=f_col(y5), text_size=size.small)
        
    table.cell(terminal06"15m Yörük"text_color=color.whitetext_size=size.small)
        
    table.cell(terminal16str.tostring(math.round(y152)), text_color=f_col(y15), text_size=size.small)
        
    table.cell(terminal07"60m Yörük"text_color=color.whitetext_size=size.small)
        
    table.cell(terminal17str.tostring(math.round(y602)), text_color=f_col(y60), text_size=size.small)
        
    table.cell(terminal08"4S Yörük"text_color=color.whitetext_size=size.small)
        
    table.cell(terminal18str.tostring(math.round(y2402)), text_color=f_col(y240), text_size=size.small)
        
    table.cell(terminal09"1G Yörük"text_color=color.whitetext_size=size.small)
        
    table.cell(terminal19str.tostring(math.round(yD2)), text_color=f_col(yD), text_size=size.small)

        
    table.cell(terminal010"YTD"text_color=color.graytext_size=size.tiny)
        
    table.merge_cells(terminal010110)
    //////////////

    // ─────────────────────────────────────────────────────────────────
    //  1. TEK KAYNAK DNA'SI VE GÝRDÝLER
    // ─────────────────────────────────────────────────────────────────
    k_start input.float(0.0,  "Kaynak Baþlangýç"step=0.01)
    k_inc   input.float(0.02"Kaynak Ývme"step=0.01)
    k_max   input.float(0.20"Kaynak Max"step=0.01)

    grp_vol "Ýstatistiksel Hedef (Sigma)"
    volLength   input.int(20,  "Oynaklýk Uzunluðu"minval 5)
    projBars    input.int(5,   "Ýleriye Projeksiyon (Yakýnlýk)"minval 1
    barsPerYear input.int(50,  "Yýllýk Mum Çarpaný"minval 50)

    // ─────────────────────────────────────────────────────────────────
    //  2. OTONOM BEYÝN (FIBONACCI YAÞLANMA VE ÇARPIÞMA MOTORU)
    // ─────────────────────────────────────────────────────────────────
    type SARState
        float sar_value
        float extreme_point
        float accel_factor
        bool  isLong
        int   trend_age 
        int   bounce_count 
        bool  was_touching 

    method f_updateState
    (SARState statefloat high_valfloat low_valfloat close_valfloat accel_startfloat accel_incfloat accel_maxfloat decay_limitfloat atr_val) =>
        
    bool isInitialTrend false
        bool trend_changed 
    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
                trend_changed       
    := 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     := 
        
    else
            if 
    state.sar_value high_val
                isInitialTrend      
    := true
                trend_changed       
    := 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     := 
                
        
    if trend_changed
            state
    .bounce_count := 
            state
    .was_touching := false
        
    else
            
    float tol atr_val 0.2 
            bool is_touch 
    state.isLong ? (low_val <= state.sar_value tol) : (high_val >= state.sar_value tol)
            if 
    is_touch and not state.was_touching
                state
    .bounce_count += 
            state
    .was_touching := is_touch

        float decay_factor 
    math.max(0.011.0 - (state.trend_age decay_limit))
        
    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

    // ─────────────────────────────────────────────────────────────────
    //  3. 9 PARALEL EVRENÝN YARATILIÞI VE KRAL SEÇÝMÝ
    // ─────────────────────────────────────────────────────────────────
    var float[] fibs = array.from(1.02.03.05.08.013.021.034.055.0)
    var 
    states = array.new<SARState>()

    if 
    barstate.isfirst
        
    for 0 to 8
            states
    .push(SARState.new(nanak_startfalse00false))

    float gercek_oynaklik ta.atr(14)

    for 
    0 to 8
        SARState s 
    states.get(i)
        
    s.f_updateState(highlowclosek_startk_inck_maxfibs.get(i), gercek_oynaklik)

    var 
    int king_idx 
    int new_king 
    = -1

    for 0 to 8
        
    if states.get(i).bounce_count >= 2
            new_king 
    := i
            
    break 

    if 
    new_king != -1
        king_idx 
    := new_king 

    float kral_sar 
    states.get(king_idx).sar_value
    bool  kral_yon 
    states.get(king_idx).isLong
    float kral_ayna
    close + (close kral_sar)

    // ─────────────────────────────────────────────────────────────────
    //  4. KRALIN HAFIZASI (DÝNAMÝK KANALLAR)
    // ─────────────────────────────────────────────────────────────────
    var float channel_support na
    var float channel_resist  na

    bool king_long_break  
    ta.crossover(closekral_sar)
    bool king_short_break ta.crossunder(closekral_sar)

    if 
    king_long_break
        channel_support 
    := kral_sar 
    if king_short_break
        channel_resist 
    := kral_sar 

    // ─────────────────────────────────────────────────────────────────
    //  5. ANA YÖN SÝNYALLERÝ VE REFERANS (YÖRÜK)
    // ─────────────────────────────────────────────────────────────────
    bool al_sinyali  kral_yon and not kral_yon[1]
    bool sat_sinyali not kral_yon and kral_yon[1]

    cc ta.sar(0.00.010.3

    color col_kral kral_yon color.new(color.lime0) : color.new(color.red0)
    color col_ayna kral_yon color.new(color.lime50) : color.new(color.red50)


    p_sup plot(channel_supporttitle="Destek (Long Stop)"color=color.new(color.green20), style=plot.style_linebrlinewidth=2)
    p_res plot(channel_resist,  title="Direnç (Short Stop)"color=color.new(color.red20), style=plot.style_linebrlinewidth=2)
    fill(p_supp_rescolor=color.new(color.gray70), title="Dinamik Trade Kanalý")

    // ─────────────────────────────────────────────────────────────────
    //  6. MULTI-TIMEFRAME (MTF) GÖSTERGE PANeli (DASHBOARD)
    // ─────────────────────────────────────────────────────────────────
    // HATA BURADAYDI: lookahead_ignore yerine lookahead_off kullanýldý.
    [s_5ma_5mc_sup_5mc_res_5my_5myon_5m] = request.security(syminfo.tickerid"5",  [kral_sarkral_aynachannel_supportchannel_resistcckral_yon], lookahead=barmerge.lookahead_off)
    [
    s_1ha_1hc_sup_1hc_res_1hy_1hyon_1h] = request.security(syminfo.tickerid"60", [kral_sarkral_aynachannel_supportchannel_resistcckral_yon], lookahead=barmerge.lookahead_off)
    [
    s_1da_1dc_sup_1dc_res_1dy_1dyon_1d] = request.security(syminfo.tickerid"D",  [kral_sarkral_aynachannel_supportchannel_resistcckral_yon], lookahead=barmerge.lookahead_off)

    f_konum_haritasi(float sar_vfloat ayna_vfloat sup_vfloat res_vfloat yoruk_v) =>
        
    float v_min math.min(nz(sar_vclose), nz(ayna_vclose), nz(sup_vclose), nz(res_vclose), nz(yoruk_vclose))
        
    float v_max math.max(nz(sar_vclose), nz(ayna_vclose), nz(sup_vclose), nz(res_vclose), nz(yoruk_vclose))
        
    float aralik math.max(v_max v_min0.0001)

        
    int p_s int(math.round(10 * (nz(sar_vclose) - v_min) / aralik))
        
    int p_a int(math.round(10 * (nz(ayna_vclose) - v_min) / aralik))
        
    int p_y int(math.round(10 * (nz(yoruk_vclose) - v_min) / aralik))

        
    string harita ""
        
    for 0 to 10
            
    if == p_y
                harita 
    += "⚪"
            
    else if == p_s
                harita 
    += "🟣"
            
    else if == p_a
                harita 
    += "🔶"
            
    else
                
    harita += "▬"
        
    harita

    var table dash table.new(position.top_right84border_width=1border_color=color.grayframe_color=color.grayframe_width=1)

    f_satir_doldur(int rowstring tffloat sfloat afloat supfloat resfloat ybool yon) =>
        
    color c_yon yon color.new(color.lime70) : color.new(color.red70)
        
    string t_yon yon "AL" "SAT"
        
        
    table.cell(dash0rowtfbgcolor=color.new(color.gray80), text_color=color.whitetext_size=size.small)
        
    table.cell(dash1rowt_yonbgcolor=c_yontext_color=color.whitetext_size=size.small)
        
    table.cell(dash2rowstr.tostring(aformat.mintick), bgcolor=c_yontext_color=color.whitetext_size=size.small)
        
    table.cell(dash3rowstr.tostring(sformat.mintick), bgcolor=c_yontext_color=color.whitetext_size=size.small)
        
    table.cell(dash4rowstr.tostring(supformat.mintick), bgcolor=color.new(color.green80), text_color=color.whitetext_size=size.small)
        
    table.cell(dash5rowstr.tostring(resformat.mintick), bgcolor=color.new(color.red80), text_color=color.whitetext_size=size.small)
        
    table.cell(dash6rowstr.tostring(yformat.mintick), bgcolor=color.new(color.gray80), text_color=color.whitetext_size=size.small)
        
    table.cell(dash7rowf_konum_haritasi(sasupresy), bgcolor=color.new(color.black60), text_color=color.whitetext_size=size.small)

    if 
    barstate.islast
        table
    .cell(dash00"Zaman",  bgcolor=color.new(color.navy10), text_color=color.whitetext_size=size.small)
        
    table.cell(dash10"Durum",  bgcolor=color.new(color.navy10), text_color=color.whitetext_size=size.small)
        
    table.cell(dash20"Ayna🔶"bgcolor=color.new(color.navy10), text_color=color.whitetext_size=size.small)
        
    table.cell(dash30"SAR🟣",  bgcolor=color.new(color.navy10), text_color=color.whitetext_size=size.small)
        
    table.cell(dash40"Destek"bgcolor=color.new(color.navy10), text_color=color.whitetext_size=size.small)
        
    table.cell(dash50"Direnç"bgcolor=color.new(color.navy10), text_color=color.whitetext_size=size.small)
        
    table.cell(dash60"Yörük⚪"bgcolor=color.new(color.navy10), text_color=color.whitetext_size=size.small)
        
    table.cell(dash70"Konum Radarý"bgcolor=color.new(color.navy10), text_color=color.whitetext_size=size.small)

        
    f_satir_doldur(1"5Dak"s_5ma_5mc_sup_5mc_res_5my_5myon_5m)
        
    f_satir_doldur(2"1Saat"s_1ha_1hc_sup_1hc_res_1hy_1hyon_1h)
        
    f_satir_doldur(3"1Gün"s_1da_1dc_sup_1dc_res_1dy_1dyon_1d)

    // ─────────────────────────────────────────────────────────────────
    //  7. ÝSTATÝSTÝKSEL VOLATÝLÝTE (%68)
    // ─────────────────────────────────────────────────────────────────
    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)
        
    int tipX bar_index projBars 

        
    if kral_yon
            sigmaLabels
    .push(label.new(tipXtip1up"(YTD)\n" str.tostring(tip1upformat.mintick), color=color.new(color.lime80), textcolor=color.limestyle=label.style_label_leftsize=size.small))
        else
            
    sigmaLabels.push(label.new(tipXtip1dn"(YTD)\n" str.tostring(tip1dnformat.mintick), color=color.new(color.red80), textcolor=color.redstyle=label.style_label_leftsize=size.small))

    ////
    // ÝMZA
    var table ytd_table table.new(position.bottom_center11)
    if 
    barstate.islast
        table
    .cell(ytd_table00"(AÝ, (Gemini Pro) ile tasarlanmýþ OTONOM grafik, Eðitim çalýþmasýdýr.) Yatýrým tavsiyesi olarak KULLANILAMAZ."text_color=color.new(color.white00), text_size=size.normal)
    /////////////////
    // 3. MOTOR: 3'LÜ SAR ÇAKIÞMASI (YAKIN TAKÝP ELMAS TETÝK)
    // ─────────────────────────────────────────────────────────────────
    // Fiyatý ensesinden takip eden 3 hiper-aktif SAR (Step ve Max deðerleri yükseltildi)
    roSar1 ta.sar(0.030.0030.3// Hýzlý Avcý
    roSar2 ta.sar(0.050.0050.5// Yakýn Gölge
    roSar3 ta.sar(0.100.0101.0// Vakum (Fiyata yapýþýk)

    // Kuantum Tolerans Motoru
    isEq(v1v2) => math.abs(v1 v2) <= syminfo.mintick
    isEq3
    (v1v2v3) => isEq(v1v2) and isEq(v1v3)

    // Sadece bu 3 SAR'ýn ayný anda üst üste binme (çakýþma) durumu
    all3Match isEq3(roSar1roSar2roSar3)

    float matchVal all3Match roSar1 na

    trigger 
    all3Match and not all3Match[1]
    isSupport close matchVal
    diamondColor 
    isSupport color.rgb(023011820) : color.rgb(255236820)

    plotshape(trigger matchVal na"3'lü SAR Elmasý"shape.diamondlocation.absolutecolor=diamondColorsize=size.smalldisplay=display.pane)
    ///////////////
    // ─────────────────────────────────────────────────────────────────
    // 1. ASYMMETRIC TREND ENGINE (GÖRÜNMEZ HESAPLAYICI)
    // ─────────────────────────────────────────────────────────────────
    // Komutan Talimatý: hl2 Kaynak, 30 Lookback, 3.5 Mult
    float asy_src        hl2
    int   asy_lookback   
    180
    float asy_mult       
    3.5

    float asy_vol_threshold 
    ta.stdev(asy_srcasy_lookback) * asy_mult

    var float asy_trend_line na
    var int   asy_trend_dir  0
    var int   asy_prev_dir   0

    if na(asy_trend_line)
        
    asy_trend_line := asy_src
    else
        
    asy_prev_dir := asy_trend_dir
        
    if asy_trend_dir >= 0
            
    if asy_src asy_trend_line asy_vol_threshold 0.5
                asy_trend_line 
    := math.max(asy_trend_lineasy_src asy_vol_threshold 0.25)
                
    asy_trend_dir  := 1
            
    else if asy_src asy_trend_line asy_vol_threshold
                asy_trend_line 
    := asy_src asy_vol_threshold 0.25
                asy_trend_dir  
    := -1
        
    else
            if 
    asy_src asy_trend_line asy_vol_threshold 0.5
                asy_trend_line 
    := math.min(asy_trend_lineasy_src asy_vol_threshold 0.25)
                
    asy_trend_dir  := -1
            
    else if asy_src asy_trend_line asy_vol_threshold
                asy_trend_line 
    := asy_src asy_vol_threshold 0.25
                asy_trend_dir  
    := 1

    // Dönüþ Teyitleri
    bool turned_bullish asy_trend_dir == 1  and asy_trend_dir[1] == -1
    bool turned_bearish 
    asy_trend_dir == -and asy_trend_dir[1] == 1
    bool is_reversal    
    asy_trend_dir != asy_prev_dir and bar_index 0

    // ─────────────────────────────────────────────────────────────────


    // ─────────────────────────────────────────────────────────────────
    // 3. SAF QUANT GÖRSELLEÞTÝRME (SADECE DÖNÜÞLER)
    // ─────────────────────────────────────────────────────────────────
    // Trend çizgisi plot edilmiyor, sadece dönüþ anýnda hedef belirleniyor
    color rev_color asy_trend_dir == #00ffaa48 : #ff00003c

    // Reversal Noktasý: Sadece trend yön deðiþtirdiðinde o barýn altýna/üstüne '⦿' koyar
    plotchar(is_reversal ? (asy_trend_dir == low high) : na
             
    "KKM Reversal""⦿"location location.absolute
             
    color rev_colorsize size.huge)

    // //////
    // 0. MERKEZÝ FONKSÝYONLAR (Sýfýr Gecikme Motoru)
    // ─────────────────────────────────────────────────────────────────
    f_zlema(series float srcsimple int len) =>
        
    float ema1 ta.ema(srclen)
        
    float ema2 ta.ema(ema1len)
        
    ema1 + (ema1 ema2)

    // ─────────────────────────────────────────────────────────────────



    // ─────────────────────────────────────────────────────────────────
    // 1. DÝNAMÝK YOÐUNLUK MOTORU (Zamaný Deðil, Maddeyi Ölçer)
    // ─────────────────────────────────────────────────────────────────
    // Bu motor ayný 1m verisini alýr ama ona farklý kutle dirençleri uygular.
    f_kutu_kutle(int _atrLenfloat _atrMultfloat _mu) =>
        
    float threshold ta.atr(_atrLen) * _atrMult
        
    var float z na
        
    var float v 0.0
        
    if bar_index == 0
            z 
    := hl2
        
    else
            
    float zPrev z[1], float vPrev v[1]
            
    float zPred zPrev vPrev
            float zTemp 
    zPred _mu * (hl2 zPred)
            
    float diff zTemp zPrev
            
    if math.abs(diff) > threshold
                v 
    := math.sign(diff) * (math.abs(diff) - threshold)
            else
                
    := 0.0
            z 
    := zPrev v
        z

    // ─────────────────────────────────────────────────────────────────
    // 2. KÜTLE MATRÝSÝ (Camdan Çeliðe Kurumsal Maliyetler)
    // ─────────────────────────────────────────────────────────────────
    // Ayný 1 dakikalýk grafikte, merminin (fiyatýn) deleceði katmanlar:
    float cam   f_kutu_kutle(11.00.05)   // CAM: Çok kýrýlgan, mermi anýnda deler.

    float celik f_kutu_kutle(1,  0.010.01)  // ÇELÝK: Komutanýn Tank Zýrhý! (Delinmesi en zor)

    // ─────────────────────────────────────────────────────────────────
    // 3. YOÐUNLUK ÇÝZÝMLERÝ (Ekraný Kirletmeden)
    // ─────────────────────────────────────────────────────────────────
    plot(celik"Çelik"color=color.new(#d500f9, 0), linewidth=1, style=plot.style_stepline) // Mor

    plot(cam,   "Cam",   color=color.new(#ffeb3b, 0), linewidth=1, style=plot.style_stepline) // Beyaz

    // ─────────────────────────────────────────────────────────────────

    group_motor "Kinetik Zeminler (Trinity)"
    int len_fast input.int(5"Hýzlý Zemin (Zemin 1)"group=group_motor)
    int len_slow input.int(20"Yavaþ Zemin (Zemin 2)"group=group_motor)

    group_dash "Gösterge Paneli"
    bool show_dash input.bool(true"Paneli Göster"group=group_dash)
    string dash_pos input.string("Top Right""Panel Konumu"options=["Top Right""Top Left""Bottom Right""Bottom Left"], group=group_dash)

    group_kin "Renk Paleti"

    col_flat input.color(#787b86, "Flat (Nötr)", group=group_kin)
    col_eq input.color(#ff9800, "Merkez Pivot (Turuncu Denge)", group=group_kin)

    // ─────────────────────────────────────────────────────────────────
    // 1. MOTOR: L1 KÝNETÝK FÝLTRE (ANA BASELINE)
    // ─────────────────────────────────────────────────────────────────
    float threshold ta.atr(atrLen) * atrMult
    var float z na
    var float v 0.0

    if bar_index == 0
        z 
    := close
    else
        
    float zPrev z[1], float vPrev v[1]
        
    float zPred zPrev vPrev
        float zTemp 
    zPred mu * (close zPred)
        
    float diff zTemp zPrev
        
    if math.abs(diff) > threshold
            v 
    := math.sign(diff) * (math.abs(diff) - threshold)
        else
            
    := 0.0
        z 
    := zPrev v

    //plot(z, "0", color=color.new(color.fuchsia, 0), linewidth=1, style=plot.style_stepline)

    // ─────────────────────────────────────────────────────────────────
    // 2. MOTOR: TRINITY ZEMÝNLER (5 - 20)
    // ─────────────────────────────────────────────────────────────────
    float fast_floor ta.hma(zlen_fast)
    float slow_floor ta.hma(zlen_slow)

    //p_fast = plot(fast_floor, color=color.rgb(223, 64, 251, 100), linewidth=1, title="1")
    //p_slow = plot(slow_floor, color=color.new(color.fuchsia, 100), linewidth=1, title="2")

    // Kinetik Bulut
    bool is_bull fast_floor slow_floor
    //fill(p_fast, p_slow, is_bull ? color.new(col_up, 85) : color.new(col_dn, 85), title="Kinetik Bulut")



    // ─────────────────────────────────────────────────────────────────
    // 3. ANALÝZ: ÜÇLÜ KAVUÞUM (YÜZEN PÝVOT AÐI) VE SÝNYAL TAKÝBÝ
    // ─────────────────────────────────────────────────────────────────
    isEq55(v1v2) => math.abs(v1 v2) <= syminfo.mintick
    bool trinity_aligned 
    isEq55(zfast_floor) and isEq55(zslow_floor)

    var 
    float last_eq_val na
    var float last_eq_step na

    // Çizgi ve Etiket Deðiþkenleri
    var line line_p na,  var label lbl_p na
    var line line_r1 na, var label lbl_r1 na
    var line line_r2 na, var label lbl_r2 na
    var line line_r3 na, var label lbl_r3 na
    var line line_s1 na, var label lbl_s1 na
    var line line_s2 na, var label lbl_s2 na
    var line line_s3 na, var label lbl_s3 na

    if trinity_aligned
        last_eq_val 
    := z
        last_eq_step 
    := threshold // L1'in kendi gürültü duvarý mesafesi

    // Kavuþum (Denge) deðeri varsa, yüzen aðý her an güncelle
    if not na(last_eq_val)
        
    int ext 10 // Çizgilerin uzayacaðý bar sayýsý
        
        
    float val_p  last_eq_val
        float val_r1 
    last_eq_val last_eq_step 1
        float val_r2 
    last_eq_val last_eq_step 2
        float val_r3 
    last_eq_val last_eq_step 3
        float val_s1 
    last_eq_val last_eq_step 1
        float val_s2 
    last_eq_val last_eq_step 2
        float val_s3 
    last_eq_val last_eq_step 3

        
    if na(line_p)
            
    // Çizgiler
            
    line_p  := line.new(bar_indexval_p,  bar_index extval_p,  color=col_eqwidth=2style=line.style_dotted)
            
    line_r1 := line.new(bar_indexval_r1bar_index extval_r1color=color.new(col_dn30), width=1style=line.style_dotted)
            
    line_r2 := line.new(bar_indexval_r2bar_index extval_r2color=color.new(col_dn30), width=1style=line.style_dotted)
            
    line_r3 := line.new(bar_indexval_r3bar_index extval_r3color=color.new(col_dn30), width=1style=line.style_dotted)
            
    line_s1 := line.new(bar_indexval_s1bar_index extval_s1color=color.new(col_up30), width=1style=line.style_dotted)
            
    line_s2 := line.new(bar_indexval_s2bar_index extval_s2color=color.new(col_up30), width=1style=line.style_dotted)
            
    line_s3 := line.new(bar_indexval_s3bar_index extval_s3color=color.new(col_up30), width=1style=line.style_dotted)
            
            
    // Etiketler
            
    lbl_p  := label.new(bar_index extval_p,  "P: " str.tostring(val_pformat.mintick),  color=color.new(color.white100), textcolor=col_eqstyle=label.style_label_leftsize=size.normal)
            
    lbl_r1 := label.new(bar_index extval_r1"R1: " str.tostring(val_r1format.mintick), color=color.new(color.white100), textcolor=col_dnstyle=label.style_label_leftsize=size.normal)
            
    lbl_r2 := label.new(bar_index extval_r2"R2: " str.tostring(val_r2format.mintick), color=color.new(color.white100), textcolor=col_dnstyle=label.style_label_leftsize=size.normal)
            
    lbl_r3 := label.new(bar_index extval_r3"R3: " str.tostring(val_r3format.mintick), color=color.new(color.white100), textcolor=col_dnstyle=label.style_label_leftsize=size.normal)
            
    lbl_s1 := label.new(bar_index extval_s1"S1: " str.tostring(val_s1format.mintick), color=color.new(color.white100), textcolor=col_upstyle=label.style_label_leftsize=size.normal)
            
    lbl_s2 := label.new(bar_index extval_s2"S2: " str.tostring(val_s2format.mintick), color=color.new(color.white100), textcolor=col_upstyle=label.style_label_leftsize=size.normal)
            
    lbl_s3 := label.new(bar_index extval_s3"S3: " str.tostring(val_s3format.mintick), color=color.new(color.white100), textcolor=col_upstyle=label.style_label_leftsize=size.normal)
        else
            
    // Aðý ve etiketleri her bar saða kaydýr
            
    line.set_xy1(line_p,  bar_indexval_p),  line.set_xy2(line_p,  bar_index extval_p)
            
    line.set_xy1(line_r1bar_indexval_r1), line.set_xy2(line_r1bar_index extval_r1)
            
    line.set_xy1(line_r2bar_indexval_r2), line.set_xy2(line_r2bar_index extval_r2)
            
    line.set_xy1(line_r3bar_indexval_r3), line.set_xy2(line_r3bar_index extval_r3)
            
    line.set_xy1(line_s1bar_indexval_s1), line.set_xy2(line_s1bar_index extval_s1)
            
    line.set_xy1(line_s2bar_indexval_s2), line.set_xy2(line_s2bar_index extval_s2)
            
    line.set_xy1(line_s3bar_indexval_s3), line.set_xy2(line_s3bar_index extval_s3)
            
            
    label.set_xy(lbl_p,  bar_index extval_p),  label.set_text(lbl_p,  "P: " str.tostring(val_pformat.mintick))
            
    label.set_xy(lbl_r1bar_index extval_r1), label.set_text(lbl_r1"R1: " str.tostring(val_r1format.mintick))
            
    label.set_xy(lbl_r2bar_index extval_r2), label.set_text(lbl_r2"R2: " str.tostring(val_r2format.mintick))
            
    label.set_xy(lbl_r3bar_index extval_r3), label.set_text(lbl_r3"R3: " str.tostring(val_r3format.mintick))
            
    label.set_xy(lbl_s1bar_index extval_s1), label.set_text(lbl_s1"S1: " str.tostring(val_s1format.mintick))
            
    label.set_xy(lbl_s2bar_index extval_s2), label.set_text(lbl_s2"S2: " str.tostring(val_s2format.mintick))
            
    label.set_xy(lbl_s3bar_index extval_s3), label.set_text(lbl_s3"S3: " str.tostring(val_s3format.mintick))

    // Sinyal Takibi (L1 Yön Deðiþimi)
    var int trendL1 0
    if z[1]
        
    trendL1 := 1
    else if z[1]
        
    trendL1 := -1

    var string last_sig_type "-"
    var float last_sig_price na

    if ta.change(trendL1) != 0
        last_sig_type 
    := trendL1 == "AL" "SAT"
        
    last_sig_price := close

    // ─────────────────────────────────────────────────────────────────
    // 4. GÖRSEL TERMÝNAL (DASHBOARD)
    // ─────────────────────────────────────────────────────────────────
    var pos dash_pos == "Top Right" position.bottom_left dash_pos == "Top Left" position.top_left dash_pos == "Bottom Right" position.bottom_right position.bottom_left
    var table dash55 table.new(pos27bgcolor=color.new(#131722, 10), border_width=1, border_color=color.new(#363a45, 50), frame_color=color.new(#363a45, 50), frame_width=1)

    if show_dash and barstate.islast
        
    // Baþlýk
        
    table.cell(dash5500"@yörük@ 2026 Gemini Pro Eðitim Çalýþmasýdýr."bgcolor=color.new(#2962ff, 50), text_color=color.white, text_size=size.normal, text_halign=text.align_center)
        
    table.merge_cells(dash550010)
        
        
    // Deðerler
        
    table.cell(dash5501"Fiyat"text_color=color.graytext_size=size.normal)
        
    table.cell(dash5511str.tostring(closeformat.mintick), text_color=color.whitetext_size=size.normal)
        
        
    table.cell(dash5502"0"text_color=color.graytext_size=size.normal)
        
    table.cell(dash5512str.tostring(zformat.mintick), text_color=color.silvertext_size=size.normal)
        
        
    table.cell(dash5503"(1) | (2)"text_color=color.graytext_size=size.normal)
        
    table.cell(dash5513str.tostring(fast_floorformat.mintick) + " | " str.tostring(slow_floorformat.mintick), text_color=color.aquatext_size=size.normal)
        
        
    // Üçlü Kavuþum (Denge Noktasý)
        
    table.cell(dash5504"(Denge)"text_color=color.graytext_size=size.normal)
        
    table.cell(dash5514na(last_eq_val) ? "-" str.tostring(last_eq_valformat.mintick), text_color=col_eqtext_size=size.normal)
        
        
    // Son Sinyal
        
    color sig_col last_sig_type == "AL" col_up last_sig_type == "SAT" col_dn color.gray
        table
    .cell(dash5505"Son Sinyal"text_color=color.graytext_size=size.normal)
        
    table.cell(dash5515last_sig_type " (" str.tostring(last_sig_priceformat.mintick) + ")"text_color=sig_coltext_size=size.normal)

        
    // Alt Bilgi
        
    table.cell(dash5506" Yatýrým tavsiyesi DEÐÝLDÝR."text_color=color.new(color.white0), text_size=size.normal)
        
    table.merge_cells(dash550616)
    ///////////////////////////
    group_pt "Güvenli Bölge (8-34 PT Filtresi)"
    bool show_pt_bg input.bool(true"Yeþil Arka Planý Göster"group=group_pt)
    int pt_ema_len input.int(21"PT Hýzlý (EMA)"group=group_pt)
    int pt_sma_len input.int(89"PT Yavaþ (SMA)"group=group_pt)

    // ─────────────────────────────────────────────────────────────────
    // 4. MOTOR: GÜVENLÝ BÖLGE (8-34 POWER TREND FÝLTRESÝ)
    // ─────────────────────────────────────────────────────────────────
    float emaPT ta.ema(closept_ema_len), float smaPT ta.sma(closept_sma_len)
    var 
    int cL 0
    cL 
    := (low emaPT) ? nz(cL[1]) + 0
    var bool ptOn false
    ptOn 
    := ta.crossunder(emaPTsmaPT) ? false : (cL >= and emaPT smaPT true ptOn)
    bgcolor(show_pt_bg and ptOn color.new(color.gray68) : natitle="Güvenli Bölge Arka Planý")
    ////////////////////////////////////

    color col_cloud_up1 color.new(#00e676, 0)
    color col_cloud_dn1 color.new(#ff1744, 0)

    group_ayna "Makro Duvarlar (Yin-Yang Ayna)"
    float h_start input.float(0.06"Hýzlý SAR Baþlangýç"step=0.01group=group_ayna)
    float h_inc   input.float(0.06"Hýzlý SAR Ývme"step=0.01group=group_ayna)
    float h_max   input.float(0.30"Hýzlý SAR Max"step=0.1group=group_ayna)
    int pivot_len input.int(10"Duvar Tespiti (Pivot Uzunluðu)"group=group_ayna)


    // ─────────────────────────────────────────────────────────────────
    // 5. MOTOR: YÝN-YANG AYNASI VE MAKRO DUVARLAR
    // ─────────────────────────────────────────────────────────────────
    f_ozel_sar(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]

    bool yeni_gun ta.change(time("W")) != 0
    [sar_hizlitrend_hizli] = f_ozel_sar(highlowh_starth_inch_maxyeni_gun)

    float ayna_hizli trend_hizli close math.abs(close sar_hizli) : close math.abs(close sar_hizli)

    float ph_ayna ta.pivothigh(ayna_hizlipivot_lenpivot_len)
    float pl_ayna ta.pivotlow(ayna_hizlipivot_lenpivot_len)

    var array<
    linemacro_up_walls = array.new<line>()
    var array<
    linemacro_dn_walls = array.new<line>()

    // ZARÝF DOKUNUÞ: style=line.style_dotted olarak deðiþtirildi
    if not na(ph_ayna)
        
    line w_up line.new(bar_index[pivot_len], ph_aynabar_indexph_aynacolor=col_cloud_up1width=1style=line.style_dottedextend=extend.right)
        array.
    push(macro_up_wallsw_up)
        if array.
    size(macro_up_walls) > 2
            line
    .delete(array.shift(macro_up_walls))

    if 
    not na(pl_ayna)
        
    line w_dn line.new(bar_index[pivot_len], pl_aynabar_indexpl_aynacolor=col_cloud_dn1width=1style=line.style_dottedextend=extend.right)
        array.
    push(macro_dn_wallsw_dn)
        if array.
    size(macro_dn_walls) > 2
            line
    .delete(array.shift(macro_dn_walls))

    plot(ayna_hizli"Ayna"color=color.new(color.gray100), linewidth=1display=display.pane)

    // ─────────────────────────────────────────────────────────────────

    grp_pos "PENCERE VE BOYUT AYARLARI"
    i_bars    input.int(50,    "Gösterilecek Mum Sayýsý"group=grp_posminval=10)
    i_width   input.int(100,   "Pencere Geniþliði (Bar)"group=grp_posminval=20)
    i_offset  input.int(10,    "Yatay Uzaklýk (Saða)",    group=grp_pos)
    i_vScale  input.float(35.0"Dikey Ölçekleme (%)",    group=grp_posstep=1.0)

    grp_style "RENKLER VE GÖRSELLÝK"
    c_up      input.color(color.new(#00e676, 0), "Yükseliþ Mumu", group=grp_style)
    c_down    input.color(color.new(#ff1744, 0), "Düþüþ Mumu",    group=grp_style)
    c_bg      input.color(color.new(#0b0e14, 20), "Arka Plan Kutusu",group=grp_style)
    c_border  input.color(color.new(#ffffff, 80), "Pencere Çerçevesi",group=grp_style)

    c_fillUp  input.color(color.new(#26a69a, 60), "Bulut (Yükseliþ)", group=grp_style)
    c_fillDn  input.color(color.new(#ef5350, 60), "Bulut (Düþüþ)",    group=grp_style)
    c_fillRng input.color(color.new(#888888, 60), "Bulut (Yatay)",     group=grp_style)

    // ========================================================================= //
    // ================== ICS 21 MATEMATÝÐÝ (YERLEÞÝK HESAPLAMA) =============== //
    // ========================================================================= //
    // Dizi (Array) kullanmadan, doðrudan zaman serisi üzerinden çalýþýr. Çökmez.

    f_yz_sigma(len) =>
        
    float _yzOR math.log(open nz(close[1], open))
        
    float _yzCO math.log(close open)
        
    float _yzHO math.log(high open)
        
    float _yzHC math.log(high close)
        
    float _yzLO math.log(low  open)
        
    float _yzLC math.log(low  close)
        
    float _sqOR ta.variance(_yzORlen)
        
    float _sqCO ta.variance(_yzCOlen)
        
    float _sqRS ta.sma(_yzHO _yzHC _yzLO _yzLClen)
        
    float _k    0.34 / (1.34 + (len 1.0) / math.max(len 1.01.0))
        
    float _sq   nz(_sqOR) + _k nz(_sqCO) + (1.0 _k) * nz(_sqRS)
        
    math.max(math.sqrt(math.max(_sq0.0)), 1e-10)

    f_icsLine(p1x1p2x2targetXsig) =>
        
    float out p1
        
    if x1 != x2 and p1 and p2 and sig 1e-10
            float y1 
    math.log(p1) / sig
            float y2 
    math.log(p2) / sig
            float yT 
    y1 + (y2 y1) * (targetX x1) / (x2 x1)
            
    out := math.exp(yT sig)
        
    out

    f_icsAngle
    (p1x1p2x2sig) =>
        
    float out 0.0
        
    if x1 != x2 and p1 and p2 and sig 1e-10
            float y1 
    math.log(p1) / sig
            float y2 
    math.log(p2) / sig
            out 
    := math.atan((y2 y1) / (x2 x1)) * 180.0 math.pi
        out

    f_ics_calc
    () =>
        
    int P 21
        float sig 
    f_yz_sigma(20)
        
        
    float h0 ta.highest(highP), float l0 ta.lowest(lowP)
        
        if 
    bar_index 5
            
    [h0l00.0]
        else
            
    float h1 h0[P],   float l1 l0[P]
            
    float h2 h0[P*2], float l2 l0[P*2]
            
    float h3 h0[P*3], float l3 l0[P*3]
            
    float h4 h0[P*4], float l4 l0[P*4]

            
    float g0 = (h0 and l0 0) ? math.exp((math.log(h0) + math.log(l0)) / 2.0) : na
            float g1 
    = (h1 and l1 0) ? math.exp((math.log(h1) + math.log(l1)) / 2.0) : na
            float g2 
    = (h2 and l2 0) ? math.exp((math.log(h2) + math.log(l2)) / 2.0) : na
            float g3 
    = (h3 and l3 0) ? math.exp((math.log(h3) + math.log(l3)) / 2.0) : na
            float g4 
    = (h4 and l4 0) ? math.exp((math.log(h4) + math.log(l4)) / 2.0) : na

            int pd 
    g0 g1 : -1
            int seg 
    1
            
    if g0 != g1
                
    if (g1 g2 : (g1 g2 ? -0)) == pd
                    seg 
    := 2
                    
    if (g2 g3 : (g2 g3 ? -0)) == pd
                        seg 
    := 3
                        
    if (g3 g4 : (g3 g4 ? -0)) == pd
                            seg 
    := 4

            int cx0 
    int(-P/2), int cx1 cx0 Pint cx2 cx1 Pint cx3 cx2 Pint cx4 cx3 P

            float fHH 
    h0float fLH h0float fHL l0float fLL l0
            int xHH 
    cx0int xLH cx0int xHL cx0int xLL cx0

            
    if seg >= 1
                
    if h1 fHH
                    fHH 
    := h1xHH := cx1
                
    if h1 fLH
                    fLH 
    := h1xLH := cx1
                
    if l1 fHL
                    fHL 
    := l1xHL := cx1
                
    if l1 fLL
                    fLL 
    := l1xLL := cx1
            
    if seg >= 2
                
    if h2 fHH
                    fHH 
    := h2xHH := cx2
                
    if h2 fLH
                    fLH 
    := h2xLH := cx2
                
    if l2 fHL
                    fHL 
    := l2xHL := cx2
                
    if l2 fLL
                    fLL 
    := l2xLL := cx2
            
    if seg >= 3
                
    if h3 fHH
                    fHH 
    := h3xHH := cx3
                
    if h3 fLH
                    fLH 
    := h3xLH := cx3
                
    if l3 fHL
                    fHL 
    := l3xHL := cx3
                
    if l3 fLL
                    fLL 
    := l3xLL := cx3
            
    if seg >= 4
                
    if h4 fHH
                    fHH 
    := h4xHH := cx4
                
    if h4 fLH
                    fLH 
    := h4xLH := cx4
                
    if l4 fHL
                    fHL 
    := l4xHL := cx4
                
    if l4 fLL
                    fLL 
    := l4xLL := cx4

            int sLx 
    seg == cx1 seg == cx2 seg == cx3 cx4
            int sRx 
    cx0

            float endG 
    seg == g1 seg == g2 seg == g3 g4
            float ang 
    f_icsAngle(endGsLxg0sRxsig)

            
    int dir math.abs(ang) <= 0.5 pd

            float uY1 
    fHHfloat uY2 fHHfloat lY1 fLLfloat lY2 fLL
            
    if dir == 1
                uY1 
    := f_icsLine(fLHxLHfHHxHHsLxsig), uY2 := f_icsLine(fLHxLHfHHxHHsRxsig)
                
    lY1 := f_icsLine(fLLxLLfHLxHLsLxsig), lY2 := f_icsLine(fLLxLLfHLxHLsRxsig)
            else if 
    dir == -1
                uY1 
    := f_icsLine(fHHxHHfLHxLHsLxsig), uY2 := f_icsLine(fHHxHHfLHxLHsRxsig)
                
    lY1 := f_icsLine(fHLxHLfLLxLLsLxsig), lY2 := f_icsLine(fHLxHLfLLxLLsRxsig)

            
    float uYa f_icsLine(uY1sLxuY2sRx0sig)
            
    float lYa f_icsLine(lY1sLxlY2sRx0sig)

            [
    uYalYafloat(dir)]

    // O anki mumun bulut deðerlerini global olarak alýyoruz
    [uYalYabulut_yon] = f_ics_calc()

    // ========================================================================= //
    // =========================== ÇÝZÝM MOTORU (HÝYERARÞÝ) ==================== //
    // ========================================================================= //

    var box[]   kutu_bg     = array.new_box()
    var 
    line[]  cizgi_merkez= array.new_line()
    var 
    box[]   kutu_bulut  = array.new_box()
    var 
    line[]  cizgi_mum   = array.new_line()
    var 
    box[]   kutu_mum    = array.new_box()
    var 
    label[] etiketler   = array.new_label()

    f_temizle() =>
        for 
    b in kutu_bg
            box
    .delete(b)
        for 
    l in cizgi_merkez
            line
    .delete(l)
        for 
    b in kutu_bulut
            box
    .delete(b)
        for 
    l in cizgi_mum
            line
    .delete(l)
        for 
    b in kutu_mum
            box
    .delete(b)
        for 
    lbl in etiketler
            label
    .delete(lbl)
        array.
    clear(kutu_bg), array.clear(cizgi_merkez), array.clear(kutu_bulut)
        array.
    clear(cizgi_mum), array.clear(kutu_mum), array.clear(etiketler)

    if 
    barstate.islast
        f_temizle
    ()
        
        
    // --- 1. ADIM: EKRANIN GENEL MATEMATÝÐÝ VE SINIRLARI ---
        
    float max_val high
        float min_val 
    low
        
        
    // Son 'i_bars' kadar mumu geçmiþe doðru tarayýp o bölgenin Max ve Min deðerlerini buluyoruz
        
    for 0 to i_bars 1
            float _h 
    high[i], float _l low[i]
            
    float _u uYa[i],  float _d lYa[i]
            
            
    max_val := math.max(max_val_h)
            
    min_val := math.min(min_val_l)
            if 
    not na(_u)
                
    max_val := math.max(max_val_u), min_val := math.min(min_val_u)
            if 
    not na(_d)
                
    max_val := math.max(max_val_d), min_val := math.min(min_val_d)
                
        
    // Pencereyi nereye çizeceðiz? Ekranýn mevcut yüksekliðini referans alýyoruz
        
    float hv ta.highest(high300)
        
    float lv ta.lowest(low300)
        
    float cr hv lv == syminfo.mintick 100 hv lv
        float my 
    = (hv lv) / 2
        
        float er 
    cr * (i_vScale 100)
        
    float top_y my er 2
        float bot_y 
    my er 2
        float mid_y 
    = (top_y bot_y) / 2

        int start_x 
    bar_index i_offset
        int end_x   
    start_x i_width
        int mid_x   
    = (start_x end_x) / 2
        
        float hr 
    max_val min_val == syminfo.mintick max_val min_val
        float ir 
    top_y bot_y
        
        
    // Mumlar arasý geniþlik hesaplamasý
        
    float bs float(i_width) / i_bars
        int box_w 
    math.max(1int(bs 2))

        
    // --- 2. ADIM: HÝYERARÞÝK ÇÝZÝM ---
        
        // Hiyerarþi 1: Ana Pencere (Zemin)
        
    array.push(kutu_bgbox.new(start_xtop_yend_xbot_yborder_color=c_borderbgcolor=c_bg))
        
        
    // Hiyerarþi 2: Merkez Denge Çizgisi
        
    array.push(cizgi_merkezline.new(start_xmid_yend_xmid_ycolor=color.graystyle=line.style_dashed))

        
    // Hiyerarþi 3: Alt ve Üst Max/Min Etiketleri
        
    array.push(etiketlerlabel.new(mid_xtop_y"Max: " str.tostring(max_valformat.mintick), color=color.new(color.black100), textcolor=color.graystyle=label.style_label_downsize=size.small))
        array.
    push(etiketlerlabel.new(mid_xbot_y"Min: " str.tostring(min_valformat.mintick), color=color.new(color.black100), textcolor=color.graystyle=label.style_label_upsize=size.small))

        
    // Hiyerarþi 4 & 5: Bulutlar (Arkada) ve Mumlar (Önde)
        
    for 0 to i_bars 1
            int idx 
    i
            
            float _o 
    open[idx], float _h high[idx], float _l low[idx], float _c close[idx]
            
    float _u uYa[idx],  float _d lYa[idx],  float _dir bulut_yon[idx]
            
            
    // Fiyatlarý mini ekranýn y-koordinatlarýna dönüþtürüyoruz
            
    float so bot_y + ((_o min_val) / hr) * ir
            float sh 
    bot_y + ((_h min_val) / hr) * ir
            float sl 
    bot_y + ((_l min_val) / hr) * ir
            float sc 
    bot_y + ((_c min_val) / hr) * ir
            
            int xp 
    end_x int(bs)
            
            
    // A) Önce Bulutu Çiz (Arkada kalmasý için ilk bu çizilir)
            
    if not na(_u) and not na(_d)
                
    float sy_u bot_y + ((_u min_val) / hr) * ir
                float sy_d 
    bot_y + ((_d min_val) / hr) * ir
                color cCloud 
    _dir == c_fillUp _dir == -c_fillDn c_fillRng
                
    array.push(kutu_bulutbox.new(xp box_wsy_uxp box_wsy_dborder_color=nabgcolor=cCloud))
            
            
    // B) Sonra Mumu Çiz (Üste biner)
            
    color col _c >= _o c_up c_down
            
    array.push(cizgi_mumline.new(xpshxpslcolor=col))
            
            
    float box_top math.max(sosc)
            
    float box_bot math.min(sosc)
            if 
    box_top == box_bot
                
    // Mum doji ise çizgi çek
                
    array.push(cizgi_mumline.new(xp 1box_topxp 1box_botcolor=colwidth=2))
            else
                
    // Normal mum gövdesi
                
    array.push(kutu_mumbox.new(xp 1box_topxp 1box_botborder_color=colbgcolor=col)) 
    16.07.2024 - 10.12.2024

  6. Bir ara bir teams/google meet yapalým web tabanlý bir þey üretiriz belki
    Sýradan bir insan

  7. 16.07.2024 - 10.12.2024

  8. okuyan arkadaþlar...
    kullandýðým... gemini pro... promtludur...

    paylaþtýðým kodlardaki gibi... çok çizgi vs kullanmýyorum...

    sade kullanýyorum....

    örnek https://www.tradingview.com/x/TdFFgCdc/ bunun gibi...
    bu kodun hesaplamasý ise promt olarak kullanýlýyor....

    bu da... otonom hali... https://www.tradingview.com/x/GnHEhThA/
    16.07.2024 - 10.12.2024

Sayfa 417/418 ÝlkÝlk ... 317367407415416417418 SonSon

Yer Ýmleri

Yer Ýmleri

Gönderi Kurallarý

  • Yeni konu açamazsýnýz
  • Konulara cevap yazamazsýnýz
  • Yazýlara ek gönderemezsiniz
  • Yazýlarýnýzý deðiþtiremezsiniz
  •