Artan
Azalan
οΏ½οΏ½lem
BIST 30
BIST 50
BIST 100
NASDAQ 100
Hisse Fiyat Fark% Hacim (TL) DοΏ½οΏ½οΏ½k / YοΏ½ksek
40,04 10% 834,55 Mn 36,66 / 40,04
111,10 10% 1,20 Mr 100,90 / 111,10
63,80 10% 1,08 Mr 60,45 / 63,80
8,25 10% 19,74 Mn 7,55 / 8,25
44,02 10% 139,25 Mn 40,28 / 44,02
Hisse Fiyat Fark% Hacim (TL) DοΏ½οΏ½οΏ½k / YοΏ½ksek
21,06 -10% 1,59 Mr 21,06 / 25,48
19,50 -9.97% 1,94 Mr 19,50 / 21,68
6,91 -9.91% 620,75 Mn 6,91 / 8,05
8,37 -9.9% 331,09 Mn 8,37 / 9,45
7,40 -9.87% 1,70 Mr 7,39 / 8,21
Hisse Fiyat Fark% Hacim (TL) DοΏ½οΏ½οΏ½k / YοΏ½ksek
69,10 -1.43% 12,72 Mr 68,75 / 69,80
344,25 9.98% 10,34 Mr 313,25 / 344,25
295,00 0.17% 10,18 Mr 289,75 / 300,25
2,81 3.69% 9,88 Mr 2,74 / 2,86
393,50 -2.11% 8,32 Mr 389,25 / 403,25
Hisse Fiyat Fark% Hacim (TL) DοΏ½οΏ½οΏ½k / YοΏ½ksek
19,75 1.39% 771,19 Mn 18,95 / 19,86
69,10 -1.43% 12,72 Mr 68,75 / 69,80
393,50 -2.11% 8,32 Mr 389,25 / 403,25
344,25 9.98% 10,34 Mr 313,25 / 344,25
392,75 0.06% 4,26 Mr 385,50 / 399,25
Hisse Fiyat Fark% Hacim (TL) DοΏ½οΏ½οΏ½k / YοΏ½ksek
19,75 1.39% 771,19 Mn 18,95 / 19,86
69,10 -1.43% 12,72 Mr 68,75 / 69,80
95,45 2.8% 603,89 Mn 91,70 / 96,20
107,70 0.37% 129,53 Mn 106,60 / 108,50
393,50 -2.11% 8,32 Mr 389,25 / 403,25
Hisse Fiyat Fark% Hacim (TL) DοΏ½οΏ½οΏ½k / YοΏ½ksek
19,75 1.39% 771,19 Mn 18,95 / 19,86
34,30 2.88% 130,28 Mn 32,94 / 34,40
69,10 -1.43% 12,72 Mr 68,75 / 69,80
11,00 3.58% 438,82 Mn 10,45 / 11,16
80,00 0.19% 552,37 Mn 78,55 / 81,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 21/23 έlkέlk ... 111920212223 SonSon
Arama sonucu : 177 madde; 161 - 168 arasύ.

