Artan
Azalan
lem
BIST 30
BIST 50
BIST 100
NASDAQ 100
Hisse Fiyat Fark% Hacim (TL) Dk / Yksek
34,10 10% 56,18 Mn 30,92 / 34,10
7,04 10% 588,94 Mn 6,42 / 7,04
1.331,00 10% 111,95 Mn 1.234,00 / 1.331,00
3,85 10% 381,06 Mn 3,53 / 3,85
52,80 10% 292,41 Mn 47,98 / 52,80
Hisse Fiyat Fark% Hacim (TL) Dk / Yksek
14,22 -10% 1,40 Mr 14,22 / 16,50
1.067,00 -9.96% 334,06 Mn 1.067,00 / 1.303,00
307,75 -9.95% 252,30 Mn 307,75 / 348,00
120,40 -9.41% 1,70 Mr 119,70 / 128,00
6,73 -7.81% 543,00 Mn 6,60 / 7,08
Hisse Fiyat Fark% Hacim (TL) Dk / Yksek
297,50 3.3% 13,15 Mr 296,00 / 300,50
2,70 1.89% 8,97 Mr 2,62 / 2,73
341,75 -0.94% 8,34 Mr 340,50 / 354,75
65,40 2.83% 8,09 Mr 63,70 / 66,05
39,48 2.07% 7,50 Mr 38,90 / 40,70
Hisse Fiyat Fark% Hacim (TL) Dk / Yksek
19,54 1.35% 613,06 Mn 19,10 / 19,65
65,40 2.83% 8,09 Mr 63,70 / 66,05
401,75 -2.01% 6,15 Mr 396,00 / 413,00
341,75 -0.94% 8,34 Mr 340,50 / 354,75
378,75 -3.56% 4,16 Mr 375,75 / 397,50
Hisse Fiyat Fark% Hacim (TL) Dk / Yksek
19,54 1.35% 613,06 Mn 19,10 / 19,65
65,40 2.83% 8,09 Mr 63,70 / 66,05
96,90 0.62% 384,70 Mn 96,05 / 98,00
105,00 0.86% 253,69 Mn 103,50 / 105,60
401,75 -2.01% 6,15 Mr 396,00 / 413,00
Hisse Fiyat Fark% Hacim (TL) Dk / Yksek
19,54 1.35% 613,06 Mn 19,10 / 19,65
33,82 -0.94% 99,77 Mn 33,56 / 34,74
65,40 2.83% 8,09 Mr 63,70 / 66,05
10,65 0.85% 209,13 Mn 10,48 / 10,70
77,95 0.32% 372,67 Mn 77,00 / 79,00

Masrafsz Bankaclk + 1.000 TL Nakit! Enparadan ifte Avantaj

Masrafsz Bankaclk + 1.000 TL Nakit! Enparadan ifte Avantaj
Sayfa 422/423 lklk ... 322372412420421422423 SonSon
Arama sonucu : 3378 madde; 3,369 - 3,376 aras.

