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

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

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

Konu: Tradingview

  1. X100-X30... korelasyonlamaca....
    PHP Code:
    // This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © k4sual

    //@version=6
    indicator('korelasyon'overlay trueformat format.pricemax_boxes_count 500max_labels_count 500max_lines_count 500max_bars_back 5000)
    import Trendoscope/ZigzagLite/as zg

    const string visualG 'Display ________________________________________________________'
    const string configG 'Configuration ________________________________________________________'
    const string configSMTG 'Configuration - SMT ________________________________________________________'

    type configSMT
        int len

        bool useSymbolA
        string symbolA

        bool useSymbolB
        string symbolB

    type configGen
        bool detectionShow
        string sensitivity
        int memoryBufferSize
        bool deleteInvalidated
        int activeSMTMaxAge
        int confirmedSMTKeepBars

    type cssSMT
        color uLink
        color dLink
        int linkW
        string linkStyle

        bool showLbl
        color lblUclr
        color lblDclr
        string lblSize

    configGen cfgGenSMT 
    configGen.new(
         
    input.bool(false'↯ Show Detection'tooltip 'This setting visualizes the process for detecting SMT divergences. It looks very cool in sped-up replay mode.'group configG),
         
    input.string('High''Sens.', ['Abysmal''Low''Med.''High''Insane'], tooltip 'This script uses a ZigZag algorithm to detect SMTs. This setting changes the zigzag\'s sensitivity to new pivots.'group configG),
         
    input.int(12'Memory Buffer'minval 6maxval 256step 2group configG),
         
    input.bool(true'Hide invalidated SMTs'group configG),
         
    300// input.int(300, 'debug_ActiveSMTMaxAgeBarCount', minval = 1, maxval = 5000, group = configG, tooltip = 'SMTs older than this many bars are no longer considered active.'),
         
    1000 // input.int(1000, 'debug_ConfirmedSMTKeepForBarCount', minval = 1, maxval = 5000, group = configG, tooltip = 'Confirmed SMTs older than this many bars are removed from memory.')
         
    )
         
    configSMT cfgSMT configSMT.new(
         
    10// placeholder
         
    input.bool(true''group configSMTGinline 'symA'confirm true),
         
    input.symbol('BIST:XU100'''group configSMTGinline 'symA'confirm true),
         
    input.bool(false''group configSMTGinline 'symB'confirm true),
         
    input.symbol('BIST:XU030'''group configSMTGinline 'symB'confirm true)
         )

    cssSMT cosSMT cssSMT.new(
         
    input.color(color.new(#8fadff, 50), 'Link —    ', group = visualG, inline = 'link'),
         
    input.color(color.new(#ffffff, 50), '', group = visualG, inline = 'link'),
         
    input.int(1''group visualGinline 'link'),
         
    input.string('solid'''group visualGinline 'link'options = ['solid''dashed''dotted']),

         
    input.bool(true'Label'group visualGinline 'lbl'),
         
    input.color(color.new(#8fadff, 75), '', group = visualG, inline = 'lbl'),
         
    input.color(color.new(#ffffff, 75), '', group = visualG, inline = 'lbl'),
         
    input.string('tiny'''group visualGinline 'lbl'options = ['tiny''small''normal''large''huge'])
         )

    sensLen = switch cfgGenSMT.sensitivity
        
    'Abysmal' => 72
        
    'Low' => 32
        
    'Med.' => 12
        
    'High' => 6
        
    'Insane' => 2
        
    => 10 //
        

    var zg.Zigzag smtMainZZ zg.Zigzag.new(sensLencfgGenSMT.memoryBufferSize)
    smtMainZZ.calculate()

    var 
    polyline analysisPL na
    var array<labelanalysisDots = array.new<label>()

    smtPvtArray smtMainZZ.zigzagPivots

    if cfgGenSMT.detectionShow
        
    if array.size(analysisDots) > 0
            
    for 0 to array.size(analysisDots) - 1
                analysisDots
    .get(i).delete()
            array.
    clear(analysisDots)

        if array.
    size(smtPvtArray) > 0
            
    for 0 to array.size(smtPvtArray) - 1
                pvt 
    smtPvtArray.get(i)
                
    pvtDir pvt.dir

                analysisDot 
    label.new(
                     
    xloc xloc.bar_index,
                     
    pvt.point.index,
                     
    pvt.point.price
                     
    style label.style_circle,
                     
    text str.tostring(i),
                     
    size size.tiny,
                     
    color math.sign(pvtDir) == cosSMT.lblDclr cosSMT.lblUclr)

                array.
    push(analysisDotsanalysisDot)
        
    method stripPrefix(string sym) =>
        
    int colon str.pos(sym":")
        
    colon != -str.substring(symcolon 1) : sym

    externalHi  
    request.security(cfgSMT.symbolAtimeframe.periodhigh)
    externalLo  request.security(cfgSMT.symbolAtimeframe.periodlow)
    externalHiB request.security(cfgSMT.symbolBtimeframe.periodhigh)
    externalLoB request.security(cfgSMT.symbolBtimeframe.periodlow)

    isDivergenceA() =>
        
    smtOK false
        zg
    .Pivot pvtNewest     na
        float pvtNewestPrice   
    na
        zg
    .Pivot pvtOlder      na
        float pvtOlderPrice    
    na
        zg
    .Pivot pvtIntermediate na
        
    if cfgSMT.useSymbolA and smtPvtArray.size() >= 4
            
    for 2 to smtPvtArray.size() - 1 by 2
                pvtNewest      
    := smtPvtArray.first()
                
    pvtNewestPrice := pvtNewest.point.price
                pvtOlder       
    := smtPvtArray.get(i)
                
    pvtOlderPrice  := pvtOlder.point.price

                pvtIntermediate 
    := smtPvtArray.get(1)

                
    float pvtNewestComparePrice na
                float pvtOlderComparePrice 
    na

                
    if math.sign(pvtNewest.dir) != math.sign(pvtOlder.dir)
                    
    runtime.error('logic error: pivot directions dont match')
                else if 
    math.sign(pvtNewest.dir) == 1
                    pvtNewestComparePrice 
    := externalHi[bar_index pvtNewest.point.index]
                    
    pvtOlderComparePrice  := externalHi[bar_index pvtOlder.point.index]
                else if 
    math.sign(pvtNewest.dir) == -1
                    pvtNewestComparePrice 
    := externalLo[bar_index pvtNewest.point.index]
                    
    pvtOlderComparePrice  := externalLo[bar_index pvtOlder.point.index]

                if 
    not na(pvtNewestComparePrice) and not na(pvtOlderComparePrice)
                    if ((
    pvtNewestPrice pvtOlderPrice) and not (pvtNewestComparePrice pvtOlderComparePrice)) or ((pvtNewestPrice pvtOlderPrice) and not (pvtNewestComparePrice pvtOlderComparePrice))
                        
    log.info('SMT@{0} x {1}:A :pvtNewestPrice: {2} | pvtOlderPrice: {3} and pvtNewestComparePrice: {4} | pvtOlderComparePrice: {5}'0ipvtNewestPricepvtOlderPricepvtNewestComparePricepvtOlderComparePrice)
                        
    log.info('size: {0}'2)
                        
    smtOK := true
                        
    if (2)
                            
    log.info('checking invl')
                            for 
    2 to i -1 by 2
                                pvtC 
    smtPvtArray.get(j)
                                if 
    math.sign(pvtNewest.dir) == and (pvtC.point.price math.min(pvtNewestPricepvtOlderPrice))
                                    
    log.info('^invalidated at {0}'j)
                                    
    smtOK := false
                                    
    break
                                else if 
    math.sign(pvtNewest.dir) == -and (pvtC.point.price math.max(pvtNewestPricepvtOlderPrice))
                                    
    log.info('^invalidated at {0}'j)
                                    
    smtOK := false
                                    
    break
                if 
    smtOK
                    
    break
        [
    smtOKpvtNewestpvtOlderpvtIntermediate]

    isDivergenceB() =>
        
    smtOK false
        zg
    .Pivot pvtNewest     na
        float pvtNewestPrice   
    na
        zg
    .Pivot pvtOlder      na
        float pvtOlderPrice    
    na
        zg
    .Pivot pvtIntermediate na
        
    if cfgSMT.useSymbolB and smtPvtArray.size() >= 4
            
    for 2 to smtPvtArray.size() - 1 by 2
                pvtNewest      
    := smtPvtArray.first()
                
    pvtNewestPrice := pvtNewest.point.price
                pvtOlder       
    := smtPvtArray.get(i)
                
    pvtOlderPrice  := pvtOlder.point.price

                pvtIntermediate 
    := smtPvtArray.get(1)

                
    float pvtNewestComparePrice na
                float pvtOlderComparePrice 
    na

                
    if math.sign(pvtNewest.dir) != math.sign(pvtOlder.dir)
                    
    runtime.error('logic error: pivot directions dont match')
                else if 
    math.sign(pvtNewest.dir) == 1
                    pvtNewestComparePrice 
    := externalHiB[bar_index pvtNewest.point.index]
                    
    pvtOlderComparePrice  := externalHiB[bar_index pvtOlder.point.index]
                else if 
    math.sign(pvtNewest.dir) == -1
                    pvtNewestComparePrice 
    := externalLoB[bar_index pvtNewest.point.index]
                    
    pvtOlderComparePrice  := externalLoB[bar_index pvtOlder.point.index]

                if 
    not na(pvtNewestComparePrice) and not na(pvtOlderComparePrice)
                    if ((
    pvtNewestPrice >= pvtOlderPrice) and not (pvtNewestComparePrice >= pvtOlderComparePrice)) or ((pvtNewestPrice <= pvtOlderPrice) and not (pvtNewestComparePrice <= pvtOlderComparePrice))
                        
    log.info('SMT@{0} x {1}:B, :pvtNewestPrice: {2} | pvtOlderPrice: {3} and pvtNewestComparePrice: {4} | pvtOlderComparePrice: {5}'0ipvtNewestPricepvtOlderPricepvtNewestComparePricepvtOlderComparePrice)
                        
    log.info('size: {0}'2)
                        
    smtOK := true
                        
    if (2)
                            for 
    2 to i -1 by 2
                                pvtC 
    smtPvtArray.get(j)
                                if 
    math.sign(pvtNewest.dir) == and (pvtC.point.price math.min(pvtNewestPricepvtOlderPrice))
                                    
    log.info('^invalidated at {0}'j)
                                    
    smtOK := false
                                    
    break
                                else if 
    math.sign(pvtNewest.dir) == -and (pvtC.point.price math.max(pvtNewestPricepvtOlderPrice))
                                    
    log.info('^invalidated at {0}'j)
                                    
    smtOK := false
                                    
    break
                if 
    smtOK
                    
    break
        [
    smtOKpvtNewestpvtOlderpvtIntermediate]

    [
    isCurrentSMTApvtNewestApvtOlderApvtIntermediateA] = isDivergenceA()
    [
    isCurrentSMTBpvtNewestBpvtOlderBpvtIntermediateB] = isDivergenceB()

    type smtLinkCalc
        chart
    .point anchorA
        chart
    .point anchorB
        chart
    .point anchorZ
        string symbol
        float dir

        bool invalidated
        int invalidationIndex 
    na
        bool validated
        int validationIndex 
    na

    type confirmedArraySwitcher
        
    array<smtLinkCalcchart 
        
    array<smtLinkCalcother 

    varip smtRawArrA 
    = array.new<smtLinkCalc>()
    varip smtRawArrB = array.new<smtLinkCalc>()
    varip smtConfirmedArrA confirmedArraySwitcher.new(chart = array.new<smtLinkCalc>(), other = array.new<smtLinkCalc>())
    varip smtConfirmedArrB confirmedArraySwitcher.new(chart = array.new<smtLinkCalc>(), other = array.new<smtLinkCalc>())

    calcSMT(isCurrentSMTpvtNewestpvtOlderpvtIntermediatesymbol, array<smtLinkCalcsmtRawArr) =>
        if 
    isCurrentSMT and bar_index > (last_bar_index 2500) and not na(pvtNewest) and not na(pvtOlder)
            
    anchorA chart.point.new(0pvtNewest.point.indexpvtNewest.point.price)
            
    anchorB chart.point.new(0pvtOlder.point.indexpvtOlder.point.price)
            
    anchorZ chart.point.new(0pvtIntermediate.point.indexpvtIntermediate.point.price)

            
    smtRawArr.push(smtLinkCalc.new(anchorAanchorBanchorZsymbol, -math.sign(pvtNewest.dir)))

    calcSMT(isCurrentSMTApvtNewestApvtOlderApvtIntermediateA'A'smtRawArrA)
    calcSMT(isCurrentSMTBpvtNewestBpvtOlderBpvtIntermediateB'B'smtRawArrB)

    confirmSMT(array<smtLinkCalcsmtRawArrconfirmedArraySwitcher smtConfirmedArrSw) =>
        if 
    smtRawArr.size() > 0
            rSmt 
    smtRawArr.last()
            
    rAP rSmt.anchorA.price
            rBP 
    rSmt.anchorB.price
            
    if ((smtConfirmedArrSw.chart.size() < 1) or (smtConfirmedArrSw.other.size() < 1))
                if (
    rSmt.dir == and rAP rBP) or
                     (
    rSmt.dir == -and rAP rBP) and
                     
    smtConfirmedArrSw.chart.size() < 1
                    smtConfirmedArrSw
    .chart.push(rSmt)
                else if 
    smtConfirmedArrSw.other.size() < 1
                    smtConfirmedArrSw
    .other.push(rSmt)
                
    smtRawArr.clear()
            else if 
    smtRawArr.size() > 0
                
    for smt in smtRawArr
                    aP 
    smt.anchorA.price
                    bP 
    smt.anchorB.price
                    lastConfirmedSMT 
    = (smt.dir == and aP bP) or (smt.dir == -and aP bP) ? smtConfirmedArrSw.chart.last() : smtConfirmedArrSw.other.last() 
                    if (
    smt.dir == and aP bP) or 
                         (
    smt.dir == -and aP bP)
                        if 
    smt.anchorB.index != lastConfirmedSMT.anchorB.index
                            log
    .info('{0} != {1}'smt.anchorB.indexlastConfirmedSMT.anchorB.index)
                            
    smtConfirmedArrSw.chart.push(smt)
                        else
                            
    smtConfirmedArrSw.chart.pop()
                            
    smtConfirmedArrSw.chart.push(smt)
                    else
                        if 
    smt.anchorB.index != lastConfirmedSMT.anchorB.index
                            log
    .info('{0} != {1}'smt.anchorB.indexlastConfirmedSMT.anchorB.index)
                            
    smtConfirmedArrSw.other.push(smt)
                        else
                            
    smtConfirmedArrSw.other.pop()
                            
    smtConfirmedArrSw.other.push(smt)
                
    smtRawArr.clear()

    confirmSMT(smtRawArrAsmtConfirmedArrA)
    confirmSMT(smtRawArrBsmtConfirmedArrB)

    type smtLinkDraw
        smtLinkCalc data
        line link
        label lbl
        line linkInvalidation
        line linkValidation

    var smtDrawArrA = array.new<smtLinkDraw>()
    var 
    smtDrawArrB = array.new<smtLinkDraw>()

    if 
    smtDrawArrA.size() > 0
        
    for 0 to array.size(smtDrawArrA) - 1
            smtDrawArrA
    .get(i).link.delete()
            
    smtDrawArrA.get(i).lbl.delete()
            
    smtDrawArrA.get(i).linkInvalidation.delete()
        array.
    clear(smtDrawArrA)

    if 
    smtDrawArrB.size() > 0
        
    for 0 to array.size(smtDrawArrB) - 1
            smtDrawArrB
    .get(i).link.delete()
            
    smtDrawArrB.get(i).lbl.delete()
            
    smtDrawArrB.get(i).linkInvalidation.delete()
        array.
    clear(smtDrawArrB)

    drawSMT(smtLinkCalc linkCalc) =>
        if 
    not na(linkCalc)
            
    string style = switch cosSMT.linkStyle
                
    'solid'  => line.style_solid
                
    'dashed' => line.style_dashed
                
    'dotted' => line.style_dotted
                
    => line.style_solid

            string size 
    = switch cosSMT.lblSize
                
    'tiny'   => size.tiny
                
    'small'  => size.small
                
    'normal' => size.normal
                
    'large'  => size.large
                
    'huge'   => size.large
                
    => size.tiny

            string labelText 
    na

            
    if linkCalc.dir == 1
                labelText 
    := linkCalc.symbol == 'A' cfgSMT.symbolA.stripPrefix() : linkCalc.symbol == 'B' cfgSMT.symbolB.stripPrefix() + '\n' ''
            
    else if linkCalc.dir == -1
                labelText 
    := linkCalc.symbol == 'A' cfgSMT.symbolA.stripPrefix() : linkCalc.symbol == 'B' '\n' cfgSMT.symbolB.stripPrefix() : ''

            
    link line.new(
                
    chart.point.from_index(linkCalc.anchorA.indexlinkCalc.anchorA.price syminfo.mintick * -math.sign(linkCalc.dir)),
                
    chart.point.from_index(linkCalc.anchorB.indexlinkCalc.anchorB.price syminfo.mintick * -math.sign(linkCalc.dir)),
                
    color linkCalc.invalidated cfgGenSMT.deleteInvalidated color.new(color.black100) : color.new(color.red50) : linkCalc.dir == cosSMT.uLink cosSMT.dLink,
                
    width cosSMT.linkW,
                
    style style)

            
    aP linkCalc.anchorA.price
            bP 
    linkCalc.anchorB.price
            zP 
    linkCalc.anchorZ.price

            invalidated 
    linkCalc.invalidated

            line linkInvalidation 
    na
            
    if (linkCalc.dir == and aP bP) or 
                 (
    linkCalc.dir == -and aP bP)
                
    linkInvalidation := line.new(
                    
    linkCalc.anchorB,
                    
    chart.point.from_index(invalidated linkCalc.invalidationIndex linkCalc.anchorA.index 2linkCalc.anchorB.price),
                    
    color cfgGenSMT.deleteInvalidated color.new(color.black100) : color.new(color.gray25),
                    
    width cosSMT.linkW,
                    
    style line.style_dotted
                
    )

            
    line linkValidation na
            
    if (linkCalc.dir == and aP bP) or
                 (
    linkCalc.dir == -and aP bP)
                
    linkValidation := line.new(
                    
    linkCalc.anchorZ,
                    
    chart.point.from_index(linkCalc.anchorA.index 2linkCalc.anchorZ.price),
                    
    color cfgGenSMT.deleteInvalidated color.new(color.black100): color.new(color.white25),
                    
    width cosSMT.linkW,
                    
    style line.style_dotted
                
    )
                
            
    lblChartPoint chart.point.from_index((linkCalc.anchorA.index linkCalc.anchorB.index) / 2, ((linkCalc.anchorA.price linkCalc.anchorB.price) / syminfo.mintick * -math.sign(linkCalc.dir)))
            
    lbl cosSMT.showLbl label.new(
                
    lblChartPoint,
                
    text labelText,
                
    color color.new(color.black100),
                
    textcolor = (cfgGenSMT.deleteInvalidated and linkCalc.invalidated) ? color.new(color.black100) : linkCalc.dir == color.new(cosSMT.lblUclr10) : color.new(cosSMT.lblDclr10),
                
    style linkCalc.dir == -label.style_label_down label.style_label_up,
                
    size size,
                
    text_font_family font.family_monospace
            
    ) : na

            smtLinkDraw
    .new(linkCalclinklbllinkInvalidation)


    // log.info('smtConfirmedArrA.size() = {0} and {1}', smtConfirmedArrA.chart.size(), smtConfirmedArrA.other.size())
    // log.info('smtRawArrA.size() = {0}', smtRawArrA.size())
    // log.info('smtConfirmedArrB.size() = {0} and {1}', smtConfirmedArrB.chart.size(), smtConfirmedArrB.other.size())
    // log.info('smtRawArrB.size() = {0}', smtRawArrB.size())

    method priceHit(float thisfloat hifloat lo) =>
        (
    hi >= this and lo <= this)

    method pruneConfirmedSMTArray(array<smtLinkCalcsmtArrint keepBars) =>
        if 
    smtArr.size() > 0
            
    for smtArr.size() - 1 to 0 by 1
                smtD 
    smtArr.get(i)
                
    newestAnchorIndex math.max(smtD.anchorA.indexsmtD.anchorB.indexsmtD.anchorZ.index)
                if 
    bar_index newestAnchorIndex keepBars
                    smtArr
    .remove(i)

    method checkInvalidation(array<smtLinkCalcsmtArrsymbol) =>
        if 
    smtArr.size() > 0
            symHigh 
    request.security(symboltimeframe.periodhigh)
            
    symLow request.security(symboltimeframe.periodlow)
            for 
    0 to smtArr.size() - 1
                smtD 
    smtArr.get(i)
                
    aP smtD.anchorA.price
                bP 
    smtD.anchorB.price
                topDot 
    math.sign(smtD.dir) == 1
                aPS 
    topDot symHigh[bar_index smtD.anchorA.index] : symLow[bar_index smtD.anchorA.index]
                
    bPS topDot symHigh[bar_index smtD.anchorB.index] : symLow[bar_index smtD.anchorB.index]
                if ((
    smtD.dir == and aP bP and high bP) or 
                     (
    smtD.dir == -and aP bP and low bP)) and not (smtD.invalidated or smtD.validated)
                    
    log.info('smt invalidation')
                    
    smtD.invalidationIndex := bar_index
                    smtD
    .invalidated := true
                
    else if ((smtD.dir == and aPS bPS and symHigh bPS) or
                     (
    smtD.dir == -and aPS bPS and symLow bPS)) and not (smtD.invalidated or smtD.validated)
                    
    log.info('smt invalidation')
                    
    smtD.invalidated := true

    method checkValidation
    (array<smtLinkCalcsmtArrsymbol) =>
        if 
    smtArr.size() > 0
            symHigh 
    request.security(symboltimeframe.periodhigh)
            
    symLow request.security(symboltimeframe.periodlow)
            
    symClose request.security(symboltimeframe.periodclose)
            for 
    0 to smtArr.size() - 1
                smtD 
    smtArr.get(i)
                
    aP smtD.anchorA.price
                bP 
    smtD.anchorB.price
                zP 
    smtD.anchorZ.price
                topDot 
    math.sign(smtD.dir) == 1
                aPS 
    topDot symHigh[bar_index smtD.anchorA.index] : symLow[bar_index smtD.anchorA.index]
                
    bPS topDot symHigh[bar_index smtD.anchorB.index] : symLow[bar_index smtD.anchorB.index]
                
    zPS topDot symHigh[bar_index smtD.anchorZ.index] : symLow[bar_index smtD.anchorZ.index]
                if ((
    smtD.dir == and aP bP and close zP) or
                    (
    smtD.dir == -and aP bP and close zP)) and not (smtD.invalidated or smtD.validated)
                    
    log.info('smt validated')
                    
    smtD.validationIndex := bar_index
                    smtD
    .validated := true
                
    else if ((smtD.dir == and aPS bPS and symClose zPS) or 
                    (
    smtD.dir == -and aPS bPS and symClose zPS)) and not (smtD.invalidated or smtD.validated)
                    
    log.info('smt validated')
                    
    smtD.validated := true
                
    smtConfirmedArrA
    .chart.checkInvalidation(cfgSMT.symbolA)
    smtConfirmedArrA.chart.checkValidation(cfgSMT.symbolA)
    smtConfirmedArrA.other.checkInvalidation(cfgSMT.symbolA)
    smtConfirmedArrA.other.checkValidation(cfgSMT.symbolA)
    smtConfirmedArrB.chart.checkInvalidation(cfgSMT.symbolB)
    smtConfirmedArrB.chart.checkValidation(cfgSMT.symbolB)
    smtConfirmedArrB.other.checkInvalidation(cfgSMT.symbolB)
    smtConfirmedArrB.other.checkValidation(cfgSMT.symbolB)

    smtConfirmedArrA.chart.pruneConfirmedSMTArray(cfgGenSMT.confirmedSMTKeepBars)
    smtConfirmedArrA.other.pruneConfirmedSMTArray(cfgGenSMT.confirmedSMTKeepBars)
    smtConfirmedArrB.chart.pruneConfirmedSMTArray(cfgGenSMT.confirmedSMTKeepBars)
    smtConfirmedArrB.other.pruneConfirmedSMTArray(cfgGenSMT.confirmedSMTKeepBars)

    if 
    smtConfirmedArrA.chart.size() > 0
        
    for 0 to smtConfirmedArrA.chart.size() -1
            smtDrawArrA
    .push(drawSMT(smtConfirmedArrA.chart.get(i)))
    if 
    smtConfirmedArrA.other.size() > 0
        
    for 0 to smtConfirmedArrA.other.size() -1
            smtDrawArrA
    .push(drawSMT(smtConfirmedArrA.other.get(i)))

    if 
    smtConfirmedArrB.chart.size() > 0
        
    for 0 to smtConfirmedArrB.chart.size() -1
            smtDrawArrB
    .push(drawSMT(smtConfirmedArrB.chart.get(i)))
    if 
    smtConfirmedArrB.other.size() > 0
        
    for 0 to smtConfirmedArrB.other.size() -1
            smtDrawArrB
    .push(drawSMT(smtConfirmedArrB.other.get(i)))

    type smtFlag
        int activeSMTCount
        
    array<smtLinkCalcactiveSMTArr

    smtFlagA 
    smtFlag.new(0, array.new<smtLinkCalc>())
    smtFlagB smtFlag.new(0, array.new<smtLinkCalc>())

    updateActiveSMTFlag(confirmedArraySwitcher smtConfirmedArrSwsmtFlag smtFlagObj) =>
        array.
    clear(smtFlagObj.activeSMTArr)

        if 
    smtConfirmedArrSw.chart.size() > 0
            
    for smt in smtConfirmedArrSw.chart
                newestAnchorIndex 
    math.max(smt.anchorA.indexsmt.anchorB.indexsmt.anchorZ.index)
                
    isFresh bar_index newestAnchorIndex <= cfgGenSMT.activeSMTMaxAge
                
    if isFresh and not smt.invalidated and not smt.validated
                    
    array.push(smtFlagObj.activeSMTArrsmt)

        if 
    smtConfirmedArrSw.other.size() > 0
            
    for smt in smtConfirmedArrSw.other
                newestAnchorIndex 
    math.max(smt.anchorA.indexsmt.anchorB.indexsmt.anchorZ.index)
                
    isFresh bar_index newestAnchorIndex <= cfgGenSMT.activeSMTMaxAge
                
    if isFresh and not smt.invalidated and not smt.validated
                    
    array.push(smtFlagObj.activeSMTArrsmt)

        
    smtFlagObj.activeSMTCount := array.size(smtFlagObj.activeSMTArr)

    updateActiveSMTFlag(smtConfirmedArrAsmtFlagA)
    updateActiveSMTFlag(smtConfirmedArrBsmtFlagB
    16.07.2024 - 10.12.2024

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

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

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

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

    method f_updateState
    (SARState statefloat high_valfloat low_valfloat close_valfloat accel_startfloat accel_incfloat accel_maxfloat decay_limitfloat atr_val) =>
        
    bool isInitialTrend false
        bool trend_changed 
    false

        
    if na(state.sar_value)
            if 
    close_val close_val[1]
                
    state.isLong        := true
                state
    .extreme_point := high_val
                state
    .sar_value     := low_val[1]
            else
                
    state.isLong        := false
                state
    .extreme_point := low_val
                state
    .sar_value     := high_val[1]
            
    isInitialTrend          := true
            state
    .accel_factor      := accel_start
            state
    .trend_age         := 0
        
    else
            
    state.trend_age += 1
            
        state
    .sar_value += state.accel_factor * (state.extreme_point state.sar_value)
        
        if 
    state.isLong
            
    if state.sar_value low_val
                isInitialTrend      
    := true
                trend_changed       
    := true
                state
    .isLong        := false
                state
    .sar_value     := math.max(high_valstate.extreme_point)
                
    state.extreme_point := low_val
                state
    .accel_factor  := accel_start
                state
    .trend_age     := 
        
    else
            if 
    state.sar_value high_val
                isInitialTrend      
    := true
                trend_changed       
    := true
                state
    .isLong        := true
                state
    .sar_value     := math.min(low_valstate.extreme_point)
                
    state.extreme_point := high_val
                state
    .accel_factor  := accel_start
                state
    .trend_age     := 
                
        
    if trend_changed
            state
    .bounce_count := 
            state
    .was_touching := false
        
    else
            
    float tol atr_val 0.2 
            bool is_touch 
    state.isLong ? (low_val <= state.sar_value tol) : (high_val >= state.sar_value tol)
            if 
    is_touch and not state.was_touching
                state
    .bounce_count += 
            state
    .was_touching := is_touch

        float decay_factor 
    math.max(0.011.0 - (state.trend_age decay_limit))
        
    float yasli_inc    accel_inc decay_factor

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

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

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

    float gercek_oynaklik ta.atr(14)

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

    var 
    int king_idx 
    int new_king 
    = -1

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

    if 
    new_king != -1
        king_idx 
    := new_king 

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

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

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

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

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

    cc ta.sar(0.00.010.3

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

    plot(kral_sartitle="SAR"color=col_kralstyle=plot.style_circleslinewidth=3)
    plot(kral_aynatitle="Ayna"color=col_aynastyle=plot.style_linelinewidth=2)
    p_sup plot(channel_supporttitle="Destek (Long Stop)"color=color.new(color.green20), style=plot.style_linebrlinewidth=2)
    p_res plot(channel_resist,  title="Direnç (Short Stop)"color=color.new(color.red20), style=plot.style_linebrlinewidth=2)
    fill(p_supp_rescolor=color.new(color.gray90), title="Dinamik Trade Kanalý")
    plot(cctitle="@yörük@"color=color.new(color.white0), style=plot.style_crosslinewidth=2)

    //plotshape(al_sinyali,  title="Trend AL",  style=shape.labelup,   location=location.belowbar, color=color.lime, text="AL", textcolor=color.black, size=size.small)
    //plotshape(sat_sinyali, title="Trend SAT", style=shape.labeldown, location=location.abovebar, color=color.red,  text="SAT", textcolor=color.white, size=size.small)

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

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

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

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

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

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

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

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

    // ─────────────────────────────────────────────────────────────────
    //  7. ÝSTATÝSTÝKSEL VOLATÝLÝTE (%68)
    // ─────────────────────────────────────────────────────────────────
    logReturn math.log(close close[1])
    rawVol    ta.stdev(logReturnvolLength)
    annualVol rawVol math.sqrt(barsPerYear)

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

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

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

        
    float tip1up conePrice(closeannualVolprojBars1.0,  1)
        
    float tip1dn conePrice(closeannualVolprojBars1.0, -1)
        
    int tipX bar_index projBars 

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

    ////
    // ÝMZA
    var table ytd_table table.new(position.bottom_center11)
    if 
    barstate.islast
        table
    .cell(ytd_table00"(AÝ, (Gemini Pro) ile tasarlanmýþ OTONOM grafik, Eðitim çalýþmasýdýr.) Yatýrým tavsiyesi olarak KULLANILAMAZ."text_color=color.new(color.white00), text_size=size.normal)
    /////////////////

    // ─────────────────────────────────────────────────────────────────
    //  1. GÝRDÝLER 
    // ─────────────────────────────────────────────────────────────────
    h_start input.float(0.06"Hýzlý SAR Baþlangýç"step=0.01group="Hýzlý Ayna (Kalýn)")
    h_inc   input.float(0.06"Hýzlý SAR Ývme"step=0.01group="Hýzlý Ayna (Kalýn)")
    h_max   input.float(0.30"Hýzlý SAR Max"step=0.1group="Hýzlý Ayna (Kalýn)")

    y_start input.float(0.01"Yavaþ SAR Baþlangýç"step=0.005group="Yavaþ Ayna (Ýnce)")
    y_inc   input.float(0.01"Yavaþ SAR Ývme"step=0.005group="Yavaþ Ayna (Ýnce)")
    y_max   input.float(0.10"Yavaþ SAR Max"step=0.1group="Yavaþ Ayna (Ýnce)")

    // ─────────────────────────────────────────────────────────────────
    //  2. GELÝÞMÝÞ LONESOME SAR MOTORU
    // ─────────────────────────────────────────────────────────────────
    f_ozel_sar(src_hsrc_l_start_inc_max_reset_hiz) =>
        var 
    int trend 0
        
    var float sar_val 0.0
        
    var float ep 0.0
        
    var float af 0.0

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

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

    // ─────────────────────────────────────────────────────────────────
    //  3. ÇIPLAK AYNA HESAPLAMASI
    // ─────────────────────────────────────────────────────────────────
    yeni_gun ta.change(time("D")) != 0

    // Hýzlý Ayna
    [sar_hizlitrend_hizli] = f_ozel_sar(highlowh_starth_inch_maxyeni_gun)
    ayna_hizli trend_hizli close math.abs(close sar_hizli) : close math.abs(close sar_hizli)

    // Yavaþ Ayna
    [sar_yavastrend_yavas] = f_ozel_sar(highlowy_starty_incy_maxyeni_gun)
    ayna_yavas trend_yavas close math.abs(close sar_yavas) : close math.abs(close sar_yavas)

    // ─────────────────────────────────────────────────────────────────
    //  4. RENK VE ÇÝZÝMLER
    // ─────────────────────────────────────────────────────────────────
    bool hizli_yesil ayna_hizli close
    bool yavas_yesil 
    ayna_yavas close

    color col_hizli 
    hizli_yesil color.lime color.red
    color col_yavas 
    yavas_yesil color.lime color.red

    plot
    (ayna_hizlititle="Trend"color=col_hizlistyle=plot.style_linelinewidth=1)
    //plot(ayna_yavas, title="Yavaþ Ayna", color=col_yavas, style=plot.style_line, linewidth=1) 
    16.07.2024 - 10.12.2024

  3. biraz sadeleme çalýþmasý...
    PHP Code:
    //@version=6
    indicator(":)"overlay=truemax_labels_count=500)

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

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

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

    method f_updateState
    (SARState statefloat high_valfloat low_valfloat close_valfloat accel_startfloat accel_incfloat accel_maxfloat decay_limitfloat atr_val) =>
        
    bool isInitialTrend false
        bool trend_changed 
    false

        
    if na(state.sar_value)
            if 
    close_val close_val[1]
                
    state.isLong        := true
                state
    .extreme_point := high_val
                state
    .sar_value     := low_val[1]
            else
                
    state.isLong        := false
                state
    .extreme_point := low_val
                state
    .sar_value     := high_val[1]
            
    isInitialTrend          := true
            state
    .accel_factor      := accel_start
            state
    .trend_age         := 0
        
    else
            
    state.trend_age += 1
            
        state
    .sar_value += state.accel_factor * (state.extreme_point state.sar_value)
        
        if 
    state.isLong
            
    if state.sar_value low_val
                isInitialTrend      
    := true
                trend_changed       
    := true
                state
    .isLong        := false
                state
    .sar_value     := math.max(high_valstate.extreme_point)
                
    state.extreme_point := low_val
                state
    .accel_factor  := accel_start
                state
    .trend_age     := 
        
    else
            if 
    state.sar_value high_val
                isInitialTrend      
    := true
                trend_changed       
    := true
                state
    .isLong        := true
                state
    .sar_value     := math.min(low_valstate.extreme_point)
                
    state.extreme_point := high_val
                state
    .accel_factor  := accel_start
                state
    .trend_age     := 
                
        
    if trend_changed
            state
    .bounce_count := 
            state
    .was_touching := false
        
    else
            
    float tol atr_val 0.2 
            bool is_touch 
    state.isLong ? (low_val <= state.sar_value tol) : (high_val >= state.sar_value tol)
            if 
    is_touch and not state.was_touching
                state
    .bounce_count += 
            state
    .was_touching := is_touch

        float decay_factor 
    math.max(0.011.0 - (state.trend_age decay_limit))
        
    float yasli_inc    accel_inc decay_factor

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

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

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

    float gercek_oynaklik ta.atr(14)

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

    var 
    int king_idx 
    int new_king 
    = -1

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

    if 
    new_king != -1
        king_idx 
    := new_king 

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

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

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

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

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

    cc ta.sar(0.00.010.3

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


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

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

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

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

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

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

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

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

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

    // ─────────────────────────────────────────────────────────────────
    //  7. ÝSTATÝSTÝKSEL VOLATÝLÝTE (%68)
    // ─────────────────────────────────────────────────────────────────
    logReturn math.log(close close[1])
    rawVol    ta.stdev(logReturnvolLength)
    annualVol rawVol math.sqrt(barsPerYear)

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

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

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

        
    float tip1up conePrice(closeannualVolprojBars1.0,  1)
        
    float tip1dn conePrice(closeannualVolprojBars1.0, -1)
        
    int tipX bar_index projBars 

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

    ////
    // ÝMZA
    var table ytd_table table.new(position.bottom_center11)
    if 
    barstate.islast
        table
    .cell(ytd_table00"(AÝ, (Gemini Pro) ile tasarlanmýþ OTONOM grafik, Eðitim çalýþmasýdýr.) Yatýrým tavsiyesi olarak KULLANILAMAZ."text_color=color.new(color.white00), text_size=size.normal)
    ///////////////// 
    16.07.2024 - 10.12.2024

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

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

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

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

    method f_updateState
    (SARState statefloat high_valfloat low_valfloat close_valfloat accel_startfloat accel_incfloat accel_maxfloat decay_limitfloat atr_val) =>
        
    bool isInitialTrend false
        bool trend_changed 
    false

        
    if na(state.sar_value)
            if 
    close_val close_val[1]
                
    state.isLong        := true
                state
    .extreme_point := high_val
                state
    .sar_value     := low_val[1]
            else
                
    state.isLong        := false
                state
    .extreme_point := low_val
                state
    .sar_value     := high_val[1]
            
    isInitialTrend          := true
            state
    .accel_factor      := accel_start
            state
    .trend_age         := 0
        
    else
            
    state.trend_age += 1
            
        state
    .sar_value += state.accel_factor * (state.extreme_point state.sar_value)
        
        if 
    state.isLong
            
    if state.sar_value low_val
                isInitialTrend      
    := true
                trend_changed       
    := true
                state
    .isLong        := false
                state
    .sar_value     := math.max(high_valstate.extreme_point)
                
    state.extreme_point := low_val
                state
    .accel_factor  := accel_start
                state
    .trend_age     := 
        
    else
            if 
    state.sar_value high_val
                isInitialTrend      
    := true
                trend_changed       
    := true
                state
    .isLong        := true
                state
    .sar_value     := math.min(low_valstate.extreme_point)
                
    state.extreme_point := high_val
                state
    .accel_factor  := accel_start
                state
    .trend_age     := 
                
        
    if trend_changed
            state
    .bounce_count := 
            state
    .was_touching := false
        
    else
            
    float tol atr_val 0.2 
            bool is_touch 
    state.isLong ? (low_val <= state.sar_value tol) : (high_val >= state.sar_value tol)
            if 
    is_touch and not state.was_touching
                state
    .bounce_count += 
            state
    .was_touching := is_touch

        float decay_factor 
    math.max(0.011.0 - (state.trend_age decay_limit))
        
    float yasli_inc    accel_inc decay_factor

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

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

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

    float gercek_oynaklik ta.atr(14)

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

    var 
    int king_idx 
    int new_king 
    = -1

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

    if 
    new_king != -1
        king_idx 
    := new_king 

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

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

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

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

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

    cc ta.sar(0.00.010.3

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


    p_sup plot(channel_supporttitle="Destek (Long Stop)"color=color.new(color.green20), style=plot.style_linebrlinewidth=1)
    p_res plot(channel_resist,  title="Direnç (Short Stop)"color=color.new(color.red20), style=plot.style_linebrlinewidth=1)

    // ─────────────────────────────────────────────────────────────────
    //  7. ÝSTATÝSTÝKSEL VOLATÝLÝTE (%68)
    // ─────────────────────────────────────────────────────────────────
    logReturn math.log(close close[1])
    rawVol    ta.stdev(logReturnvolLength)
    annualVol rawVol math.sqrt(barsPerYear)

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

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

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

        
    float tip1up conePrice(closeannualVolprojBars1.0,  1)
        
    float tip1dn conePrice(closeannualVolprojBars1.0, -1)
        
    int tipX bar_index projBars 

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

    //// 
    16.07.2024 - 10.12.2024

  5. PHP Code:
    // © Kinetik Komuta Merkezi [V12.1 - Ultimate Sentez & Makro Duvarlar (Fiyat Etiketi Düzeltildi)]
    //@version=6
    indicator("Kinetik Komuta Merkezi [V12.1]"overlay truemax_lines_count 500)

    // ─────────────────────────────────────────────────────────────────
    // 0. GÝRDÝLER VE RENK PALETÝ
    // ─────────────────────────────────────────────────────────────────
    group_motor "Çift Motor & Bulut"
    int len_fast input.int(20"Hýzlý Motor (Zemin 1)"group=group_motor)
    int len_slow input.int(50"Yavaþ Motor (Zemin 2)"group=group_motor)

    group_kin "Kinetik Renkler"
    col_up1 input.color(#00e676, "Boða Ana", group=group_kin)
    col_dn1 input.color(#ff1744, "Ayý Ana", group=group_kin)
    col_flatinput.color(#787b86, "Flat (Bulut Ýçi)", group=group_kin)

    color col_cloud_up color.new(#00e676, 85)
    color col_cloud_dn color.new(#ff1744, 85)

    group_stat "1σ Ýstatistiksel Hedef"
    int volLength input.int(20"Volatilite Periyodu"group=group_stat)
    int projBars  input.int(15"Ýleriye Dönük Mum (T)"group=group_stat)
    int barsPerYear input.int(525600"Yýllýk Mum (1dk=525600)"group=group_stat)

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

    // ─────────────────────────────────────────────────────────────────
    // 1. MOTOR: ÇÝFT ZEMÝN (KÝNETÝK BULUT VE MUM RENGÝ)
    // ─────────────────────────────────────────────────────────────────
    float mid_fast ta.hma(ta.median(hl2len_fast 2), 10)
    float mid_slow ta.hma(ta.median(hl2len_slow 2), 10)

    bool is_bull_trend mid_fast mid_slow
    bool is_bear_trend 
    mid_fast mid_slow

    p_fast 
    plot(mid_fastcolor=color.whitelinewidth=1title="Hýzlý Zemin"display=display.pane)
    p_slow plot(mid_slowcolor=color.new(color.white50), linewidth=1title="Yavaþ Zemin"display=display.pane)
    fill(p_fastp_slowis_bull_trend col_cloud_up col_cloud_dntitle="Kinetik Bulut")

    float cloud_top math.max(mid_fastmid_slow)
    float cloud_bot math.min(mid_fastmid_slow)
    color bar_col close cloud_top col_up1 close cloud_bot col_dn1 col_flat
    barcolor
    (bar_col)

    // ─────────────────────────────────────────────────────────────────
    // 2. MOTOR: 3'LÜ SAR (TAKTÝKSEL 1-2-3 HEDEFLERÝ)
    // ─────────────────────────────────────────────────────────────────
    float sar_a ta.sar(0.020.020.2)
    float sar_b ta.sar(0.010.010.1)
    float sar_c ta.sar(0.0050.0050.05)

    float t_up1 ta.hma(close math.abs(close sar_a), 10)
    float t_up2 ta.hma(close math.abs(close sar_b), 10)
    float t_up3 ta.hma(close math.abs(close sar_c), 10)

    float t_dn1 ta.hma(close math.abs(close sar_a), 10)
    float t_dn2 ta.hma(close math.abs(close sar_b), 10)
    float t_dn3 ta.hma(close math.abs(close sar_c), 10)

    bool hit_u3 ta.crossover(hight_up3) and is_bull_trend
    bool hit_u2 
    ta.crossover(hight_up2) and is_bull_trend and not hit_u3
    bool hit_u1 
    ta.crossover(hight_up1) and is_bull_trend and not hit_u2 and not hit_u3

    bool hit_d3 
    ta.crossunder(lowt_dn3) and is_bear_trend
    bool hit_d2 
    ta.crossunder(lowt_dn2) and is_bear_trend and not hit_d3
    bool hit_d1 
    ta.crossunder(lowt_dn1) and is_bear_trend and not hit_d2 and not hit_d3

    plot
    (hit_u1 t_up1 nastyle=plot.style_circleslinewidth=2color=col_up1display=display.pane)
    plot(hit_u2 t_up2 nastyle=plot.style_circleslinewidth=3color=col_up1display=display.pane)
    plot(hit_u3 t_up3 nastyle=plot.style_circleslinewidth=4color=col_up1display=display.pane)

    plot(hit_d1 t_dn1 nastyle=plot.style_circleslinewidth=2color=col_dn1display=display.pane)
    plot(hit_d2 t_dn2 nastyle=plot.style_circleslinewidth=3color=col_dn1display=display.pane)
    plot(hit_d3 t_dn3 nastyle=plot.style_circleslinewidth=4color=col_dn1display=display.pane)

    plotchar(hit_u1char="1"location=location.abovebarcolor=col_up1size=size.tinydisplay=display.pane)
    plotchar(hit_u2char="2"location=location.abovebarcolor=col_up1size=size.tinydisplay=display.pane)
    plotchar(hit_u3char="3"location=location.abovebarcolor=col_up1size=size.tinydisplay=display.pane)

    plotchar(hit_d1char="1"location=location.belowbarcolor=col_dn1size=size.tinydisplay=display.pane)
    plotchar(hit_d2char="2"location=location.belowbarcolor=col_dn1size=size.tinydisplay=display.pane)
    plotchar(hit_d3char="3"location=location.belowbarcolor=col_dn1size=size.tinydisplay=display.pane)

    var 
    line bull_seal na
    var line bear_seal na

    if hit_u3
        
    if not na(bull_seal)
            
    line.delete(bull_seal)
        
    bull_seal := line.new(bar_indexhighbar_index 1highcolor=col_up1width=2style=line.style_dashedextend=extend.right)

    if 
    hit_d3
        
    if not na(bear_seal)
            
    line.delete(bear_seal)
        
    bear_seal := line.new(bar_indexlowbar_index 1lowcolor=col_dn1width=2style=line.style_dashedextend=extend.right)

    // ─────────────────────────────────────────────────────────────────
    // 3. MOTOR: 5'LÝ SAR ÇAKIÞMASI (ELMAS TETÝK)
    // ─────────────────────────────────────────────────────────────────
    roSarSlow     ta.sar(0.00.0010.02)
    roSarModerate ta.sar(0.00.0020.02)
    roSarFast     ta.sar(0.00.0030.02)
    roSarFast2    ta.sar(0.00.00010.02)
    roSarFast23   ta.sar(0.0010.000010.02)

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

    c1 isEq3(roSarSlowroSarModerateroSarFast)
    c2 isEq3(roSarSlowroSarModerateroSarFast2)
    c3 isEq3(roSarSlowroSarModerateroSarFast23)
    c4 isEq3(roSarSlowroSarFastroSarFast2)
    c5 isEq3(roSarSlowroSarFastroSarFast23)
    c6 isEq3(roSarSlowroSarFast2roSarFast23)
    c7 isEq3(roSarModerateroSarFastroSarFast2)
    c8 isEq3(roSarModerateroSarFastroSarFast23)
    c9 isEq3(roSarModerateroSarFast2roSarFast23)
    c10 isEq3(roSarFastroSarFast2roSarFast23)

    any3 c1 or c2 or c3 or c4 or c5 or c6 or c7 or c8 or c9 or c10

    float matchVal 
    na
    if c1 or c2 or c3 or c4 or c5 or c6
        matchVal 
    := roSarSlow
    else if c7 or c8 or c9
        matchVal 
    := roSarModerate
    else if c10
        matchVal 
    := roSarFast

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

    plotshape(trigger matchVal na"3'lü SAR Elmasý"shape.diamondlocation.absolutecolor=diamondColorsize=size.smalldisplay=display.pane)

    // ─────────────────────────────────────────────────────────────────
    // 4. MOTOR: ÝSTATÝSTÝKSEL VOLATÝLÝTE (KUTUP YILDIZI VE FÝYAT)
    // ─────────────────────────────────────────────────────────────────
    logReturn math.log(close nz(close[1], close))
    rawVol    ta.stdev(logReturnvolLength)
    annualVol rawVol math.sqrt(barsPerYear)

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

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

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

        
    float tip1up conePrice(closeannualVolprojBars1.0,  1)
        
    float tip1dn conePrice(closeannualVolprojBars1.0, -1)
        
    int tipX bar_index projBars 

        
    // HATA DÜZELTÝLDÝ: \n + str.tostring ile fiyat tekrar etiketin içine eklendi.
        
    if is_bull_trend
            sigmaLabels
    .push(label.new(tipXtip1up"1σ Hedef\n" str.tostring(tip1upformat.mintick), color=color.new(col_up180), textcolor=col_up1style=label.style_label_leftsize=size.small))
            
    sigmaLines.push(line.new(bar_indexclosetipXtip1upcolor=color.new(col_up150), style=line.style_dotted))
        else if 
    is_bear_trend
            sigmaLabels
    .push(label.new(tipXtip1dn"1σ Hedef\n" str.tostring(tip1dnformat.mintick), color=color.new(col_dn180), textcolor=col_dn1style=label.style_label_leftsize=size.small))
            
    sigmaLines.push(line.new(bar_indexclosetipXtip1dncolor=color.new(col_dn150), style=line.style_dotted))

    // ─────────────────────────────────────────────────────────────────
    // 5. MOTOR: YÝN-YANG AYNASI VE MAKRO DUVARLAR (YAPISAL KIRILIM)
    // ─────────────────────────────────────────────────────────────────
    f_ozel_sar(src_hsrc_l_start_inc_max_reset_hiz) =>
        var 
    int trend 0
        
    var float sar_val 0.0
        
    var float ep 0.0
        
    var float af 0.0
        
    if trend == and not na(src_h[1])
            
    trend   := src_h >= src_h[1] or src_l >= src_l[1] ? : -1
            sar_val 
    := trend src_l[1] : src_h[1]
            
    ep      := trend src_h[1] : src_l[1]
            
    af      := _start
        
    else 
            if 
    _reset_hiz
                af 
    := _start
            float nextsar 
    sar_val
            
    if trend 0
                
    if src_h[1] > ep
                    ep 
    := src_h[1]
                    
    af := math.min(_maxaf _inc)
                
    nextsar := sar_val af * (ep sar_val)
                
    nextsar := math.min(math.min(src_l[1], src_l[2]), nextsar)
                if 
    nextsar src_l
                    trend   
    := -1
                    nextsar 
    := ep
                    ep      
    := src_l
                    af      
    := _start
            
    else 
                if 
    src_l[1] < ep
                    ep 
    := src_l[1]
                    
    af := math.min(_maxaf _inc)
                
    nextsar := sar_val af * (ep sar_val)
                
    nextsar := math.max(math.max(src_h[1], src_h[2]), nextsar)
                if 
    nextsar src_h
                    trend   
    := 1
                    nextsar 
    := ep
                    ep      
    := src_h
                    af      
    := _start
            sar_val 
    := nextsar
        
    [sar_valtrend]

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

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

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

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

    if 
    not na(ph_ayna)
        
    line w_up line.new(bar_index[pivot_len], ph_aynabar_indexph_aynacolor=col_up1width=2style=line.style_solidextend=extend.right)
        array.
    push(macro_up_wallsw_up)
        if array.
    size(macro_up_walls) > 2
            line
    .delete(array.shift(macro_up_walls))

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

    plot(ayna_hizli"Ayna Ýzi"color=color.new(color.gray50), linewidth=1display=display.pane)

    ///////////////
    // (AÝ) Ýmza
    var table ytd_table table.new(position.bottom_center11)
    if 
    barstate.islast
        table
    .cell(ytd_table00"(AÝ) Eðitim çalýþmasýdýr. Yatýrým tavsiyesi KULLANILAMAZ."text_color=color.new(color.white0), text_size=size.normal
    16.07.2024 - 10.12.2024

  6. PHP Code:
    // © Kinetik Komuta Merkezi [V12.1 - Ultimate Sentez & Makro Duvarlar (Fiyat Etiketi Düzeltildi)]
    //@version=6
    indicator("Kinetik Komuta Merkezi [V12.1]"overlay truemax_lines_count 500)

    // ─────────────────────────────────────────────────────────────────
    // 0. GÝRDÝLER VE RENK PALETÝ
    // ─────────────────────────────────────────────────────────────────
    group_motor "Çift Motor & Bulut"
    int len_fast input.int(3"Hýzlý Motor (Zemin 1)"group=group_motor)
    int len_slow input.int(8"Yavaþ Motor (Zemin 2)"group=group_motor)

    group_kin "Kinetik Renkler"
    col_up1 input.color(#00e676, "Boða Ana", group=group_kin)
    col_dn1 input.color(#ff1744, "Ayý Ana", group=group_kin)
    col_flatinput.color(#787b86, "Flat (Bulut Ýçi)", group=group_kin)

    color col_cloud_up color.new(#00e676, 85)
    color col_cloud_dn color.new(#ff1744, 85)


    // ─────────────────────────────────────────────────────────────────
    // 1. MOTOR: ÇÝFT ZEMÝN (KÝNETÝK BULUT VE MUM RENGÝ)
    // ─────────────────────────────────────────────────────────────────
    float mid_fast ta.hma(ta.median(hl2len_fast 2), 10)
    float mid_slow ta.hma(ta.median(hl2len_slow 2), 10)

    bool is_bull_trend mid_fast mid_slow
    bool is_bear_trend 
    mid_fast mid_slow

    //p_fast = plot(mid_fast, color=color.white, linewidth=1, title="Hýzlý Zemin", display=display.pane)
    //p_slow = plot(mid_slow, color=color.new(color.white, 50), linewidth=1, title="Yavaþ Zemin", display=display.pane)
    //fill(p_fast, p_slow, is_bull_trend ? col_cloud_up : col_cloud_dn, title="Kinetik Bulut")

    float cloud_top math.max(mid_fastmid_slow)
    float cloud_bot math.min(mid_fastmid_slow)
    color bar_col close cloud_top col_up1 close cloud_bot col_dn1 col_flat
    barcolor
    (bar_col)

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

    // ─────────────────────────────────────────────────────────────────
    // 3. MOTOR: 5'LÝ SAR ÇAKIÞMASI (ELMAS TETÝK)
    // ─────────────────────────────────────────────────────────────────
    roSarSlow     ta.sar(0.00.0010.02)
    roSarModerate ta.sar(0.00.0020.02)
    roSarFast     ta.sar(0.00.0030.02)
    roSarFast2    ta.sar(0.00.00010.02)
    roSarFast23   ta.sar(0.0010.000010.02)

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

    c1 isEq3(roSarSlowroSarModerateroSarFast)
    c2 isEq3(roSarSlowroSarModerateroSarFast2)
    c3 isEq3(roSarSlowroSarModerateroSarFast23)
    c4 isEq3(roSarSlowroSarFastroSarFast2)
    c5 isEq3(roSarSlowroSarFastroSarFast23)
    c6 isEq3(roSarSlowroSarFast2roSarFast23)
    c7 isEq3(roSarModerateroSarFastroSarFast2)
    c8 isEq3(roSarModerateroSarFastroSarFast23)
    c9 isEq3(roSarModerateroSarFast2roSarFast23)
    c10 isEq3(roSarFastroSarFast2roSarFast23)

    any3 c1 or c2 or c3 or c4 or c5 or c6 or c7 or c8 or c9 or c10

    float matchVal 
    na
    if c1 or c2 or c3 or c4 or c5 or c6
        matchVal 
    := roSarSlow
    else if c7 or c8 or c9
        matchVal 
    := roSarModerate
    else if c10
        matchVal 
    := roSarFast

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

    plotshape(trigger matchVal na"3'lü SAR Elmasý"shape.diamondlocation.absolutecolor=diamondColorsize=size.smalldisplay=display.pane)

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

  7. PHP Code:
    // © Kinetik Komuta Merkezi [V12.1 - Ultimate Sentez & Makro Duvarlar (Fiyat Etiketi Düzeltildi)]
    //@version=6
    indicator("Kinetik Komuta Merkezi [V12.1]"overlay truemax_lines_count 500)

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

    // ─────────────────────────────────────────────────────────────────
    // 3. MOTOR: 5'LÝ SAR ÇAKIÞMASI (ELMAS TETÝK)
    // ─────────────────────────────────────────────────────────────────
    roSarSlow78    ta.sar(0.00.010.02)
    roSarModerate ta.sar(0.00.020.02)
    roSarFast     ta.sar(0.00.030.02)
    roSarFast2    ta.sar(0.00.00010.02)
    roSarFast23   ta.sar(0.0010.000010.02)

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

    c1 isEq3(roSarSlow78roSarModerateroSarFast)
    c2 isEq3(roSarSlow78roSarModerateroSarFast2)
    c3 isEq3(roSarSlow78roSarModerateroSarFast23)
    c4 isEq3(roSarSlow78roSarFastroSarFast2)
    c5 isEq3(roSarSlow78roSarFastroSarFast23)
    c6 isEq3(roSarSlow78roSarFast2roSarFast23)
    c7 isEq3(roSarModerateroSarFastroSarFast2)
    c8 isEq3(roSarModerateroSarFastroSarFast23)
    c9 isEq3(roSarModerateroSarFast2roSarFast23)
    c10 isEq3(roSarFastroSarFast2roSarFast23)

    any3 c1 or c2 or c3 or c4 or c5 or c6 or c7 or c8 or c9 or c10

    float matchVal 
    na
    if c1 or c2 or c3 or c4 or c5 or c6
        matchVal 
    := roSarSlow78
    else if c7 or c8 or c9
        matchVal 
    := roSarModerate
    else if c10
        matchVal 
    := roSarFast

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

    plotshape(trigger matchVal na"3'lü SAR Elmasý"shape.diamondlocation.absolutecolor=diamondColorsize=size.smalldisplay=display.pane)

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

  8. PHP Code:
    //@version=6
    indicator("Yörük [3'lü ICS Bulutu: 13-21-34]"shorttitle="."overlay=truemax_lines_count=20max_bars_back=500)

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

    // ─────────────────────────────────────────────────────────────────
    // 1. 5'LÝ SAR MOTORU
    // ─────────────────────────────────────────────────────────────────
    roSarSlow     ta.sar(0.010.0010.02)
    roSarModerate ta.sar(0.010.0020.02)
    roSarFast     ta.sar(0.010.0030.02)
    roSarFast2    ta.sar(0.010.000010.02)
    roSarFast23   ta.sar(0.0010.000010.02)

    // SAR Seviyeleri
    plot(roSarSlow,     "3"color=color.new(color.blue0),    linewidth=1style=plot.style_cross)
    plot(roSarModerate"2",  color=color.new(color.green0),   linewidth=1style=plot.style_cross)
    plot(roSarFast,     "1"color=color.new(color.red0),     linewidth=1style=plot.style_cross)
    plot(roSarFast2,    "Trend"color=color.new(color.yellow0),  linewidth=1style=plot.style_cross)
    plot(roSarFast23,   "@yörük@"color=color.new(color.fuchsia0), linewidth=1style=plot.style_cross)

    // ─────────────────────────────────────────────────────────────────
    // 2. MATEMATÝKSEL ÇAKIÞMA KONTROLÜ (5'in 3'lü Kombinasyonlarý)
    // ─────────────────────────────────────────────────────────────────
    // Float (Küsürat) hassasiyeti için 1 tik yanýlma payý
    isEq(v1v2) => math.abs(v1 v2) <= syminfo.mintick

    // 3 Deðerin de birbirine eþit olma durumu
    isEq3(v1v2v3) => isEq(v1v2) and isEq(v1v3)

    s1 roSarSlow
    s2 
    roSarModerate
    s3 
    roSarFast
    s4 
    roSarFast2
    s5 
    roSarFast23

    // 10 Olasý 3'lü Çakýþma Senaryosu (Kombinasyon C(5,3) = 10)
    c1  isEq3(s1s2s3)
    c2  isEq3(s1s2s4)
    c3  isEq3(s1s2s5)
    c4  isEq3(s1s3s4)
    c5  isEq3(s1s3s5)
    c6  isEq3(s1s4s5)
    c7  isEq3(s2s3s4)
    c8  isEq3(s2s3s5)
    c9  isEq3(s2s4s5)
    c10 isEq3(s3s4s5)

    // Herhangi bir 3'lü çakýþma var mý?
    any3 c1 or c2 or c3 or c4 or c5 or c6 or c7 or c8 or c9 or c10

    // Çakýþan deðeri bul (Elmasý ekranda tam olarak o fiyata basabilmek için)
    float matchVal na
    if c1 or c2 or c3 or c4 or c5 or c6
        matchVal 
    := s1
    else if c7 or c8 or c9
        matchVal 
    := s2
    else if c10
        matchVal 
    := s3

    // Sinyali, çakýþmanýn gerçekleþtiði ve yeni baþladýðý barda tetikle
    trigger any3 and not any3[1]

    // ─────────────────────────────────────────────────────────────────
    // 3. GÖRSELLEÞTÝRME VE ALARM
    // ─────────────────────────────────────────────────────────────────
    // Çakýþma anýnda fiyat çakýþma noktasýnýn üstündeyse Destek (Yeþil), altýndaysa Direnç (Kýrmýzý)
    isSupport close matchVal
    diamondColor 
    isSupport color.rgb(761757950) : color.rgb(255828250)

    // Sinyal (Elmas)
    plotshape(trigger matchVal na"3'lü Çakýþma Sinyali"shape.diamondlocation.absolutecolor=diamondColorsize=size.small)

    // Alarmlar
    alertcondition(trigger and isSupport"Çakýþma: Destek""5 SAR'dan 3'ü çakýþtý. Fiyat üstte, YEÞÝL (Destek) elmas oluþtu.")
    alertcondition(trigger and not isSupport"Çakýþma: Direnç""5 SAR'dan 3'ü çakýþtý. Fiyat altta, KIRMIZI (Direnç) elmas oluþtu.")
    ////////////// 
    16.07.2024 - 10.12.2024

Sayfa 410/418 ÝlkÝlk ... 310360400408409410411412 ... 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
  •