Konu: @yφrόk@’όn Heybesinden


  1.  Alύntύ Originally Posted by @yφrόk@ Yazύyύ Oku
    deneysel φrnek..
    ηift z score-όηlό arbitraj φrneπi...
    not.... Webhook ile Eώzamanlύ Tetikleme-Beta Nφtralizasyonu-Korelasyon Deπil, "Eώbόtόnleώme gibi kavramlar dikkate alύnmalύdύr...

    tw de ilk ikisi matematiksel olarak yapύlsa bile eώbόtόnleώme yapύlamύyor...

    TradingView Neden Bu Testi Yapamaz?
    Engle-Granger testi iki aώamalύ, aπύr bir ekonometrik sόreηtir:

    En Kόηόk Kareler Yφntemi (OLS Regresyonu): έki hissenin fiyat geηmiώini (MCARD ve NETCD) birbirine karώύ regrese edip aralarύndaki alfa ve beta katsayύlarύnύ bulur, ardύndan bu regresyonun Hata Terimlerini (Artύklarύ / Residuals) hesaplar. (Bunu zorlayarak Pine Script'te matrislerle yapabiliriz).

    Geniώletilmiώ Dickey-Fuller (ADF) Birim Kφk Testi (Kritik Engel): Ηύkan bu hata terimlerinin "Duraπan (Stationary)" olup olmadύπύnύ test etmek gerekir. ADF testi, geηmiώ verinin kendi gecikmeli deπerleri (lags) όzerinden karmaώύk bir diferansiyel denklem kurar ve bunu Dickey-Fuller Kritik Deπer Tablosu ile kύyaslar.

    έώte Pine Script burada felη oluyor. Pine Script'in istatistik kόtόphanesi ηok sύπdύr. Geηmiώe dφnόk dinamik matris regresyon katsayύlarύnύ ve ADF kritik deπer tablosunu (t-istatistiπi) anlύk barlarda koώturmaya kalkarsak TradingView sunucularύ "Hesaplama zaman aώύmύna uπradύ" diyerek robotu kapatύr. TV, grafik ηizmek ve basit dφngόler iηin dβhidir; ancak matris cebiri ve ekonometrik hipotez testleri iηin tasarlanmamύώtύr.

    not kύsmύnύ gφrmezden gelirsek... deneysel φrneπin kodu....
    [PHP// © Kinetik Komuta Merkezi - V9.3 άΗ ΗEKέRDEKLέ ARBέTRAJ MATRIX
    //@version=6
    strategy("V9.3 Tri-Core Arbitraj", overlay=true, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.04)

    // ══════════════════════════════════════════════════ ═══════════════════════
    // 1. GέRDέLER VE CEPHANELέK (3 HέSSE)
    // ══════════════════════════════════════════════════ ═══════════════════════
    grp_sym = "Hedef Hisseler (άηgen Kombinasyon)"
    symA = input.symbol("BIST:MCARD", "A Hissesi", group=grp_sym)
    symB = input.symbol("BIST:NETCD", "B Hissesi", group=grp_sym)
    symC = input.symbol("BIST:DOFRB", "C Hissesi", group=grp_sym)

    grp_logic = "Ηift Namlulu Motor Ayarlarύ"
    longZLength = input.int(240, "Aπύr Namlu (Uzun Z-Score)", minval=100, maxval=500, group=grp_logic)
    shortZLength = input.int(80, "Hafif Namlu (Kύsa Z-Score)", minval=20, maxval=150, group=grp_logic)
    entryZ = input.float(1.70, "Taarruz Sύnύrύ (+/-)", step=0.1, group=grp_logic)
    exitZ = input.float(0.50, "Tahliye Sύnύrύ (Kύsa Namluya Gφre)", step=0.1, group=grp_logic)
    minIntegrity = input.float(55.0, "Minimum Gόvenlik Puanύ", minval=0.0, maxval=100.0, group=grp_logic)

    hide_session = input.session("1810-0950", "Gizlenecek Φlό Saatler", group="Zaman Kalkanύ")
    tz = input.string("UTC+3", "Saat Dilimi", group="Zaman Kalkanύ")
    in_hide_session = not na(time(timeframe.period, hide_session, tz))
    should_hide = (dayofweek == dayofweek.saturday or dayofweek == dayofweek.sunday) or in_hide_session

    // ══════════════════════════════════════════════════ ═══════════════════════
    // 2. VERέ έSTέHBARATI
    // ══════════════════════════════════════════════════ ═══════════════════════
    cA_raw = request.security(symA, timeframe.period, close, gaps=barmerge.gaps_on)
    cB_raw = request.security(symB, timeframe.period, close, gaps=barmerge.gaps_on)
    cC_raw = request.security(symC, timeframe.period, close, gaps=barmerge.gaps_on)

    var float cA = na, var float cB = na, var float cC = na
    if not should_hide and cA_raw > 0 and cB_raw > 0 and cC_raw > 0
    cA := cA_raw, cB := cB_raw, cC := cC_raw

    // ══════════════════════════════════════════════════ ═══════════════════════
    // 3. KANTέTATέF MOTOR (ΦZEL FONKSέYON)
    // ══════════════════════════════════════════════════ ═══════════════════════
    f_arb_engine(price1, price2) =>
    float ratio = (not na(price1) and not na(price2)) ? (price1 / price2) : na
    float logRatio = not na(ratio) ? math.log(ratio) : na

    float meanL = ta.sma(logRatio, longZLength)
    float devL = ta.stdev(logRatio, longZLength)
    float zLong = devL > 0 ? (logRatio - meanL) / devL : na

    float meanS = ta.sma(logRatio, shortZLength)
    float devS = ta.stdev(logRatio, shortZLength)
    float zShort = devS > 0 ? (logRatio - meanS) / devS : na

    float ret1 = (not na(price1) and not na(price1[1])) ? math.log(price1 / nz(price1[1], price1)) : na
    float ret2 = (not na(price2) and not na(price2[1])) ? math.log(price2 / nz(price2[1], price2)) : na
    float pairCorr = ta.correlation(ret1, ret2, 60)

    float volShortInt = ta.stdev(logRatio, 20)
    float volBaseInt = ta.stdev(logRatio, 60)
    float volExpansion = volBaseInt > 0 ? volShortInt / volBaseInt : na
    float meanDrift = (devL > 0 and not na(meanL[20])) ? math.abs(meanL - meanL[20]) / devL : na

    float corrNorm = na(pairCorr) ? 0.0 : math.max(0, math.min(1, (pairCorr + 1.0) / 2.0))
    float driftNorm = na(meanDrift) ? 0.0 : math.max(0, math.min(1, 1.0 - meanDrift / 0.45))
    float volNorm = na(volExpansion) ? 0.0 : math.max(0, math.min(1, 1.0 - math.max(0, volExpansion - 1.0) / 0.45))

    float integrityScore = math.max(0, math.min(100, 100.0 * (0.45 * corrNorm + 0.30 * driftNorm + 0.25 * volNorm)))
    bool integrityOk = integrityScore >= minIntegrity

    [zLong, zShort, integrityScore, integrityOk]

    // άη farklύ cephe iηin motoru ηalύώtύr
    [zL_AB, zS_AB, int_AB, ok_AB] = f_arb_engine(cA, cB) // Cephe 1: A vs B
    [zL_AC, zS_AC, int_AC, ok_AC] = f_arb_engine(cA, cC) // Cephe 2: A vs C
    [zL_BC, zS_BC, int_BC, ok_BC] = f_arb_engine(cB, cC) // Cephe 3: B vs C

    // ══════════════════════════════════════════════════ ═══════════════════════
    // 4. STRATEJέ FάZYONU (SAVAή ALANI)
    // ══════════════════════════════════════════════════ ═══════════════════════
    // έώlem Tetiπi (Strateji motoru sadece Grafikteki Hisse - A Hissesi iηin iώlem aηar, kβrύ oradan φlηer)
    // A Hissesinin dahil olduπu en gόηlό makasύ bul
    bool t_long_AB = (zL_AB <= -entryZ) and (zS_AB <= -entryZ) and ok_AB
    bool t_short_AB = (zL_AB >= entryZ) and (zS_AB >= entryZ) and ok_AB

    bool t_long_AC = (zL_AC <= -entryZ) and (zS_AC <= -entryZ) and ok_AC
    bool t_short_AC = (zL_AC >= entryZ) and (zS_AC >= entryZ) and ok_AC

    bool t_long_giris = (t_long_AB or t_long_AC) and barstate.isconfirmed
    bool t_short_giris = (t_short_AB or t_short_AC) and barstate.isconfirmed

    if t_long_giris
    strategy.entry("LONG", strategy.long)
    if t_short_giris
    strategy.entry("SHORT", strategy.short)

    // Tahliye (Herhangi bir aktif cephenin makasύ kapanύrsa ηύk)
    bool tahliye_long = (zS_AB >= -exitZ) or (zS_AC >= -exitZ)
    bool tahliye_short = (zS_AB <= exitZ) or (zS_AC <= exitZ)

    if strategy.position_size > 0 and tahliye_long and barstate.isconfirmed
    strategy.close("LONG", comment="Makas Kapandύ")
    if strategy.position_size < 0 and tahliye_short and barstate.isconfirmed
    strategy.close("SHORT", comment="Makas Kapandύ")

    // Acil Tahliye (Gόvenlik έhlali)
    bool acil_tahliye = (not ok_AB and math.abs(zL_AB) >= entryZ) or (not ok_AC and math.abs(zL_AC) >= entryZ)
    if acil_tahliye and strategy.position_size != 0 and barstate.isconfirmed
    strategy.close_all(comment="INTEGRITY BLOCK! Tahliye")

    // ══════════════════════════════════════════════════ ═══════════════════════
    // 5. DEV KOMUTA PANELέ (HUD)
    // ══════════════════════════════════════════════════ ═══════════════════════
    color position_bar_col = strategy.position_size > 0 ? color.new(color.aqua, 0) : strategy.position_size < 0 ? color.new(color.fuchsia, 0) : color.new(color.gray, 50)
    barcolor(position_bar_col, title="Operasyon Bar Rengi")

    float br_kar = strategy.grossprofit, float br_zarar = strategy.grossloss
    float kar_faktoru = br_zarar == 0 ? (br_kar > 0 ? 99.99 : 0.0) : (br_kar / br_zarar)

    if barstate.islast
    string nA = str.replace_all(symA, "BIST:", "")
    string nB = str.replace_all(symB, "BIST:", "")
    string nC = str.replace_all(symC, "BIST:", "")

    color c_bull = color.rgb(34, 197, 166)
    color c_bear = color.rgb(244, 114, 182)
    color c_neut = color.rgb(245, 189, 92)

    var table hud = table.new(position.top_right, 4, 6, bgcolor=color.new(#0D0D0D, 15), border_color=color.new(color.gray, 70), border_width=1)

    // άst Baώlύk
    table.cell(hud, 0, 0, "⚔️ V9.3 TRI-CORE MATRIX ⚔️", text_color=color.white, text_size=size.normal, bgcolor=color.new(#181818, 0), text_halign=text.align_center)
    table.merge_cells(hud, 0, 0, 3, 0)

    // Sόtun Baώlύklarύ
    table.cell(hud, 0, 1, "Kombinasyon (Cephe)", text_color=color.gray, text_size=size.small, bgcolor=color.new(#111111, 0))
    table.cell(hud, 1, 1, "Z-Score (Aπύr/Hafif)", text_color=color.gray, text_size=size.small, bgcolor=color.new(#111111, 0))
    table.cell(hud, 2, 1, "Gόvenlik", text_color=color.gray, text_size=size.small, bgcolor=color.new(#111111, 0))
    table.cell(hud, 3, 1, "Sistem Emri", text_color=color.gray, text_size=size.small, bgcolor=color.new(#111111, 0))

    // 1. Cephe (A vs B)
    bool is_AB_active = math.abs(zL_AB) >= entryZ and math.abs(zS_AB) >= entryZ and ok_AB
    string emir_AB = is_AB_active ? (zL_AB > 0 ? nA+" SAT\n"+nB+" AL" : nA+" AL\n"+nB+" SAT") : "BEKLE"
    color c_AB = is_AB_active ? (zL_AB > 0 ? c_bear : c_bull) : color.gray

    table.cell(hud, 0, 2, nA + " / " + nB, text_color=color.white, text_size=size.small, bgcolor=color.new(#161616, 0))
    table.cell(hud, 1, 2, str.tostring(zL_AB, "#.##") + " | " + str.tostring(zS_AB, "#.##"), text_color=math.abs(zL_AB)>=entryZ ? c_neut : color.white, text_size=size.small, bgcolor=color.new(#161616, 0))
    table.cell(hud, 2, 2, str.tostring(int_AB, "#"), text_color=ok_AB ? c_bull : c_bear, text_size=size.small, bgcolor=color.new(#161616, 0))
    table.cell(hud, 3, 2, emir_AB, text_color=c_AB, text_size=size.small, bgcolor=color.new(#161616, 0))

    // 2. Cephe (A vs C)
    bool is_AC_active = math.abs(zL_AC) >= entryZ and math.abs(zS_AC) >= entryZ and ok_AC
    string emir_AC = is_AC_active ? (zL_AC > 0 ? nA+" SAT\n"+nC+" AL" : nA+" AL\n"+nC+" SAT") : "BEKLE"
    color c_AC = is_AC_active ? (zL_AC > 0 ? c_bear : c_bull) : color.gray

    table.cell(hud, 0, 3, nA + " / " + nC, text_color=color.white, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
    table.cell(hud, 1, 3, str.tostring(zL_AC, "#.##") + " | " + str.tostring(zS_AC, "#.##"), text_color=math.abs(zL_AC)>=entryZ ? c_neut : color.white, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
    table.cell(hud, 2, 3, str.tostring(int_AC, "#"), text_color=ok_AC ? c_bull : c_bear, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))
    table.cell(hud, 3, 3, emir_AC, text_color=c_AC, text_size=size.small, bgcolor=color.new(#1A1A1A, 0))

    // 3. Cephe (B vs C)
    bool is_BC_active = math.abs(zL_BC) >= entryZ and math.abs(zS_BC) >= entryZ and ok_BC
    string emir_BC = is_BC_active ? (zL_BC > 0 ? nB+" SAT\n"+nC+" AL" : nB+" AL\n"+nC+" SAT") : "BEKLE"
    color c_BC = is_BC_active ? (zL_BC > 0 ? c_bear : c_bull) : color.gray

    table.cell(hud, 0, 4, nB + " / " + nC, text_color=color.white, text_size=size.small, bgcolor=color.new(#161616, 0))
    table.cell(hud, 1, 4, str.tostring(zL_BC, "#.##") + " | " + str.tostring(zS_BC, "#.##"), text_color=math.abs(zL_BC)>=entryZ ? c_neut : color.white, text_size=size.small, bgcolor=color.new(#161616, 0))
    table.cell(hud, 2, 4, str.tostring(int_BC, "#"), text_color=ok_BC ? c_bull : c_bear, text_size=size.small, bgcolor=color.new(#161616, 0))
    table.cell(hud, 3, 4, emir_BC, text_color=c_BC, text_size=size.small, bgcolor=color.new(#161616, 0))

    // Alt Kύsύm: Kβr Faktφrό Φzeti
    table.cell(hud, 0, 5, "Sistem Kβr Faktφrό", text_color=color.white, text_size=size.small, bgcolor=color.new(#111111, 0))
    table.merge_cells(hud, 0, 5, 2, 5)
    table.cell(hud, 3, 5, str.tostring(kar_faktoru, "#.##"), text_color=kar_faktoru >= 1.2 ? c_bull : c_bear, text_size=size.small, bgcolor=color.new(#111111, 0), text_style=text.format_bold)][/PHP]

    PHP Code:
    // © Kinetik Komuta Merkezi - V9.3 άΗ ΗEKέRDEKLέ ARBέTRAJ MATRIX
    //@version=6
    strategy("V9.3 Tri-Core Arbitraj"overlay=trueinitial_capital=10000default_qty_type=strategy.percent_of_equitydefault_qty_value=100commission_type=strategy.commission.percentcommission_value=0.04)

    // ═════════════════════════════════════════════════════════════════════════
    //  1. GέRDέLER VE CEPHANELέK (3 HέSSE)
    // ═════════════════════════════════════════════════════════════════════════
    grp_sym "Hedef Hisseler (άηgen Kombinasyon)"
    symA input.symbol("BIST:MCARD""A Hissesi"group=grp_sym)
    symB input.symbol("BIST:NETCD""B Hissesi"group=grp_sym)
    symC input.symbol("BIST:DOFRB""C Hissesi"group=grp_sym)

    grp_logic "Ηift Namlulu Motor Ayarlarύ"
    longZLength  input.int(240"Aπύr Namlu (Uzun Z-Score)"minval=100maxval=500group=grp_logic)
    shortZLength input.int(80"Hafif Namlu (Kύsa Z-Score)"minval=20maxval=150group=grp_logic)
    entryZ       input.float(1.70"Taarruz Sύnύrύ (+/-)"step=0.1group=grp_logic)
    exitZ        input.float(0.50"Tahliye Sύnύrύ (Kύsa Namluya Gφre)"step=0.1group=grp_logic)
    minIntegrity input.float(55.0"Minimum Gόvenlik Puanύ"minval=0.0maxval=100.0group=grp_logic)

    hide_session input.session("1810-0950""Gizlenecek Φlό Saatler"group="Zaman Kalkanύ")
    tz input.string("UTC+3""Saat Dilimi"group="Zaman Kalkanύ")
    in_hide_session not na(time(timeframe.periodhide_sessiontz))
    should_hide = (dayofweek == dayofweek.saturday or dayofweek == dayofweek.sunday) or in_hide_session

    // ═════════════════════════════════════════════════════════════════════════
    //  2. VERέ έSTέHBARATI
    // ═════════════════════════════════════════════════════════════════════════
    cA_raw request.security(symAtimeframe.periodclosegaps=barmerge.gaps_on)
    cB_raw request.security(symBtimeframe.periodclosegaps=barmerge.gaps_on)
    cC_raw request.security(symCtimeframe.periodclosegaps=barmerge.gaps_on)

    var 
    float cA na, var float cB na, var float cC na
    if not should_hide and cA_raw and cB_raw and cC_raw 0
        cA 
    := cA_rawcB := cB_rawcC := cC_raw

    // ═════════════════════════════════════════════════════════════════════════
    //  3. KANTέTATέF MOTOR (ΦZEL FONKSέYON)
    // ═════════════════════════════════════════════════════════════════════════
    f_arb_engine(price1price2) =>
        
    float ratio = (not na(price1) and not na(price2)) ? (price1 price2) : na
        float logRatio 
    not na(ratio) ? math.log(ratio) : na

        float meanL 
    ta.sma(logRatiolongZLength)
        
    float devL  ta.stdev(logRatiolongZLength)
        
    float zLong devL ? (logRatio meanL) / devL na

        float meanS 
    ta.sma(logRatioshortZLength)
        
    float devS  ta.stdev(logRatioshortZLength)
        
    float zShort devS ? (logRatio meanS) / devS na

        float ret1 
    = (not na(price1) and not na(price1[1])) ? math.log(price1 nz(price1[1], price1)) : na
        float ret2 
    = (not na(price2) and not na(price2[1])) ? math.log(price2 nz(price2[1], price2)) : na
        float pairCorr 
    ta.correlation(ret1ret260)

        
    float volShortInt ta.stdev(logRatio20)
        
    float volBaseInt  ta.stdev(logRatio60)
        
    float volExpansion volBaseInt volShortInt volBaseInt na
        float meanDrift 
    = (devL and not na(meanL[20])) ? math.abs(meanL meanL[20]) / devL na

        float corrNorm  
    na(pairCorr) ? 0.0 math.max(0math.min(1, (pairCorr 1.0) / 2.0))
        
    float driftNorm na(meanDrift) ? 0.0 math.max(0math.min(11.0 meanDrift 0.45))
        
    float volNorm   na(volExpansion) ? 0.0 math.max(0math.min(11.0 math.max(0volExpansion 1.0) / 0.45))

        
    float integrityScore math.max(0math.min(100100.0 * (0.45 corrNorm 0.30 driftNorm 0.25 volNorm)))
        
    bool integrityOk integrityScore >= minIntegrity

        
    [zLongzShortintegrityScoreintegrityOk]

    // άη farklύ cephe iηin motoru ηalύώtύr
    [zL_ABzS_ABint_ABok_AB] = f_arb_engine(cAcB// Cephe 1: A vs B
    [zL_ACzS_ACint_ACok_AC] = f_arb_engine(cAcC// Cephe 2: A vs C
    [zL_BCzS_BCint_BCok_BC] = f_arb_engine(cBcC// Cephe 3: B vs C

    // ═════════════════════════════════════════════════════════════════════════
    //  4. STRATEJέ FάZYONU (SAVAή ALANI)
    // ═════════════════════════════════════════════════════════════════════════
    // έώlem Tetiπi (Strateji motoru sadece Grafikteki Hisse - A Hissesi iηin iώlem aηar, kβrύ oradan φlηer)
    // A Hissesinin dahil olduπu en gόηlό makasύ bul
    bool t_long_AB  = (zL_AB <= -entryZ) and (zS_AB <= -entryZ) and ok_AB
    bool t_short_AB 
    = (zL_AB >= entryZ)  and (zS_AB >= entryZ)  and ok_AB

    bool t_long_AC  
    = (zL_AC <= -entryZ) and (zS_AC <= -entryZ) and ok_AC
    bool t_short_AC 
    = (zL_AC >= entryZ)  and (zS_AC >= entryZ)  and ok_AC

    bool t_long_giris  
    = (t_long_AB or t_long_AC) and barstate.isconfirmed
    bool t_short_giris 
    = (t_short_AB or t_short_AC) and barstate.isconfirmed

    if t_long_giris
        strategy
    .entry("LONG"strategy.long)
    if 
    t_short_giris
        strategy
    .entry("SHORT"strategy.short)

    // Tahliye (Herhangi bir aktif cephenin makasύ kapanύrsa ηύk)
    bool tahliye_long  = (zS_AB >= -exitZ) or (zS_AC >= -exitZ)
    bool tahliye_short = (zS_AB <= exitZ)  or (zS_AC <= exitZ)

    if 
    strategy.position_size and tahliye_long and barstate.isconfirmed
        strategy
    .close("LONG"comment="Makas Kapandύ")
    if 
    strategy.position_size and tahliye_short and barstate.isconfirmed
        strategy
    .close("SHORT"comment="Makas Kapandύ")

    // Acil Tahliye (Gόvenlik έhlali)
    bool acil_tahliye = (not ok_AB and math.abs(zL_AB) >= entryZ) or (not ok_AC and math.abs(zL_AC) >= entryZ)
    if 
    acil_tahliye and strategy.position_size != and barstate.isconfirmed
        strategy
    .close_all(comment="INTEGRITY BLOCK! Tahliye")

    // ═════════════════════════════════════════════════════════════════════════
    //  5. DEV KOMUTA PANELέ (HUD)
    // ═════════════════════════════════════════════════════════════════════════
    color position_bar_col strategy.position_size color.new(color.aqua0) : strategy.position_size color.new(color.fuchsia0) : color.new(color.gray50)
    barcolor(position_bar_coltitle="Operasyon Bar Rengi")

    float br_kar strategy.grossprofitfloat br_zarar strategy.grossloss
    float kar_faktoru 
    br_zarar == ? (br_kar 99.99 0.0) : (br_kar br_zarar)

    if 
    barstate.islast
        string nA 
    str.replace_all(symA"BIST:""")
        
    string nB str.replace_all(symB"BIST:""")
        
    string nC str.replace_all(symC"BIST:""")
        
        
    color c_bull color.rgb(34197166
        
    color c_bear color.rgb(244114182
        
    color c_neut color.rgb(24518992
        
        var 
    table hud table.new(position.top_right46bgcolor=color.new(#0D0D0D, 15), border_color=color.new(color.gray, 70), border_width=1)
        
        // άst Baώlύk
        
    table.cell(hud00"⚔️ V9.3 TRI-CORE MATRIX ⚔️"text_color=color.whitetext_size=size.normalbgcolor=color.new(#181818, 0), text_halign=text.align_center)
        
    table.merge_cells(hud0030)
        
        
    // Sόtun Baώlύklarύ
        
    table.cell(hud01"Kombinasyon (Cephe)"text_color=color.graytext_size=size.smallbgcolor=color.new(#111111, 0))
        
    table.cell(hud11"Z-Score (Aπύr/Hafif)"text_color=color.graytext_size=size.smallbgcolor=color.new(#111111, 0))
        
    table.cell(hud21"Gόvenlik"text_color=color.graytext_size=size.smallbgcolor=color.new(#111111, 0))
        
    table.cell(hud31"Sistem Emri"text_color=color.graytext_size=size.smallbgcolor=color.new(#111111, 0))

        // 1. Cephe (A vs B)
        
    bool is_AB_active math.abs(zL_AB) >= entryZ and math.abs(zS_AB) >= entryZ and ok_AB
        string emir_AB 
    is_AB_active ? (zL_AB nA+" SAT\n"+nB+" AL" nA+" AL\n"+nB+" SAT") : "BEKLE"
        
    color c_AB is_AB_active ? (zL_AB c_bear c_bull) : color.gray
        
        table
    .cell(hud02nA " / " nBtext_color=color.whitetext_size=size.smallbgcolor=color.new(#161616, 0))
        
    table.cell(hud12str.tostring(zL_AB"#.##") + " | " str.tostring(zS_AB"#.##"), text_color=math.abs(zL_AB)>=entryZ c_neut color.whitetext_size=size.smallbgcolor=color.new(#161616, 0))
        
    table.cell(hud22str.tostring(int_AB"#"), text_color=ok_AB c_bull c_beartext_size=size.smallbgcolor=color.new(#161616, 0))
        
    table.cell(hud32emir_ABtext_color=c_ABtext_size=size.smallbgcolor=color.new(#161616, 0))

        // 2. Cephe (A vs C)
        
    bool is_AC_active math.abs(zL_AC) >= entryZ and math.abs(zS_AC) >= entryZ and ok_AC
        string emir_AC 
    is_AC_active ? (zL_AC nA+" SAT\n"+nC+" AL" nA+" AL\n"+nC+" SAT") : "BEKLE"
        
    color c_AC is_AC_active ? (zL_AC c_bear c_bull) : color.gray

        table
    .cell(hud03nA " / " nCtext_color=color.whitetext_size=size.smallbgcolor=color.new(#1A1A1A, 0))
        
    table.cell(hud13str.tostring(zL_AC"#.##") + " | " str.tostring(zS_AC"#.##"), text_color=math.abs(zL_AC)>=entryZ c_neut color.whitetext_size=size.smallbgcolor=color.new(#1A1A1A, 0))
        
    table.cell(hud23str.tostring(int_AC"#"), text_color=ok_AC c_bull c_beartext_size=size.smallbgcolor=color.new(#1A1A1A, 0))
        
    table.cell(hud33emir_ACtext_color=c_ACtext_size=size.smallbgcolor=color.new(#1A1A1A, 0))

        // 3. Cephe (B vs C)
        
    bool is_BC_active math.abs(zL_BC) >= entryZ and math.abs(zS_BC) >= entryZ and ok_BC
        string emir_BC 
    is_BC_active ? (zL_BC nB+" SAT\n"+nC+" AL" nB+" AL\n"+nC+" SAT") : "BEKLE"
        
    color c_BC is_BC_active ? (zL_BC c_bear c_bull) : color.gray

        table
    .cell(hud04nB " / " nCtext_color=color.whitetext_size=size.smallbgcolor=color.new(#161616, 0))
        
    table.cell(hud14str.tostring(zL_BC"#.##") + " | " str.tostring(zS_BC"#.##"), text_color=math.abs(zL_BC)>=entryZ c_neut color.whitetext_size=size.smallbgcolor=color.new(#161616, 0))
        
    table.cell(hud24str.tostring(int_BC"#"), text_color=ok_BC c_bull c_beartext_size=size.smallbgcolor=color.new(#161616, 0))
        
    table.cell(hud34emir_BCtext_color=c_BCtext_size=size.smallbgcolor=color.new(#161616, 0))

        // Alt Kύsύm: Kβr Faktφrό Φzeti
        
    table.cell(hud05"Sistem Kβr Faktφrό"text_color=color.whitetext_size=size.smallbgcolor=color.new(#111111, 0))
        
    table.merge_cells(hud0525)
        
    table.cell(hud35str.tostring(kar_faktoru"#.##"), text_color=kar_faktoru >= 1.2 c_bull c_beartext_size=size.smallbgcolor=color.new(#111111, 0)) 
    16.07.2024 - 10.12.2024

  2. ai ye yazdύrύlan strateji deneme φrnekleri...
    PHP Code:
    // © Kinetik Komuta Merkezi - V8.3 CYBORG MATRIX (Canlύ PF Radarύ)
    //@version=6
    strategy("V8.3 Cyborg Matrix"overlay=trueinitial_capital=1000default_qty_type=strategy.percent_of_equitydefault_qty_value=100commission_type=strategy.commission.percentcommission_value=0.04)
    ///indicator('Gόnlόk Statik Regresyon Kanalύ [Karargah]', overlay=true, max_lines_count=500)
    // ═════════════════════════════════════════════════════════════════════════
    //  1. MATEMATέKSEL ΗEKέRDEK
    // ═════════════════════════════════════════════════════════════════════════
    pine_ema(srclength) => 
        
    float alpha / (length 1)
        var 
    float sum na
        sum 
    := na(sum[1]) ? src alpha src + (alpha) * nz(sum[1])
        
    sum

    clamp
    (xab) => math.min(math.max(xa), b)
    f_tanh(v) => (math.exp(-v)) / (math.exp(-v))

    // ═════════════════════════════════════════════════════════════════════════
    //  2. GέRDέLER
    // ═════════════════════════════════════════════════════════════════════════
    grp_kalman "Kalman Radar Ayarlarύ"
    factor input.float(0.5"Ηift EMA Hύzύ"minval=0.1step=0.1group=grp_kalman)
    r_ratiob input.int(5"Yavaώ Kalman R"step=5group=grp_kalman)
    r_ratios input.int(20"Hύzlύ Kalman R"step=5group=grp_kalman)
    q_ratio input.float(0.002"Kalman Q Sabiti"step=0.001group=grp_kalman)

    i_period input.int(19"έzotropik Dόrbόn Periyodu"minval=5group="έzotropik Dόrbόn")

    // ═════════════════════════════════════════════════════════════════════════
    //  3. KALMAN RADARI (GέRέή YΦNά έΗέN ΦRS)
    // ═════════════════════════════════════════════════════════════════════════
    calc_kalman(float srcfloat p_statefloat p_cvfloat R_rawfloat Q_raw) =>
        
    float q_process clamp(nz(Q_raw0.1), 0.00110.0) * q_ratio
        float r_adaptive 
    math.max(nz(R_raw1.0), 1.0)
        
    float current_p_cov p_cv q_process
        float k_gain 
    current_p_cov / (current_p_cov r_adaptive 1e-10)
        
    float next_state nz(p_statesrc) + k_gain * (src nz(p_statesrc))
        
    float next_cov   = (k_gain) * current_p_cov
        
    [next_statenext_cov]

    float ema_val pine_ema(pine_ema(closefactor), factor)
    float vol_base math.max(ta.atr(14), 1e-6)

    var 
    float kf_stateb na, var float p_covb 1.0
    float resb 
    ema_val nz(kf_stateb[1], ema_val)
    float res_varb math.pow(resb2) / math.pow(vol_base2)
    [
    new_valbnew_covb] = calc_kalman(ema_valkf_statebp_covbnz(ta.rma(res_varbr_ratiob), 1.0), nz(ta.rma(res_varb5), 0.1))
    kf_stateb := new_valbp_covb := new_covb
    float kalman_yavas 
    pine_ema(kf_stateb3)

    var 
    float kf_states na, var float p_covs 1.0
    float ress 
    ema_val nz(kf_states[1], ema_val)
    float res_vars math.pow(ress2) / math.pow(vol_base2)
    [
    new_valsnew_covs] = calc_kalman(ema_valkf_statesp_covsnz(ta.rma(res_varsr_ratios), 1.0), nz(ta.rma(res_vars5), 0.1))
    kf_states := new_valsp_covs := new_covs
    float kalman_hizli 
    pine_ema(kf_states5)

    bool makro_boga kalman_hizli kalman_yavas
    bool makro_ayi 
    kalman_hizli kalman_yavas

    // ═════════════════════════════════════════════════════════════════════════
    //  4. έZOTROPέK KANAL (GέRέή TETέΠέ έΗέN ΗEKέΗ)
    // ═════════════════════════════════════════════════════════════════════════
    float iso_chUp ta.highest(highi_period)[1]
    float iso_chLo ta.lowest(lowi_period)[1]
    bool tavan_kirildi close iso_chUp
    bool taban_kirildi 
    close iso_chLo

    // ═════════════════════════════════════════════════════════════════════════
    //  5. DBHF KALKANI (ΗIKIή/TAHLέYE έΗέN έZ SάREN STOP)
    // ═════════════════════════════════════════════════════════════════════════
    f_dbhf_sniper(srcatrLenatrMultenterMultexitMultresponse) =>
        var 
    float dbhf na
        
    if na(dbhf)
            
    dbhf := src
        float tauEnter 
    ta.atr(atrLen) * atrMult enterMult
        float diff 
    src dbhf
        
    if diff tauEnter
            dbhf 
    += response * (diff tauEnter)
        else if 
    diff < -tauEnter
            dbhf 
    += response * (diff tauEnter)
        
    dbhf

    float dbhf_macro_cizgi 
    f_dbhf_sniper(hl2141.51.00.50.1)

    // ═════════════════════════════════════════════════════════════════════════
    //  6. STRATEJέ FάZYONU (GέRέή VE ΗIKIή BΦLάNMESέ)
    // ═════════════════════════════════════════════════════════════════════════
    bool t_long_giris makro_boga and tavan_kirildi and barstate.isconfirmed
    bool t_short_giris 
    makro_ayi and taban_kirildi and barstate.isconfirmed

    if t_long_giris
        strategy
    .entry("LONG"strategy.long)
    if 
    t_short_giris
        strategy
    .entry("SHORT"strategy.short)

    var 
    float iz_suren_stop na

    if strategy.position_size 0
        iz_suren_stop 
    := math.max(nz(iz_suren_stop[1], iz_suren_stop), dbhf_macro_cizgi)
        if 
    close iz_suren_stop and barstate.isconfirmed
            strategy
    .close("LONG"comment="Kalkan Delindi")
    else if 
    strategy.position_size 0
        iz_suren_stop 
    := math.min(nz(iz_suren_stop[1], iz_suren_stop), dbhf_macro_cizgi)
        if 
    close iz_suren_stop and barstate.isconfirmed
            strategy
    .close("SHORT"comment="Kalkan Delindi")
    else
        
    iz_suren_stop := na 

    // ═════════════════════════════════════════════════════════════════════════
    //  7. TAKTέKSEL ARAYάZ (GΦRSEL FάZYON)
    // ═════════════════════════════════════════════════════════════════════════
    plot(iso_chUp"Tavan"color=color.new(color.aqua40), style=plot.style_stepline)
    plot(iso_chLo"Taban"color=color.new(color.red40), style=plot.style_stepline)
    plot(iz_suren_stop"έz Sόren DBHF Kalkanύ"color=strategy.position_size color.aqua strategy.position_size color.fuchsia nastyle=plot.style_steplinelinewidth=3)

    plotshape(t_long_giris and strategy.position_size <= 0"AL"shape.triangleuplocation.belowbarcolor.aquasize=size.small)
    plotshape(t_short_giris and strategy.position_size >= 0"SAT"shape.triangledownlocation.abovebarcolor.redsize=size.small)

    //color position_bar_col = strategy.position_size > 0 ? color.new(color.aqua, 0) : strategy.position_size < 0 ? color.new(color.fuchsia, 0) : na
    //barcolor(position_bar_col, title="Operasyon Bar Rengi")

    // ═════════════════════════════════════════════════════════════════════════
    //  8. CANLI KΒR FAKTΦRά (PF) RADARI
    // ═════════════════════════════════════════════════════════════════════════
    float br_kar strategy.grossprofit
    float br_zarar 
    strategy.grossloss
    float kar_faktoru 
    br_zarar == ? (br_kar 99.99 0.0) : (br_kar br_zarar)

    if 
    barstate.islast
        
    var table hud table.new(position.top_right23bgcolor=color.new(#0D0D0D, 20), border_color=color.new(color.gray, 80), border_width=1)
        
    table.cell(hud00"@yφrόk@ Matrix V8.3"text_color=color.whitetext_size=size.smallbgcolor=color.new(#111111, 0), text_halign=text.align_center)
        
    table.merge_cells(hud0010)
        
        
    table.cell(hud01"Operasyon"text_color=color.whitetext_size=size.smallbgcolor=color.new(#1A1A1A, 0))
        
    table.cell(hud11strategy.position_size "LONG AKTέF" strategy.position_size "SHORT AKTέF" "PUSUDA"text_color=strategy.position_size color.aqua strategy.position_size color.fuchsia color.graytext_size=size.smallbgcolor=color.new(#1A1A1A, 0))
        
        
    color pf_color kar_faktoru >= 1.2 color.lime color.red
        table
    .cell(hud02"Kβr Faktφrό"text_color=color.whitetext_size=size.smallbgcolor=color.new(#161616, 0))
        
    table.cell(hud12str.tostring(kar_faktoru"#.##"), text_color=pf_colortext_size=size.smallbgcolor=color.new(#161616, 0))
    ///////////////

    // ═════════════════════════════════════════════════════════════════════════
    //  1. GέRDέLER VE ZIRH AYARLARI
    // ═════════════════════════════════════════════════════════════════════════
    src   input.source(close'Kaynak Fiyat')
    mult  input.float(1.0'Bant Geniώliπi (Sapma Ηarpanύ)'step=0.1minval=0.1)
    bands input.bool(true'Dύώ Koruma Bantlarύnύ Gφster')

    grpC    "Renk Ayarlarύ"
    col     input.color(#FF5D00, 'Tek Renk Modu', group=grpC)
    bicolor input.bool(true'Trende Gφre Ηift Renk (Akύllύ)'group=grpC)
    colA    input.color(color.rgb(246247244), 'Yόkseliώ Rengi'group=grpC)
    colB    input.color(color.rgb(2432352), 'Dόώόώ Rengi'group=grpC)

    // ═════════════════════════════════════════════════════════════════════════
    //  2. GάNLάK (DAILY) ZAMAN DέLέMέ TESPέTέ
    // ═════════════════════════════════════════════════════════════════════════
    // Gόn deπiώtiπinde 'true' dφner, bφylece dόnόn ηizgisi biter ve yeni gόnόn kanalύ baώlar.
    bool new_day ta.change(time("D")) != or barstate.isfirst

    // ═════════════════════════════════════════════════════════════════════════
    //  3. MATRέS VE HAFIZA DEΠέήKENLERέ
    // ═════════════════════════════════════════════════════════════════════════
    var line ln  na
    var line lnU na
    var line lnD na

    var array<int>   aX = array.new<int>()
    var array<
    floataY = array.new<float>()

    var 
    float Ex  0.
    var float Ey  0.
    var float Ex2 0.
    var float Exy 0.
    var int   N   0

    // ═════════════════════════════════════════════════════════════════════════
    //  4. STATέK REGRESYON MOTORU (EN KάΗάK KARELER YΦNTEMέ)
    // ═════════════════════════════════════════════════════════════════════════
    if new_day
        
    // Yeni gόn doπduπunda tόm hafύzayύ temizle ve o gόne ait yeni lazerleri fύrlat
        
    Ex  := 0.
        Ey  
    := 0.
        Ex2 
    := 0.
        Exy 
    := 0.
        
    array.clear(aX)
        array.
    clear(aY)
        
    N   := 0
        
        ln  
    := line.new(bar_indexsrcbar_indexsrccolor=colstyle=line.style_dashedwidth=2)
        
    //if bands
            //lnU := line.new(bar_index, src, bar_index, src, color=col, style=line.style_dotted, width=1)
            //lnD := line.new(bar_index, src, bar_index, src, color=col, style=line.style_dotted, width=1)

    // Canlύ mermileri (verileri) matrise ekle
    Ex  += bar_index
    Ey  
    += src
    Ex2 
    += math.pow(bar_index2)
    Exy += bar_index src
    N   
    += 1

    array.unshift(aXbar_index)
    array.
    unshift(aYsrc)

    // Bant Geniώliπi iηin Gόvenli Standart Sapma Hesaplamalarύ (Sύfύra Bφlόnme Korumalύ)
    float cov     = array.size(aX) > ? array.covariance(aYaX) : 0
    float stdev_Y 
    = array.size(aY) > ? array.stdev(aY) : 0
    float stdev_X 
    = array.size(aX) > ? array.stdev(aX) : 0
    float aY_var  
    = array.size(aY) > ? array.variance(aY) : 0

    float r2   
    = (stdev_Y != and stdev_X != 0) ? math.pow(cov / (stdev_Y stdev_X), 2) : 0
    float rss  
    aY_var - (r2 aY_var)
    float dist math.sqrt(math.max(rss0)) * mult

    // Eπim (Slope - m) ve Kesiώim (Intercept - b)
    float denominator = (Ex2 math.pow(Ex2))
    float m denominator != ? (Exy Ex Ey) / denominator 0
    float b 
    != ? (Ey Ex) / 0

    // O anki barύn bitiώ noktasύ
    float yMx bar_index b

    // ═════════════════════════════════════════════════════════════════════════
    //  5. ΗέZGέLERέ GάNCELLE (LAZER HέZALAMA)
    // ═════════════════════════════════════════════════════════════════════════
    if not na(ln)
        
    // Eπime gφre yeώil/kύrmύzύ akύllύ renk seηimi
        
    color cl bicolor ? (colA colB) : col
        int x1 
    line.get_x1(ln)
        
        
    // Orta Denge Ηizgisi
        
    line.set_xy2(lnbar_indexyMx)
        
    line.set_y1(lnx1 b)
        
    line.set_color(lncl)

        if 
    bands
            
    // άst Kalkan
            
    line.set_xy2(lnUbar_indexyMx dist)
            
    line.set_y1(lnUx1 dist)
            
    line.set_color(lnUcl)

            
    // Alt Kalkan
            
    line.set_xy2(lnDbar_indexyMx dist)
            
    line.set_y1(lnDx1 dist)
            
    line.set_color(lnDcl)
    ///////////////////

    // ═════════════════════════════════════════════════════════════════════════
    //  1. GέRDέLER VE AYARLAR
    // ═════════════════════════════════════════════════════════════════════════
    string f_type       input.string("Type 1"title="Filtre Tipi"options=["Type 1""Type 2"])
    string mov_src      input.string("Close"title="Hareket Kaynaπύ"options=["Wicks""Close"])
    float  rng_qty      input.float(2.618title="Range Boyutu (Ηarpan)"minval=0.0000001)
    string rng_scale    input.string("Average Change"title="Range Φlηeπi"options=["Points""Pips""Ticks""% of Price""ATR""Average Change""Standard Deviation""Absolute"])
    int    rng_per      input.int(14title="Range Periyodu"minval=1)
    bool   smooth_range input.bool(truetitle="Range Yumuώatma (Smooth)")
    int    smooth_per   input.int(27title="Yumuώatma Periyodu"minval=1)
    bool   av_vals      input.bool(falsetitle="Filtre Deπiώimlerini Ortalamaya Al")
    int    av_samples   input.int(2title="Ortalama Alύnacak Deπiώim Sayύsύ"minval=1)

    // ═════════════════════════════════════════════════════════════════════════
    //  2. MATEMATέKSEL ΗEKέRDEK (Koώullu Diziler)
    // ═════════════════════════════════════════════════════════════════════════
    Cond_EMA(float xbool condfloat n) =>
        var 
    val = array.new<float>()
        var 
    ema_val = array.new<float>(1na)
        if 
    cond
            
    array.push(valx)
            if array.
    size(val) > 1
                
    array.remove(val0)
            
            
    float current_val = array.get(val0)
            
    float prev_ema = array.get(ema_val0)
            
            if 
    na(prev_ema)
                
    prev_ema := current_val
                
            float new_ema 
    = (current_val prev_ema) * (/ (1)) + prev_ema
            
    array.set(ema_val0new_ema)
        array.
    get(ema_val0)

    Cond_SMA(float xbool condfloat n) =>
        var 
    vals = array.new<float>()
        if 
    cond
            
    array.push(valsx)
            if array.
    size(vals) > n
                
    array.remove(vals0)
        array.
    avg(vals)

    Stdev(float xfloat n) =>
        
    math.sqrt(Cond_SMA(math.pow(x2), truen) - math.pow(Cond_SMA(xtruen), 2))

    rng_size(float xstring scalefloat qtyfloat n) => 
        
    float ATR Cond_EMA(ta.tr(true), truen)
        
    float AC  Cond_EMA(math.abs(ta.change(x)), truen)
        
    float SD  Stdev(xn)
        
        
    float res scale=="Pips" qty*0.0001 scale=="Points" qty*syminfo.pointvalue scale=="% of Price" close*qty/100 scale=="ATR" qty*ATR scale=="Average Change" qty*AC scale=="Standard Deviation" qty*SD scale=="Ticks" qty*syminfo.mintick qty   
        res

    rng_filt
    (float hfloat lfloat rng_float nstring typebool smoothfloat snbool av_rffloat av_n) =>
        
    float rng_smooth Cond_EMA(rng_truesn)
        
    float r smooth rng_smooth rng_
        
    var rfilt = array.new<float>(2, (l)/2)
        
        array.
    set(rfilt1, array.get(rfilt0))
        
    float rfilt_1 = array.get(rfilt1)
        
    float rfilt_0 rfilt_1
        
        
    if type == "Type 1"
            
    if rfilt_1
                rfilt_0 
    := r
            
    if rfilt_1
                rfilt_0 
    := r
        
    else if type == "Type 2"
            
    if >= rfilt_1 r
                rfilt_0 
    := rfilt_1 math.floor(math.abs(rfilt_1)/r)*r
            
    if <= rfilt_1 r
                rfilt_0 
    := rfilt_1 math.floor(math.abs(rfilt_1)/r)*r
                
        
    array.set(rfilt0rfilt_0)
        
        
    float rng_filt1 = array.get(rfilt0)
        
    float hi_band1  rng_filt1 r
        float lo_band1  
    rng_filt1 r
        
        bool is_changed 
    rng_filt1 != rfilt_1
        
        float rng_filt2 
    Cond_EMA(rng_filt1is_changedav_n)
        
    float hi_band2  Cond_EMA(hi_band1is_changedav_n)
        
    float lo_band2  Cond_EMA(lo_band1is_changedav_n)
        
        
    float final_filt av_rf rng_filt2 rng_filt1
        float final_hi   
    av_rf hi_band2 hi_band1
        float final_lo   
    av_rf lo_band2 lo_band1
        
        
    [final_hifinal_lofinal_filt]

    // ═════════════════════════════════════════════════════════════════════════
    //  3. SέNYAL VE GΦRSELLEήTέRME (SADECE BAR RENKLENDέRME)
    // ═════════════════════════════════════════════════════════════════════════
    float h_val mov_src == "Wicks" high close
    float l_val 
    mov_src == "Wicks" low close

    // Range Filter deπerlerini hesapla (Ηizgileri sildik, sadece filtre deπerini 'filt' olarak ηekiyoruz)
    [__filt] = rng_filt(h_vall_valrng_size((h_val l_val)/2rng_scalerng_qtyrng_per), rng_perf_typesmooth_rangesmooth_perav_valsav_samples)

    var 
    float fdir 0.0
    fdir 
    := filt nz(filt[1], filt) ? filt nz(filt[1], filt) ? -fdir

    bool upward   
    fdir == 1
    bool downward 
    fdir == -1

    // Gόηlό yόkseliώler Parlak Yeώil, Zayύf yόkseliώler Koyu Yeώil
    // Gόηlό dόώόώler Parlak Pembe/Kύrmύzύ, Zayύf dόώόώler Koyu Kύrmύzύ
    color bar_color upward and (close filt) ? (close nz(close[1], close) ? #05ff9b : #05ff9b) : downward and (close < filt) ? (close < nz(close[1], close) ? #ff0583 : #ff0583) : #faf602

    barcolor(bar_colortitle="Trend Bar Renkleri")
    ////////
    show_ayna input.bool(true"Ayna Radarύnύ (Tepe/Dip) Gφster"group="Gφrsel Ayarlar")

    f_ozel_sar_ep(src_hsrc_l_start_inc_max) =>
        var 
    int trend_sar 0, var float sar_val 0.0, var float ep 0.0, var float af 0.0
        
    if trend_sar == and not na(src_h[1])
            
    trend_sar := src_h >= src_h[1] or src_l >= src_l[1] ? : -1
            sar_val 
    := trend_sar src_l[1] : src_h[1], ep := trend_sar src_h[1] : src_l[1], af := _start
        
    else
            
    float nextsar sar_val
            
    if trend_sar 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_sar 
    := -1nextsar := epep := src_laf := _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_sar 
    := 1nextsar := epep := src_haf := _start
            sar_val 
    := nextsar
        
    [sar_valtrend_sarep]

    f_kuantum_lrb_dinamik(srcbase_decaysmoothmax_atr_distevrensel_ivme) =>
        var 
    float hh na, var float ll na
        float pre_hh 
    nz(hh[1], src), float pre_ll nz(ll[1], src)
        
    float atr_gucu nz(ta.atr(14), ta.tr)
        
    float decay_mult 2.0 - (evrensel_ivme 1.5)
        
    float cur_decay atr_gucu base_decay decay_mult
        float decay_sma 
    ta.sma(cur_decaysmooth
        
    float temp_hh src >= pre_hh src pre_hh decay_sma
        float temp_ll 
    src <= pre_ll src pre_ll decay_sma
        float max_mesafe 
    atr_gucu max_atr_dist
        hh 
    := math.min(temp_hhsrc max_mesafe
        
    ll := math.max(temp_llsrc max_mesafe
        
    float mid math.avg(hhll)
        [
    hhllmid]

    //  6. AYNA RADARI (YENέ EKLENEN GΦRSEL MODάL)
    // ═════════════════════════════════════════════════════════════════════════
    float ham_volatilite ta.tr(true)
    float max_vol nz(ta.highest(ham_volatilite3), 0.0001)
    float min_vol nz(ta.lowest(ham_volatilite3), 0.0)
    float vol_orani = (max_vol == min_vol) ? 0.0 : ((ham_volatilite min_vol) / (max_vol min_vol))

    float ayna_start 0.02 + (vol_orani 0.08)
    float ayna_inc 0.02 + (vol_orani 0.08)
    float ayna_max 0.20 + (vol_orani 0.30
    [
    ayna_sarayna_trendayna_ep] = f_ozel_sar_ep(highlowayna_startayna_incayna_max)
    float ayna ayna_trend hl2 math.abs(hl2 ayna_sar) : hl2 math.abs(hl2 ayna_sar)

    float ayna_ivme math.abs(ayna nz(ayna[1], ayna))
    float max_ivme nz(ta.highest(ayna_ivme3), 0.0001)
    float min_ivme nz(ta.lowest(ayna_ivme3), 0.0)
    float evrensel_ivme = (max_ivme == min_ivme) ? 0.0 : ((ayna_ivme min_ivme) / (max_ivme min_ivme))

    [
    ayna_hhayna_llayna_mid] = f_kuantum_lrb_dinamik(ayna0.1044.0evrensel_ivme)

    // ═════════════════════════════════════════════════════════════════════════
    //  7. GΦRSELLEήTέRME VE HUD PANEL
    // ═════════════════════════════════════════════════════════════════════════

    // Yeni Ayna Radarύ Ηizgileri (Toggle'a Baπlύ)
    plot(show_ayna ayna na"Ayna"color=color.new(color.white0), linewidth=1style=plot.style_stepline)
    plot(show_ayna ayna_hh na"Ayna Tepe"color=color.new(color.red0), linewidth=1style=plot.style_stepline)
    plot(show_ayna ayna_ll na"Ayna Dip"color=color.new(color.lime0), linewidth=1style=plot.style_stepline)

    sar_fast ta.sar(0.020.020.20)
    sar_mid ta.sar(0.030.030.25)
    sar_slow ta.sar(0.040.040.30)
    plot(sar_fast'C'color color.rgb(2552380), style plot.style_crosslinewidth 1)
    plot(sar_mid'B'color color.rgb(0255238), style plot.style_crosslinewidth 1)
    plot(sar_slow'A'color color.rgb(25500), style plot.style_crosslinewidth 1)
    psar_uzun ta.sar(0.0.010.10)
    plot(psar_uzuntitle 'D'color close psar_uzun #0901ff : #0901ff, style = plot.style_cross, linewidth = 2)
    //////////// 
    16.07.2024 - 10.12.2024

  3. PHP Code:
    // © Kinetik Komuta Merkezi - V8.10 NέHAέ GANN MATRIX (Hatasύz Ηekirdek)
    //@version=6
    strategy("V8.10 Nihai Gann Matrix"overlay=trueinitial_capital=1000commission_type=strategy.commission.percentcommission_value=0.04)

    // ═════════════════════════════════════════════════════════════════════════
    //  1. GέRDέLER
    // ═════════════════════════════════════════════════════════════════════════
    grp_kalman "Kalman Radar Ayarlarύ"
    factor input.float(0.5"Ηift EMA Hύzύ"minval=0.1step=0.1group=grp_kalman)
    r_ratiob input.int(5"Yavaώ Kalman R"step=5group=grp_kalman)
    r_ratios input.int(20"Hύzlύ Kalman R"step=5group=grp_kalman)
    q_ratio input.float(0.002"Kalman Q Sabiti"step=0.001group=grp_kalman)

    i_period input.int(19"έzotropik Dόrbόn Periyodu"minval=5group="έzotropik Dόrbόn")

    // ═════════════════════════════════════════════════════════════════════════
    //  2. KALMAN VE έZOTROPέK KANAL (V8.3 SAF ΗEKέRDEK)
    // ═════════════════════════════════════════════════════════════════════════
    pine_ema(srclength) => 
        
    float alpha / (length 1)
        var 
    float sum na
        sum 
    := na(sum[1]) ? src alpha src + (alpha) * nz(sum[1])
        
    sum

    clamp
    (xab) => math.min(math.max(xa), b)

    calc_kalman(float srcfloat p_statefloat p_cvfloat R_rawfloat Q_raw) =>
        
    float q_process clamp(nz(Q_raw0.1), 0.00110.0) * q_ratio
        float r_adaptive 
    math.max(nz(R_raw1.0), 1.0)
        
    float current_p_cov p_cv q_process
        float k_gain 
    current_p_cov / (current_p_cov r_adaptive 1e-10)
        
    float next_state nz(p_statesrc) + k_gain * (src nz(p_statesrc))
        
    float next_cov   = (k_gain) * current_p_cov
        
    [next_statenext_cov]

    float ema_val pine_ema(pine_ema(closefactor), factor)
    float vol_base math.max(ta.atr(14), 1e-6)

    var 
    float kf_stateb na, var float p_covb 1.0
    float resb 
    ema_val nz(kf_stateb[1], ema_val)
    float res_varb math.pow(resb2) / math.pow(vol_base2)
    [
    new_valbnew_covb] = calc_kalman(ema_valkf_statebp_covbnz(ta.rma(res_varbr_ratiob), 1.0), nz(ta.rma(res_varb5), 0.1))
    kf_stateb := new_valbp_covb := new_covb
    float kalman_yavas 
    pine_ema(kf_stateb3)

    var 
    float kf_states na, var float p_covs 1.0
    float ress 
    ema_val nz(kf_states[1], ema_val)
    float res_vars math.pow(ress2) / math.pow(vol_base2)
    [
    new_valsnew_covs] = calc_kalman(ema_valkf_statesp_covsnz(ta.rma(res_varsr_ratios), 1.0), nz(ta.rma(res_vars5), 0.1))
    kf_states := new_valsp_covs := new_covs
    float kalman_hizli 
    pine_ema(kf_states5)

    bool makro_boga kalman_hizli kalman_yavas
    bool makro_ayi 
    kalman_hizli kalman_yavas

    float iso_chUp 
    ta.highest(highi_period)[1]
    float iso_chLo ta.lowest(lowi_period)[1]
    bool tavan_kirildi close iso_chUp
    bool taban_kirildi 
    close iso_chLo

    // Orijinal DBHF Kalkanύ
    f_dbhf_sniper(srcatrLenatrMultenterMultexitMultresponse) =>
        var 
    float dbhf na
        
    if na(dbhf)
            
    dbhf := src
        float tauEnter 
    ta.atr(atrLen) * atrMult enterMult
        float diff 
    src dbhf
        
    if diff tauEnter
            dbhf 
    += response * (diff tauEnter)
        else if 
    diff < -tauEnter
            dbhf 
    += response * (diff tauEnter)
        
    dbhf

    float dbhf_macro_cizgi 
    f_dbhf_sniper(hl2141.51.00.50.1)

    // ═════════════════════════════════════════════════════════════════════════
    //  3. SέNYALLER VE έZ SάREN STOP (HATASIZ)
    // ═════════════════════════════════════════════════════════════════════════
    bool t_long_giris makro_boga and tavan_kirildi and barstate.isconfirmed
    bool t_short_giris 
    makro_ayi and taban_kirildi and barstate.isconfirmed

    if t_long_giris
        strategy
    .entry("LONG"strategy.long)
    if 
    t_short_giris
        strategy
    .entry("SHORT"strategy.short)

    var 
    float iz_suren_stop na

    // BUG DάZELTέLDέ: nz fonksiyonuna DBHF referans gφsterilerek kilitlenme ηφzόldό
    if strategy.position_size 0
        iz_suren_stop 
    := math.max(nz(iz_suren_stop[1], dbhf_macro_cizgi), dbhf_macro_cizgi)
        if 
    close iz_suren_stop and barstate.isconfirmed
            strategy
    .close("LONG"comment="Kalkan Delindi")
    else if 
    strategy.position_size 0
        iz_suren_stop 
    := math.min(nz(iz_suren_stop[1], dbhf_macro_cizgi), dbhf_macro_cizgi)
        if 
    close iz_suren_stop and barstate.isconfirmed
            strategy
    .close("SHORT"comment="Kalkan Delindi")
    else
        
    iz_suren_stop := na 

    // ═════════════════════════════════════════════════════════════════════════
    //  4. GANN KOZMέK PROJEKSέYON (MUM BAZLI - ΦLά SAAT YUTUCU)
    // ═════════════════════════════════════════════════════════════════════════
    var int b_anchor1 na
    var int b_anchor2 na
    var int dongu_uzunlugu na

    bool is_new_entry 
    = (t_long_giris and strategy.position_size <= 0) or (t_short_giris and strategy.position_size >= 0)

    if 
    is_new_entry
        b_anchor1 
    := nz(b_anchor2bar_index)
        
    b_anchor2 := bar_index
        
    if b_anchor1 != b_anchor2
            dongu_uzunlugu 
    := b_anchor2 b_anchor1

    var int gann_faz 0
    int tepeye_kalan_bar 
    na
    int dibe_kalan_bar 
    na

    if not na(dongu_uzunlugu) and dongu_uzunlugu 0
        int gecen_bar 
    bar_index b_anchor2
        int dongu_ici_bar 
    gecen_bar dongu_uzunlugu
        
        
    // Dφngόnόn Yarύsύ Boπa, Yarύsύ Ayύ
        
    int tepe_noktasi math.round(dongu_uzunlugu 0.50)
        
        if 
    dongu_ici_bar <= tepe_noktasi
            gann_faz 
    := 1
            tepeye_kalan_bar 
    := tepe_noktasi dongu_ici_bar
        
    else
            
    gann_faz := -1
            dibe_kalan_bar 
    := dongu_uzunlugu dongu_ici_bar

    bgcolor
    (gann_faz == color.new(color.green96) : gann_faz == -color.new(color.red96) : natitle="Dinamik Gann Zemin")

    // ═════════════════════════════════════════════════════════════════════════
    //  5. GΦRSELLEήTέRME VE HUD PANEL
    // ═════════════════════════════════════════════════════════════════════════
    plot(iso_chUpcolor=color.new(color.aqua50), style=plot.style_stepline)
    plot(iso_chLocolor=color.new(color.red50), style=plot.style_stepline)
    plot(iz_suren_stop"έz Sόren Kalkan"color=strategy.position_size color.aqua color.fuchsialinewidth=2style=plot.style_stepline)

    float br_kar strategy.grossprofit
    float br_zarar 
    strategy.grossloss
    float kar_faktoru 
    br_zarar == ? (br_kar 99.99 0.0) : (br_kar br_zarar)

    if 
    barstate.islast
        
    var table hud table.new(position.top_right27bgcolor=color.new(#0D0D0D, 15), border_color=color.new(color.gray, 70), border_width=1)
        
    table.cell(hud00"⚔️ V8.10 NέHAέ GANN MATRIX ⚔️"text_color=color.whitetext_size=size.normalbgcolor=color.new(#181818, 0), text_halign=text.align_center)
        
    table.merge_cells(hud0010)
        
        
    table.cell(hud01"Kβr Faktφrό"text_color=color.silvertext_size=size.smallbgcolor=color.new(#1A1A1A, 0))
        
    table.cell(hud11str.tostring(kar_faktoru"#.##"), text_color=kar_faktoru >= 1.2 color.lime color.redtext_size=size.smallbgcolor=color.new(#1A1A1A, 0))
        
        
    table.cell(hud02"Operasyon Yφnό"text_color=color.silvertext_size=size.smallbgcolor=color.new(#161616, 0))
        
    table.cell(hud12strategy.position_size "LONG" strategy.position_size "SHORT" "PUSUDA"text_color=strategy.position_size color.aqua strategy.position_size color.fuchsia color.graytext_size=size.smallbgcolor=color.new(#161616, 0))

        
    table.cell(hud03"--- DΦNGά (ΦLά SAATLER HARέΗ) ---"text_color=color.purpletext_size=size.smallbgcolor=color.new(#1A1A1A, 0))
        
    table.merge_cells(hud0313)

        
    table.cell(hud04"Mevcut Dφngό Fazύ"text_color=color.silvertext_size=size.smallbgcolor=color.new(#161616, 0))
        
    table.cell(hud14gann_faz == "YάKSELέή EVRESέ" gann_faz == -"Dάήάή EVRESέ" "VERέ BEKLENέYOR"text_color=gann_faz == color.lime gann_faz == -color.orange color.graytext_size=size.smallbgcolor=color.new(#161616, 0))

        
    table.cell(hud05"Zirveye Kalan"text_color=color.silvertext_size=size.smallbgcolor=color.new(#1A1A1A, 0))
        
    table.cell(hud15not na(tepeye_kalan_bar) ? str.tostring(tepeye_kalan_bar) + " Mum" "-"text_color=color.yellowtext_size=size.smallbgcolor=color.new(#1A1A1A, 0))

        
    table.cell(hud06"Dibe Kalan"text_color=color.silvertext_size=size.smallbgcolor=color.new(#161616, 0))
        
    table.cell(hud16not na(dibe_kalan_bar) ? str.tostring(dibe_kalan_bar) + " Mum" "-"text_color=color.orangetext_size=size.smallbgcolor=color.new(#161616, 0)) 
    16.07.2024 - 10.12.2024

  4. PHP Code:
    // © Kinetik Komuta Merkezi - V12 CYBORG-GANN HέBRέT MATRIX
    //@version=6
    strategy("V12 Cyborg-Gann Hibrit Matrix"overlay=trueinitial_capital=1000)

    // 1. AYNA RADAR VE KALMAN PARAMETRELERέ
    q_ratio input.float(0.002"Kalman Q Sabiti (Dόrbόn)"step=0.001)
    // Gann DBHF Kalkan Ayarlarύ
    atrLen input.int(14"Kalkan ATR Periyodu")
    atrMult input.float(1.5"Kalkan Geniώliπi")

    // 2. έZOTROPέK KALMAN DάRBάNά (Cyborg Ηekirdek)
    calc_kalman(float srcfloat p_statefloat p_cv) =>
        
    float q_process 0.1 q_ratio
        float k_gain 
    = (p_cv q_process) / (p_cv q_process 1.0 1e-10)
        
    float next_state nz(p_statesrc) + k_gain * (src nz(p_statesrc))
        
    float next_cov   = (k_gain) * (p_cv q_process)
        [
    next_statenext_cov]

    var 
    float kf_state close, var float p_cov 1.0
    [new_statenew_cov] = calc_kalman(closekf_statep_cov)
    kf_state := new_statep_cov := new_cov

    // 3. AYNA RADAR SέNYALέ
    mirror_signal ta.ema(kf_state10) - ta.ema(kf_state20)

    // 4. DBHF SNIPER KALKANI (Nihai Drawdown Sύnύrlandύrύcύ)
    f_dbhf_sniper(srcatrLenmult) =>
        var 
    float dbhf src
        float tau 
    ta.atr(atrLen) * mult
        float diff 
    src dbhf
        
    if diff tau
            dbhf 
    += (diff tau) * 0.1 // Esnek Kalkan
        
    else if diff < -tau
            dbhf 
    += (diff tau) * 0.1
        dbhf

    float kalkan 
    f_dbhf_sniper(hl2atrLenatrMult)

    // 5. TETέKLEME (Cyborg Sinyali + Gann Onayύ)
    bool t_long  ta.crossover(mirror_signal0) and barstate.isconfirmed
    bool t_short 
    ta.crossunder(mirror_signal0) and barstate.isconfirmed

    if t_long
        strategy
    .entry("LONG"strategy.longcomment="Ayna Giriώ")
    if 
    t_short
        strategy
    .entry("SHORT"strategy.shortcomment="Ayna Giriώ")

    // 6. NέHAέ SAVUNMA (DBHF Kalkanύ έle Ηύkύώ)
    if strategy.position_size and close kalkan and barstate.isconfirmed
        strategy
    .close("LONG"comment="Kalkan Delindi")
    if 
    strategy.position_size and close kalkan and barstate.isconfirmed
        strategy
    .close("SHORT"comment="Kalkan Delindi")

    // VέZYON
    plot(kf_state"Kalman Dόrbόnό"color=color.whitelinewidth=1)
    plot(kalkan"DBHF Sniper Kalkanύ"color=strategy.position_size color.lime color.redlinewidth=3
    16.07.2024 - 10.12.2024

  5. PHP Code:
    // © Kinetik Komuta Merkezi - V13 OMEGA-CYBORG-SNIPER MATRIX
    //@version=6
    strategy("V13 Cyborg-Sniper Matrix"overlay=trueinitial_capital=1000commission_type=strategy.commission.percentcommission_value=0.04)

    // 1. AYNA RADAR VE KALMAN PARAMETRELERέ
    q_ratio input.float(0.002"Kalman Q Sabiti (Dόrbόn Hassasiyeti)")
    atrLen  input.int(14"Kalkan ATR Periyodu")
    atrMult input.float(1.5"Kalkan Geniώliπi (Sniper)")

    // 2. έZOTROPέK KALMAN DάRBάNά (Giriώin Mimarύ)
    calc_kalman(float srcfloat p_statefloat p_cv) =>
        
    float q_process 0.1 q_ratio
        float k_gain 
    = (p_cv q_process) / (p_cv q_process 1.0 1e-10)
        
    float next_state nz(p_statesrc) + k_gain * (src nz(p_statesrc))
        
    float next_cov   = (k_gain) * (p_cv q_process)
        [
    next_statenext_cov]

    var 
    float kf_state close, var float p_cov 1.0
    [new_statenew_cov] = calc_kalman(closekf_statep_cov)
    kf_state := new_statep_cov := new_cov

    // 3. AYNA RADAR SέNYALέ (Cyborg Sinyal Motoru)
    mirror_signal ta.ema(kf_state10) - ta.ema(kf_state20)

    // 4. DBHF SNIPER KALKANI (Pozisyon Yφnetim Motoru)
    f_dbhf_sniper(srcatrLenmult) =>
        var 
    float dbhf src
        float tau 
    ta.atr(atrLen) * mult
        float diff 
    src dbhf
        
    if diff tau
            dbhf 
    += (diff tau) * 0.1 
        
    else if diff < -tau
            dbhf 
    += (diff tau) * 0.1
        dbhf

    float kalkan 
    f_dbhf_sniper(hl2atrLenatrMult)

    // 5. TETέKLEME (V8.3'όn Safkan Giriώi)
    bool t_long  ta.crossover(mirror_signal0) and barstate.isconfirmed
    bool t_short 
    ta.crossunder(mirror_signal0) and barstate.isconfirmed

    if t_long
        strategy
    .entry("LONG"strategy.longcomment="Cyborg Giriώ")
    if 
    t_short
        strategy
    .entry("SHORT"strategy.shortcomment="Cyborg Giriώ")

    // 6. NέHAέ SAVUNMA (DBHF Sniper ile Tahliye)
    if strategy.position_size and close kalkan and barstate.isconfirmed
        strategy
    .close("LONG"comment="Sniper Stop")
    if 
    strategy.position_size and close kalkan and barstate.isconfirmed
        strategy
    .close("SHORT"comment="Sniper Stop")

    // VέZYON
    plot(kf_state"έzotropik Dόrbόn"color=color.whitelinewidth=1)
    plot(kalkan"DBHF Sniper Kalkanύ"color=strategy.position_size color.lime strategy.position_size color.red color.graylinewidth=3)

    // ALARM
    alertcondition(t_long"Cyborg LONG""🚀 LONG Sinyali Aktif")
    alertcondition(t_short"Cyborg SHORT""🔻 SHORT Sinyali Aktif"
    16.07.2024 - 10.12.2024

  6. PHP Code:
    // © Kinetik Komuta Merkezi - V14.1 Cyborg-Sniper (HUD Entegreli)
    //@version=6
    strategy("V14.1 Cyborg-Sniper HUD"overlay=trueinitial_capital=1000commission_type=strategy.commission.percentcommission_value=0.04)

    // 1. GέRDέLER
    q_ratio input.float(0.002"Kalman Q Sabiti")
    atrLen  input.int(14"Kalkan ATR Periyodu")
    atrMult input.float(1.3"Kalkan Geniώliπi")

    // 2. έZOTROPέK KALMAN VE AYNA RADAR
    calc_kalman(float srcfloat p_statefloat p_cv) =>
        
    float q_process 0.1 q_ratio
        float k_gain 
    = (p_cv q_process) / (p_cv q_process 1.0 1e-10)
        
    float next_state nz(p_statesrc) + k_gain * (src nz(p_statesrc))
        
    float next_cov   = (k_gain) * (p_cv q_process)
        [
    next_statenext_cov]

    var 
    float kf_state close, var float p_cov 1.0
    [new_statenew_cov] = calc_kalman(closekf_statep_cov)
    kf_state := new_statep_cov := new_cov

    mirror_signal 
    ta.ema(kf_state10) - ta.ema(kf_state20)

    // 3. DBHF SNIPER KALKANI
    f_dbhf_sniper(srcatrLenmult) =>
        var 
    float dbhf src
        float tau 
    ta.atr(atrLen) * mult
        float diff 
    src dbhf
        
    if diff tau
            dbhf 
    += (diff tau) * 0.1 
        
    else if diff < -tau
            dbhf 
    += (diff tau) * 0.1
        dbhf

    float kalkan 
    f_dbhf_sniper(hl2atrLenatrMult)

    // 4. TETέKLEME VE SAVUNMA
    bool t_long  ta.crossover(mirror_signal0) and barstate.isconfirmed
    bool t_short 
    ta.crossunder(mirror_signal0) and barstate.isconfirmed

    if t_long
        strategy
    .entry("LONG"strategy.longcomment="Cyborg Giriώ")
    if 
    t_short
        strategy
    .entry("SHORT"strategy.shortcomment="Cyborg Giriώ")

    if 
    strategy.position_size and close kalkan and barstate.isconfirmed
        strategy
    .close("LONG"comment="Sniper Stop")
    if 
    strategy.position_size and close kalkan and barstate.isconfirmed
        strategy
    .close("SHORT"comment="Sniper Stop")

    // 5. HUD TABLO (Canlύ Performans Radarύ)
    float kar_faktoru strategy.grossloss == ? (strategy.grossprofit 99.99 0.0) : (strategy.grossprofit strategy.grossloss)

    if 
    barstate.islast
        
    var table hud table.new(position.top_right23bgcolor=color.new(#0D0D0D, 20), border_color=color.new(color.gray, 80), border_width=1)
        
    table.cell(hud00"V14.1 Cyborg-Sniper"text_color=color.whitetext_size=size.smallbgcolor=color.new(#111111, 0))
        
    table.merge_cells(hud0010)
        
        
    table.cell(hud01"Pozisyon"text_color=color.whitetext_size=size.smallbgcolor=color.new(#1A1A1A, 0))
        
    table.cell(hud11strategy.position_size "LONG" strategy.position_size "SHORT" "PUSUDA"
             
    text_color=strategy.position_size != color.lime color.graytext_size=size.small)
        
        
    table.cell(hud02"Kar Faktφrό"text_color=color.whitetext_size=size.smallbgcolor=color.new(#161616, 0))
        
    table.cell(hud12str.tostring(kar_faktoru"#.##"), 
             
    text_color=kar_faktoru >= 2.0 color.lime color.redtext_size=size.small)

    // VέZYON
    plot(kf_state"Dόrbόn"color=color.whitelinewidth=1)
    plot(kalkan"Sniper Kalkanύ"color=strategy.position_size color.lime strategy.position_size color.red color.graylinewidth=3
    16.07.2024 - 10.12.2024

  7. PHP Code:
    // © Kinetik Komuta Merkezi - V10 OMEGA-VέZYON MATRIX (Trend + Gann + PA)
    //@version=6
    strategy("V10 Omega-Vizyon Matrix"overlay=trueinitial_capital=1000commission_type=strategy.commission.percentcommission_value=0.04)

    // 1. INPUTS
    hPeriod input.int(13"Gann HIGH Period")
    lPeriod input.int(21"Gann LOW Period")
    atrLen  input.int(14"ATR Filter Length"minval=1)
    atrMult input.float(0.8"ATR Filter Multiplier"step=0.05)

    // 2. GANN HILO ΗEKέRDEΠέ
    sma_high ta.sma(highhPeriod), sma_low ta.sma(lowlPeriod)
    var 
    int hl_direction 0
    hl_direction 
    := close nz(sma_low[1]) ? close nz(sma_high[1]) ? -hl_direction
    float hi_lo 
    = (hl_direction == 1) ? sma_low sma_high

    // 3. DUAL WICK REVERSAL (PA ONAYI)
    float atr ta.atr(atrLen)
    float candleRange high low
    float safeRange 
    candleRange == 0.0 syminfo.mintick candleRange
    float bodyPct 
    math.abs(close open) / safeRange 100.0
    bool dualWick 
    = (high math.max(openclose)) / safeRange 100.0 >= 20.0 and (math.min(openclose) - low) / safeRange 100.0 >= 20.0 and bodyPct <= 50.0 and candleRange >= (atr atrMult)

    bool bullReversal dualWick and (math.min(openclose) - low) > (high math.max(openclose)) and close open
    bool bearReversal 
    dualWick and (high math.max(openclose)) > (math.min(openclose) - low) and close open

    // 4. FάZYON TETέKLEME (Gann + PA Onaylύ)
    // Robot artύk SADECE ηizgi kύrύlύmύ deπil, dφnόώ mumu gφrdόπόnde giriώ yapar.
    bool t_long  = (ta.crossover(closehi_lo) or bullReversal) and close hi_lo and barstate.isconfirmed
    bool t_short 
    = (ta.crossunder(closehi_lo) or bearReversal) and close hi_lo and barstate.isconfirmed

    if t_long
        strategy
    .entry("LONG"strategy.longcomment="Gann+PA Giriώ")
    if 
    t_short
        strategy
    .entry("SHORT"strategy.shortcomment="Gann+PA Giriώ")

    // 5. έZ SάREN STOP (Kalkan)
    if strategy.position_size and close hi_lo and barstate.isconfirmed
        strategy
    .close("LONG"comment="Kalkan Delindi")
    if 
    strategy.position_size and close hi_lo and barstate.isconfirmed
        strategy
    .close("SHORT"comment="Kalkan Delindi")

    plot(hi_lo"Gann HiLo"color=hl_direction == color.blue color.maroonlinewidth=3
    16.07.2024 - 10.12.2024

Sayfa 21/23 έlkέlk ... 111920212223 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
  •