Konu: Tradingview

  1.  Alnt Originally Posted by Oblo Yazy Oku
    ok katlyorum.
    Senin olay Anka kuu gibi zaten.
    Ayrca tebrii hak ediyor.
    bu l arbitraj almas rneim... belki faydas olur....
    PHP Code:
    //  Kinetik Komuta Merkezi - V9.3  EKRDEKL ARBTRAJ 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. GRDLER VE CEPHANELK (3 HSSE)
    // ═════════════════════════════════════════════════════════════════════════
    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"Ar Namlu (Uzun Z-Score)"minval=100maxval=500group=grp_logic)
    shortZLength input.int(80"Hafif Namlu (Ksa Z-Score)"minval=20maxval=150group=grp_logic)
    entryZ       input.float(1.70"Taarruz Snr (+/-)"step=0.1group=grp_logic)
    exitZ        input.float(0.50"Tahliye Snr (Ksa Namluya Gre)"step=0.1group=grp_logic)
    minIntegrity input.float(55.0"Minimum Gvenlik 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 STHBARATI
    // ═════════════════════════════════════════════════════════════════════════
    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. KANTTATF MOTOR (ZEL FONKSYON)
    // ═════════════════════════════════════════════════════════════════════════
    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 iin motoru altr
    [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 FZYONU (SAVA ALANI)
    // ═════════════════════════════════════════════════════════════════════════
    // lem Tetii (Strateji motoru sadece Grafikteki Hisse - A Hissesi iin ilem aar, kr oradan ler)
    // A Hissesinin dahil olduu en gl 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 kapanrsa 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 (Gvenlik 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 Balk
        
    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)
        
        
    // Stun Balklar
        
    table.cell(hud01"Kombinasyon (Cephe)"text_color=color.graytext_size=size.smallbgcolor=color.new(#111111, 0))
        
    table.cell(hud11"Z-Score (Ar/Hafif)"text_color=color.graytext_size=size.smallbgcolor=color.new(#111111, 0))
        
    table.cell(hud21"Gvenlik"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 Ksm: Kr Faktr zeti
        
    table.cell(hud05"Sistem Kr Faktr"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)) 
    rnek resim.... https://www.tradingview.com/x/fviKNKUD/
    16.07.2024 - 10.12.2024

  2. Bende bugn endeks ile beklentiler arasndaki ilikiye istinaden bir eyler oluturmaya altm. alma gnlerinde pek vaktim olmuyor. Bu uzun tatilde frsat bulduka bir eyler retmeye alacam

     Alnt Originally Posted by Oblo Yazy Oku
    Aynen. Her neyin spotuna bakyorsam, faiz, vade, alfa, beta, teta, hekta, conta ne kadar deiken var ise an itibari ile hesaplayp... Diyecek ki:
    "Onu alma! Beni al!"

    Ortaya bir rn karabilsem... Bear&Bull hocaya da soracam ama...
    Ortada bir hayal var sadece
    Sradan bir insan

  3.  Alnt Originally Posted by mavsar Yazy Oku
    Sn @oblo ben siz ve deerli @yrk hocam gibi teknik analiz vs bilmem. Sadece AI yeteneklerini kullanara kendime tarama sistemi gelitirmeye alyorum. sorunuzu AI'ya sordum.

    Kod:
    Kod yazmadan nce opsiyon tarafnn mantn hzlca zetleyeyim, sonra 2-3 noktay netletirip kuralm. nk "arbitraj kodu" derken aslnda drt farkl eyden bahsediyor olabiliriz ve hangisini istediinizi bilmem lazm.
      piyasa arasnda klasik arbitraj trleri:
     
    
    • Spot ↔ Vadeli (cash-and-carry): Teorik vadeli fiyat F = S (1 + rt) − temettler. Piyasadaki vadeli bu teorik fiyatn stndeyse → spot al, vadeli sat (risksiz kilitli kr). Altndaysa → tersi (aa sat gerekirse).
    • Put-Call Parity (opsiyonun temel ta): Ayn kullanm fiyat (strike) ve vade iin Avrupa tipi opsiyonlarda C − P = S − K e^(−rt) olmak zorunda. Bu eitlik bozulursa → conversion / reversal arbitraj. Yani opsiyonlarla "sentetik spot" yaratp gerek spotla karlatrrsnz.
    • Sentetik vadeli ↔ Gerek vadeli: Long call + short put (ayn K, ayn T) = sentetik long vadeli. Bunun maliyeti ile borsadaki vadeli fiyat tutarszsa arbitraj var.
    • Box spread: 4 opsiyondan kurulu (bull call + bear put), vade sonunda kesin K2−K1 dyor. Bugnk maliyeti (K2−K1) e^(−rt)'den uzaksa risksiz kr.
    Bu drt taramann hepsi aslnda ayn temel ilikinin farkl grnmleri put-call parity ile cash-and-carry birleince hepsi tek bir "no-arbitrage" denklem setine der.
    Kod:
    Hangi piyasay tarayacaz?
    Veri kaynanz ne?
    Kapsam ne kadar olsun?
    Selamlar stadm. Teekkrler cevap iin.
    YZ'nin varlnda Teknik Analiz bilmek diye de bir olgu kalmad znde...
    Kendi kendini optimize edebilen sistem kurgulamak bile gayet mmkn, hi teknik analiz bilgisi olmayan biri iin dahi.

    Ben kendi kurgumu oluturmu durumdaym aslnda AL-SAT sinyali retmek anlamnda.
    na etmek istediim ey, piyasann dier imkanlarndan da yararlanmak.

    rnein benim amdan "AL" sinyali retmi(veya tersi) spot bir varl almaktan daha karl olacak bir vadeli ilem ve opsiyon olasl varsa... Onu grebilmek.


    Token'lerim yetmedi cretsiz yeliklerle. cretli bir ey de almak istemiyorum.
    nk bir alanda Cursor iyi dierinde Codex, berikinde Claude...

    Verileri Tradingview, Yahoo Finance, Binance vb. den ekebiliyoruz.
    Kiminde canl, kimisinde gn sonu. Canl veriye de ihtiya yok benim kurgum iin.

    Soru u:
    Atyorum; an itibari ile sistemimiz SISE hisse senedi iin "AL" verdi.
    TRY faiz %46, Spot SISE 46,72, Temmuz 2026 Vade 48,89.
    imdi ben gidip spotu mu alaym? Vadeliyi mi?
    Veya Opsiyon mu alaym? Opsiyon mu sataym? Hangisini? Ne fiyattan?

    Mevcut verilerle buna cevap verecek bir sistem kurgulamak mesele.
    Haaa bunda da mutlak sonu elde etme ans elbet yok. Sadece ansmz 1-2 puan arttrr m?
    Soru bu.

  4.  Alnt Originally Posted by Oblo Yazy Oku
    Selamlar stadm. Teekkrler cevap iin.
    YZ'nin varlnda Teknik Analiz bilmek diye de bir olgu kalmad znde...
    Kendi kendini optimize edebilen sistem kurgulamak bile gayet mmkn, hi teknik analiz bilgisi olmayan biri iin dahi.

    Ben kendi kurgumu oluturmu durumdaym aslnda AL-SAT sinyali retmek anlamnda.
    na etmek istediim ey, piyasann dier imkanlarndan da yararlanmak.

    rnein benim amdan "AL" sinyali retmi(veya tersi) spot bir varl almaktan daha karl olacak bir vadeli ilem ve opsiyon olasl varsa... Onu grebilmek.


    Token'lerim yetmedi cretsiz yeliklerle. cretli bir ey de almak istemiyorum.
    nk bir alanda Cursor iyi dierinde Codex, berikinde Claude...

    Verileri Tradingview, Yahoo Finance, Binance vb. den ekebiliyoruz.
    Kiminde canl, kimisinde gn sonu. Canl veriye de ihtiya yok benim kurgum iin.

    Soru u:
    Atyorum; an itibari ile sistemimiz SISE hisse senedi iin "AL" verdi.
    TRY faiz %46, Spot SISE 46,72, Temmuz 2026 Vade 48,89.
    imdi ben gidip spotu mu alaym? Vadeliyi mi?
    Veya Opsiyon mu alaym? Opsiyon mu sataym? Hangisini? Ne fiyattan?

    Mevcut verilerle buna cevap verecek bir sistem kurgulamak mesele.
    Haaa bunda da mutlak sonu elde etme ans elbet yok. Sadece ansmz 1-2 puan arttrr m?
    Soru bu.
    Bu arada konu Tradingview ile ilgili deil znde. O nedenle aslnda yanl balktayz.
    Mesleki olarak konu senin alannda olduundan ya bir balk a.
    "YZ ile Analiz" vb. benzeri... Veya iletiim srecekse uygun baka bir yere tayalm.
    Sayn @yrk@ n emekleri, gnderileri kayp gitmesin.

    Son gnderi:

     Alnt Originally Posted by @yrk@ Yazy Oku
    iindeki hesaplamalardan bir deneme rnei....
    PHP Code:
    //  Kinetik Komuta Merkezi - OMEGA-HUB / TRINITY SENTEZ (REPAINT SIFIR)
    //@version=6
    indicator("OMEGA-HUB - Trinity Sentezi v8"overlay=true)

    // ════════════════════════════════════════════════════════════════════
    //  HAZIRLIK: SIFIR-GECKMEL HA-KALKANI (Optimizasyon 3)
    // ════════════════════════════════════════════════════════════════════
    // lemciyi yormamak iin HA mumlarn ekrana izmiyoruz. 
    // Sadece matematiksel bir "Kalkan" olarak arka planda hesaplyoruz.
    float ha_c = (open high low close) / 4
    float ha_o 
    na(open[1]) ? (open close) / : (nz(open[1]) + nz(close[1])) / 2
    float ha_h 
    math.max(highmath.max(ha_oha_c))
    float ha_l math.min(lowmath.min(ha_oha_c))

    float vol_atr ta.atr(14)

    // ════════════════════════════════════════════════════════════════════
    //  TRINITY AYNA MOTORU
    // ════════════════════════════════════════════════════════════════════
    var float ep na
    var float sar_val na
    var float af 0.02
    var int trend 1

    if na(sar_val) and not na(high[1])
        
    trend := 1
        sar_val 
    := low[1]
        
    ep := high
        af 
    := 0.02

    // Kinetik Hz Limitleyici: Fiyat Ayna'ya uzaksa ilemciyi dinlendir
    float mesafe math.abs(close nz(sar_valclose))
    bool kritik_bolge mesafe < (vol_atr 1.5// Fiyat Ayna'ya yaklatysa motoru tam g atele

    // ════════════════════════════════════════════════════════════════════
    //  MLSANYE & KNETK VME RADARI (Optimizasyon 1 & 2)
    // ════════════════════════════════════════════════════════════════════
    float dynamic_step 0.02

    // Sadece kritik blgedeyken Hacim/Tick younluunu hesapla (lemci Dostu)
    if kritik_bolge
        float tick_proxy 
    volume
        float avg_ticks 
    ta.sma(tick_proxy20)
        
    float tick_ratio tick_proxy math.max(avg_ticks1)
        
        
    // Hacim/Tick patlamas varsa Ayna'nn admn daralt veya genilet
        
    dynamic_step := math.max(0.005math.min(0.10.02 tick_ratio))

    float next_sar sar_val

    if not na(sar_val)
        if 
    trend == 1
            next_sar 
    := sar_val af * (ep sar_val)
            
    next_sar := math.min(math.min(low[1], nz(low[2], low[1])), next_sar)
            
            if 
    high ep
                ep 
    := high
                af 
    := math.min(0.2af dynamic_step)
                
            
    // Kalkan Devrede: Normal low yerine, grltsz Heikin-Ashi low'u kullanyoruz
            
    if ha_l next_sar
                trend 
    := -1
                next_sar 
    := ep
                ep 
    := ha_l
                af 
    := dynamic_step
        
    else
            
    next_sar := sar_val af * (ep sar_val)
            
    next_sar := math.max(math.max(high[1], nz(high[2], high[1])), next_sar)
            
            if 
    low ep
                ep 
    := low
                af 
    := math.min(0.2af dynamic_step)
                
            
    // Kalkan Devrede: Normal high yerine, grltsz Heikin-Ashi high' kullanyoruz
            
    if ha_h next_sar
                trend 
    := 1
                next_sar 
    := ep
                ep 
    := ha_h
                af 
    := dynamic_step
                
        sar_val 
    := next_sar

    // ════════════════════════════════════════════════════════════════════
    //  GRSELLETRME VE MHRL SNYALLER
    // ════════════════════════════════════════════════════════════════════
    // Fiyat Ayna'ya yaklap motor tam g almaya baladnda renk Sarya dner
    color ayna_renk kritik_bolge color.yellow color.white

    plot
    (sar_val"Trinity Ayna"color=ayna_renklinewidth=3style=plot.style_stepline)
    bgcolor(trend == color.new(color.green90) : color.new(color.red90))

    // Repaint %0 - Sinyaller sadece bar kapannda mhrlenir
    bool is_confirmed barstate.isconfirmed
    bool buy 
    trend == and nz(trend[1], 1) == -and is_confirmed
    bool sell 
    trend == -and nz(trend[1], -1) == and is_confirmed

    plotshape
    (buy"AL"style=shape.labeluplocation=location.belowbarcolor=color.greentext="AL"textcolor=color.whitesize=size.small)
    plotshape(sell"SAT"style=shape.labeldownlocation=location.abovebarcolor=color.redtext="SAT"textcolor=color.whitesize=size.small

  5. hocam ayn soruyu kendime sordum....

    rnekteki kodda... 3hisse diyelim ki elimde...

    normalde korele var m yok mu dersen....
    dediin gibi iin iine beta hesab giriyor... TW de yapmak imkansz....
    pyton gibi dilleri kullanp.... hesaplanyor.... beta kyor....

    baka bir deyile... iki sarho ayn sokaa girdi diye... korele var kabul ediyoruz...
    yani gda biri giderse... dieri de gider gibi....

    dolaysyla... beta hesabna girmeden... korele var gibi kabul edip....

    rnekte olduu gibi....
    sma ve devinasyonla.. korelasyon hesaplamaya altrdm....
    motor... 3 metann 2li kombinasyonunu kyaslayp....

    koddaki stratejiye gre... yani iki farkl zscore ile ve belirlenmi... ama test edilmemi... deerlerle...
    kyaslayp... tabloya yazdrdk....

    ama...
    bu 3hisse elimde iken... arbitraj yakalayp....
    tabloda yazlan yapmaya almak...

    sonu olarak gn sonunda ayn miktar elde olsun...
    ama arbitraj... kar olsun mant gibi....

    ama zor... nk arbitrajda... zaman ok kstl oluyor....
    denileni yapp... makasa kapanana kadar... bazen frsat kayor....

    bu almay... ileriye braktm....
    nk hem otomatik olacak... hem de emiri gndermesi gerekiyor...
    eldeki satlnca...otomatik br alnacak gibi...

    imdilik beklemede...

    belki... farkl stratejilerle... daha gzel yaplabilir...
    16.07.2024 - 10.12.2024

  6. @Yrk stadm sizin gibi deerli paylamlar yapan bir stadmza rahatszlk verdiysem zr dilerim.

    Paylatnz kod'a nacizane bir ka yorum ekleyerek tekrar paylamak isterim.

    Kod:
    //  Kinetik Komuta Merkezi - V9.4  EKRDEKL ARBTRAJ MATRIX
    // =============================================================================
    // V9.3'e teekkrle. Bu srm, V9.3'n iskeletini ve estetiini koruyup
    // mantksal sklatrmalar getirir:
    //
    //   [1]  cephenin GEREKTEN kullanlmas.
    //       V9.3'te B/C cephesi hesaplanyor ama hi sinyale girmiyordu. V9.4'te
    //       A/B ve A/C e zamanl extreme olmal (AND); B/C filtre grevi grr
    //        eer B/C de extreme ise rejim-wide bir sapma vardr, pair-specific
    //       deil, ileme girilmez. Bylece "Tri-Core" ismi gerekten  cepheli.
    //
    //   [2] Simetrik giri/k mant.
    //       V9.3 girii AND ile sklatrm, k OR ile gevetmiti  bu
    //       konverjansn orta noktasnda erken kmaya yol ayordu. V9.4 her iki
    //       ynde AND kullanr.
    //
    //   [3] Rejim Krlma Stop'u (yeni).
    //       Cointegration krlrsa spread asla geri gelmez. Z, entryZ  stopZmult
    //       eiini aarsa pozisyon zorla kapatlr  "umut etmek" yerine kayp
    //       snrlanr.
    //
    //   [4] HUD ile strateji mant bire bir.
    //       V9.3 HUD'unda |z| >= entryZ aktif saylrken strateji iaretli z
    //       kullanyordu  baz durumlarda HUD "AKTF" gsterir ama emir
    //       gelmezdi. V9.4'te ikisi de iaretli z'yi kullanr.
    //
    //   [5] Parametre haline geldi: korelasyon penceresi, integrity arlklar,
    //       BC filtre eii, stop arpan. Empirik ayar kolayl iin.
    //
    // NOTLAR (limitler):
    //    Bu strateji yalnz A bacanda pozisyon alr; gerek market-neutral
    //     pair trading iin B/C bacaklarn broker tarafnda manuel veya ayr
    //     bir strateji ile karlamak gerekir. Backtest P&L'i tek bacakl.
    //    log(A/B) sabit 1:1 hedge varsayar. Fiyat seviyeleri ok farkl
    //     hisselerde dinamik β (rolling regression) daha dorudur  sonraki
    //     srme aday.
    //    Spread'in duraanl (cointegration) ayrca test edilmeli; integrity
    //     skoru bunun zayf bir vekilidir.
    // =============================================================================
    
    //@version=6
    strategy("V9.4 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,
         pyramiding=1)
    
    // ═════════════════════════════════════════════════════════════════════════
    //  1. GRDLER VE CEPHANELK
    // ═════════════════════════════════════════════════════════════════════════
    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,  "Ar Namlu (Uzun Z-Score)",  minval=100, maxval=500, group=grp_logic)
    shortZLength = input.int(80,   "Hafif Namlu (Ksa Z-Score)", minval=20,  maxval=150, group=grp_logic)
    entryZ       = input.float(1.70, "Taarruz Snr (+/-)", step=0.1, group=grp_logic)
    exitZ        = input.float(0.50, "Tahliye Snr (Ksa Namluya Gre)", step=0.1, group=grp_logic)
    stopZmult    = input.float(1.60, "Rejim Krlma arpan (stop)", step=0.1, minval=1.1, group=grp_logic,
         tooltip="Z, entryZ  bu arpan geerse pozisyon zorla kapatlr  cointegration krlmas varsaylr.")
    minIntegrity = input.float(55.0, "Minimum Gvenlik Puan", minval=0.0, maxval=100.0, group=grp_logic)
    
    grp_integrity = "ntegrity Arlklar"
    w_corr  = input.float(0.45, "Korelasyon Arl",       minval=0.0, maxval=1.0, step=0.05, group=grp_integrity)
    w_drift = input.float(0.30, "Mean Drift Arl",       minval=0.0, maxval=1.0, step=0.05, group=grp_integrity)
    w_vol   = input.float(0.25, "Vol Expansion Arl",    minval=0.0, maxval=1.0, step=0.05, group=grp_integrity)
    corrLen = input.int(60, "Korelasyon Penceresi",          minval=20, maxval=240, group=grp_integrity)
    
    grp_bc = "BC Cephesi (Filtre)"
    use_bc_filter = input.bool(true, "BC sakin deilse ilem ama", group=grp_bc,
         tooltip="A/B ve A/C extreme iken B/C de extreme ise sapma pair-specific deil rejim-wide'dr; ilem atlanr.")
    bc_calm_mult  = input.float(1.00, "BC Sakinlik Eii ( entryZ)", step=0.1, minval=0.5, group=grp_bc)
    
    grp_time = "Zaman Kalkan"
    hide_session = input.session("1810-0950", "Gizlenecek l Saatler", group=grp_time)
    tz           = input.string("UTC+3", "Saat Dilimi", group=grp_time)
    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 STHBARATI
    // ═════════════════════════════════════════════════════════════════════════
    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. KANTTATF MOTOR
    // ═════════════════════════════════════════════════════════════════════════
    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, corrLen)
        float volShortInt = ta.stdev(logRatio, 20)
        float volBaseInt  = ta.stdev(logRatio, corrLen)
        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 wsum = w_corr + w_drift + w_vol
        float integrityScore = wsum > 0
             ? math.max(0, math.min(100, 100.0 * (w_corr * corrNorm + w_drift * driftNorm + w_vol * volNorm) / wsum))
             : 0.0
        bool integrityOk = integrityScore >= minIntegrity
        [zLong, zShort, integrityScore, integrityOk]
    
    [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 (filtre)
    
    // ═════════════════════════════════════════════════════════════════════════
    //  4. STRATEJ FZYONU  Simetrik AND mant + BC filtresi
    // ═════════════════════════════════════════════════════════════════════════
    // Felsefe: A hissesi B ve C ile karlatrldnda HER K cephede de
    // ayn ynde extreme ise, anomali muhtemelen A'ya zgdr. Tek cephede
    // extreme ise B veya C anomali olabilir; A'nn yn belirsizdir.
    
    bool bc_calm = not use_bc_filter or
         (math.abs(zL_BC) < entryZ * bc_calm_mult and math.abs(zS_BC) < entryZ * bc_calm_mult)
    
    bool t_long_giris  = zL_AB <= -entryZ and zS_AB <= -entryZ and ok_AB and
                         zL_AC <= -entryZ and zS_AC <= -entryZ and ok_AC and
                         bc_calm and barstate.isconfirmed
    
    bool t_short_giris = zL_AB >= entryZ and zS_AB >= entryZ and ok_AB and
                         zL_AC >= entryZ and zS_AC >= entryZ and ok_AC and
                         bc_calm and barstate.isconfirmed
    
    if t_long_giris
        strategy.entry("LONG", strategy.long)
    if t_short_giris
        strategy.entry("SHORT", strategy.short)
    
    // Tahliye  simetrik AND: her iki cephe de mean'e dnm olmal
    bool tahliye_long  = zS_AB >= -exitZ and zS_AC >= -exitZ
    bool tahliye_short = zS_AB <=  exitZ and 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")
    
    // Rejim Krlma Stop'u  Z, entryZ  stopZmult'u aarsa cointegration krld say
    float stop_threshold = entryZ * stopZmult
    bool stop_long  = strategy.position_size > 0 and (zL_AB <= -stop_threshold or zL_AC <= -stop_threshold)
    bool stop_short = strategy.position_size < 0 and (zL_AB >=  stop_threshold or zL_AC >=  stop_threshold)
    if (stop_long or stop_short) and barstate.isconfirmed
        strategy.close_all(comment="REJM KIRILMA! Stop")
    
    // Acil Tahliye (Gvenlik hlali)  V9.3'ten korundu
    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. KOMUTA PANEL (HUD)  strateji mantyla bire bir
    // ═════════════════════════════════════════════════════════════════════════
    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)
        color c_filter = color.rgb(160, 120, 220)
    
        var table hud = table.new(position.top_right, 4, 7,
             bgcolor=color.new(#0D0D0D, 15),
             border_color=color.new(color.gray, 70),
             border_width=1)
    
        // st Balk
        table.cell(hud, 0, 0, "⚔️ V9.4 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)
    
        // Stun Balklar
        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 (Ar/Hafif)",  text_color=color.gray, text_size=size.small, bgcolor=color.new(#111111, 0))
        table.cell(hud, 2, 1, "Gvenlik",              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))
    
        // aretli (signed) Z aktiflik testi  strateji mantyla AYNI
        bool ab_long_side  = zL_AB <= -entryZ and zS_AB <= -entryZ and ok_AB
        bool ab_short_side = zL_AB >=  entryZ and zS_AB >=  entryZ and ok_AB
        bool ac_long_side  = zL_AC <= -entryZ and zS_AC <= -entryZ and ok_AC
        bool ac_short_side = zL_AC >=  entryZ and zS_AC >=  entryZ and ok_AC
    
        // 1. Cephe (A vs B)
        string emir_AB = ab_short_side ? nA + " SAT\n" + nB + " AL"
                       : ab_long_side  ? nA + " AL\n"  + nB + " SAT"
                       : "BEKLE"
        color c_AB = ab_short_side ? c_bear : ab_long_side ? 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=(ab_long_side or ab_short_side) ? 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)
        string emir_AC = ac_short_side ? nA + " SAT\n" + nC + " AL"
                       : ac_long_side  ? nA + " AL\n"  + nC + " SAT"
                       : "BEKLE"
        color c_AC = ac_short_side ? c_bear : ac_long_side ? 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=(ac_long_side or ac_short_side) ? 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)  FLTRE: ilem retmez, karar onaylar/bloklar
        string emir_BC = bc_calm ? "SAKN (onay)" : "REJM (blok)"
        color c_BC = bc_calm ? c_bull : c_filter
    
        table.cell(hud, 0, 4, nB + " / " + nC + "  (filtre)", 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=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))
    
        // Sistem Karar Satr  gerek strateji kts (AB ∧ AC ∧ bc_calm)
        bool active_long  = ab_long_side  and ac_long_side  and bc_calm
        bool active_short = ab_short_side and ac_short_side and bc_calm
        string sistem_emri = active_long  ? "LONG  " + nA + "  (AL)"
                           : active_short ? "SHORT " + nA + "  (SAT)"
                           : "POZSYON YOK"
        color c_sistem = active_long ? c_bull : active_short ? c_bear : color.gray
    
        table.cell(hud, 0, 5, "Sistem Karar", text_color=color.white, text_size=size.small, bgcolor=color.new(#0a0a0a, 0))
        table.merge_cells(hud, 0, 5, 2, 5)
        table.cell(hud, 3, 5, sistem_emri, text_color=c_sistem, text_size=size.small, bgcolor=color.new(#0a0a0a, 0))
    
        // Kr Faktr
        table.cell(hud, 0, 6, "Sistem Kr Faktr", text_color=color.white, text_size=size.small, bgcolor=color.new(#111111, 0))
        table.merge_cells(hud, 0, 6, 2, 6)
        table.cell(hud, 3, 6, str.tostring(kar_faktoru, "#.##"),
             text_color=kar_faktoru >= 1.2 ? c_bull : c_bear, text_size=size.small, bgcolor=color.new(#111111, 0))

     Alnt Originally Posted by @yrk@ Yazy Oku
    bu l arbitraj almas rneim... belki faydas olur....
    PHP Code:
    //  Kinetik Komuta Merkezi - V9.3  EKRDEKL ARBTRAJ 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. GRDLER VE CEPHANELK (3 HSSE)
    // ═════════════════════════════════════════════════════════════════════════
    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"Ar Namlu (Uzun Z-Score)"minval=100maxval=500group=grp_logic)
    shortZLength input.int(80"Hafif Namlu (Ksa Z-Score)"minval=20maxval=150group=grp_logic)
    entryZ       input.float(1.70"Taarruz Snr (+/-)"step=0.1group=grp_logic)
    exitZ        input.float(0.50"Tahliye Snr (Ksa Namluya Gre)"step=0.1group=grp_logic)
    minIntegrity input.float(55.0"Minimum Gvenlik 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 STHBARATI
    // ═════════════════════════════════════════════════════════════════════════
    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. KANTTATF MOTOR (ZEL FONKSYON)
    // ═════════════════════════════════════════════════════════════════════════
    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 iin motoru altr
    [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 FZYONU (SAVA ALANI)
    // ═════════════════════════════════════════════════════════════════════════
    // lem Tetii (Strateji motoru sadece Grafikteki Hisse - A Hissesi iin ilem aar, kr oradan ler)
    // A Hissesinin dahil olduu en gl 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 kapanrsa 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 (Gvenlik 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 Balk
        
    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)
        
        
    // Stun Balklar
        
    table.cell(hud01"Kombinasyon (Cephe)"text_color=color.graytext_size=size.smallbgcolor=color.new(#111111, 0))
        
    table.cell(hud11"Z-Score (Ar/Hafif)"text_color=color.graytext_size=size.smallbgcolor=color.new(#111111, 0))
        
    table.cell(hud21"Gvenlik"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 Ksm: Kr Faktr zeti
        
    table.cell(hud05"Sistem Kr Faktr"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)) 
    rnek resim.... https://www.tradingview.com/x/fviKNKUD/
    Sradan bir insan

  7.  Alnt Originally Posted by @yrk@ Yazy Oku
    hocam ayn soruyu kendime sordum....

    rnekteki kodda... 3hisse diyelim ki elimde...

    normalde korele var m yok mu dersen....
    dediin gibi iin iine beta hesab giriyor... TW de yapmak imkansz....
    pyton gibi dilleri kullanp.... hesaplanyor.... beta kyor....

    baka bir deyile... iki sarho ayn sokaa girdi diye... korele var kabul ediyoruz...
    yani gda biri giderse... dieri de gider gibi....
    Bu da bir yntem ve gzel bir tebih.
    Ama ben tam olarak bundan sz etmiyorum stadm.
    Kendimce sinyal reten bir sistemim var. Ayn biimde senin de.
    Diyelim ki vadelisi de olan X bir senet iin "AL" sinyali verdi sistemlerimiz.
    Ama bunu spotta almak yerine... Vadeli de almak veya opsiyon piyasasndaki frsatlar deerlendirmek...
    Neden olmasn?

  8.  Alnt Originally Posted by Oblo Yazy Oku
    Bu arada konu Tradingview ile ilgili deil znde. O nedenle aslnda yanl balktayz.
    Mesleki olarak konu senin alannda olduundan ya bir balk a.
    "YZ ile Analiz" vb. benzeri... Veya iletiim srecekse uygun baka bir yere tayalm.
    Sayn @yrk@ n emekleri, gnderileri kayp gitmesin.

    Son gnderi:
    aslnda haklsn....
    ama.. ben genellikle... YZ, yazdrdm kodlar... TW iin olduundan...
    buraya yazyorum....

    ou YZ almasn ise https://www.hisse.net/topluluk/threa...90#post7208490
    buraya yedekliyorum... kaybolmasn diye....

    zaten... pek ilgi duyan yok....

    sizlerde olmasanz... insann yazas bile gelmiyor artk....
    16.07.2024 - 10.12.2024

Sayfa 422/423 lklk ... 322372412420421422423 SonSon

Yer mleri

Yer mleri

Gnderi Kurallar

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