Sayfa 28/36 İlkİlk ... 182627282930 ... SonSon
Arama sonucu : 284 madde; 217 - 224 arası.

Konu: BINHO 1000 Yatırımlar Holding

  1. Teknik olarak; yarına gebe olan bugünü yaşamalı ki, yarın, yaşanmış olsun.

  2. Teknik olarak; yarına gebe olan bugünü yaşamalı ki, yarın, yaşanmış olsun.

  3. Teknik olarak; yarına gebe olan bugünü yaşamalı ki, yarın, yaşanmış olsun.

  4. Teknik olarak; yarına gebe olan bugünü yaşamalı ki, yarın, yaşanmış olsun.

  5. Teknik olarak; yarına gebe olan bugünü yaşamalı ki, yarın, yaşanmış olsun.

  6.  Alıntı Originally Posted by @yörük@ Yazıyı Oku
    Allah, senden razı olsun. Sayın, Majesty23....

    İyi dileğinize istinaden....Çam sakızı çoban armağanı.....Küçük bir hediyem olsun size....

    Belki denersiniz....Daha da geliştirirsiniz.....Kombine bir kod birleştirme çalışması....
    https://tr.tradingview.com/scripts/?sort=recent buradan...İlk on sayfa içinden...
    Beğendiklerimden sizin için derlendi....

    PHP Code:
    //@version=5

    const bool DEBUG false
    const int maxBoxesCount 500
    const int showLastXLiqs 500
    const int maxDistanceToLastBar 1000 // Affects Running Time

    indicator("Majesty23",overlay=true,  max_boxes_count maxBoxesCountmax_labels_count maxBoxesCountmax_lines_count maxBoxesCountmax_bars_back 1000)


    pivotLenLiq input.int(20"Pivot Length"group "General Configuration"display display.none)
    WBR input.float(0.5"Wick-Body Ratio"step 0.1group "General Configuration"display display.none)

    sellsideColor input(#08998180, 'Bullish', inline = 'bsColor', group = 'General Configuration', display = display.none)
    buysideColor input(#f2364680, 'Bearish', inline = 'bsColor', group = 'General Configuration', display = display.none)
    showInvalidated DEBUG input.bool(true"Show Historic Zones"group "General Configuration"display display.none) : true

    bubbleSize 
    DEBUG input.int(5"[DBG] Base Bubble Size"group "Style"display display.none) : 5
    minDist 
    DEBUG input.int(0"[DBG] Min Distance"group "Style"display display.none) : 0
    grabsPerZone 
    DEBUG input.int(1"[DBG] Max Grabs Per Zone"group "Style"display display.none) : 1
    minATRBetweenPivots 
    DEBUG input.float(1"[DBG] Min ATR Between Pivots"group "Style"display display.none) : 1
    bubbleOffset 
    DEBUG input.float(20"[DBG] Bubble Offset"group "Style"display display.none) : 20
    textColor 
    DEBUG input.color(#ffffff80, "[DBG] Text Color", group = "Style", inline = "BBcolors") : #ffffff80
    renderLiquidityZones DEBUG input.bool(false"[DBG] Render Liquidity Zones"group "Style") : false

    type liqInfo
        int startTime
        int endTime
        float price
        string liqType
        int grabsFound 
    0

    type liq
        liqInfo info
        bool isRendered 
    false
        line liqZone

    type bubble
        int barIndex
        float price
        float bodySize
        float wickSize
        string liqType

    safeDeleteLiq 
    (liq liqF) =>
        
    liqF.isRendered := false
        line
    .delete(liqF.liqZone)

    var 
    liq[] allLiqList = array.new<liq>(0)

    highestTALiq ta.pivothigh(pivotLenLiqpivotLenLiq)
    lowestTALiq ta.pivotlow(pivotLenLiqpivotLenLiq)
    curATR ta.atr(5)

    renderLiq (liq liqF) =>
        if 
    renderLiquidityZones
            liqF
    .isRendered := true
            liqF
    .liqZone := line.new(liqF.info.startTimeliqF.info.pricenz(liqF.info.endTimetime 1), liqF.info.pricexloc xloc.bar_timecolor liqF.info.liqType == "Buyside" buysideColor sellsideColor)

    handleLiqsFinal () =>
        if 
    DEBUG
            log
    .info("Liqudities Count " str.tostring(allLiqList.size()))

        if 
    allLiqList.size() > 0
            
    for 0 to allLiqList.size() - 1
                curLiq 
    allLiqList.get(i)
                
    safeDeleteLiq(curLiq)
                if 
    not curLiq.isRendered and not (not showInvalidated and not na(curLiq.info.endTime))
                    
    renderLiq(curLiq)

    if 
    bar_index last_bar_index maxDistanceToLastBar
        
    if allLiqList.size() > 0
            
    for 0 to allLiqList.size() - 1
                curLiq 
    allLiqList.get(i)
                if 
    na(curLiq.info.endTime) and (curLiq.info.liqType == "Buyside" close curLiq.info.price close curLiq.info.price)
                    
    curLiq.info.endTime := time
        
        
    if not na(highestTALiq)
            
    newLiqInfo liqInfo.new(time[pivotLenLiq], nahighestTALiq"Buyside")
            
    addLiq true
            
    if allLiqList.size() > 0
                
    for 0 to allLiqList.size() - 1
                    liqInfo curInfo 
    allLiqList.get(i).info
                    
    if na(curInfo.endTime) and curInfo.liqType == "Buyside"
                        
    if math.abs(highestTALiq curInfo.price) < curATR minATRBetweenPivots
                            addLiq 
    := false
                            
    break
            if 
    addLiq
                allLiqList
    .unshift(liq.new(newLiqInfo))
                if 
    allLiqList.size () > showLastXLiqs
                    safeDeleteLiq
    (allLiqList.pop())
        
        if 
    not na(lowestTALiq)
            
    newLiqInfo liqInfo.new(time[pivotLenLiq], nalowestTALiq"Sellside")
            
    addLiq true
            
    if allLiqList.size() > 0
                
    for 0 to allLiqList.size() - 1
                    liqInfo curInfo 
    allLiqList.get(i).info
                    
    if na(curInfo.endTime) and curInfo.liqType == "Sellside"
                        
    if math.abs(lowestTALiq curInfo.price) < curATR minATRBetweenPivots
                            addLiq 
    := false
                            
    break
            if 
    addLiq
                allLiqList
    .unshift(liq.new(newLiqInfo))
                if 
    allLiqList.size () > showLastXLiqs
                    safeDeleteLiq
    (allLiqList.pop())

    var 
    lastHigh 0
    var lastLow 0

    renderHighCircle5 
    false
    renderHighCircle10 
    false
    renderHighCircle15 
    false
    float highCirclePrice 
    na

    renderLowCircle5 
    false
    renderLowCircle10 
    false
    renderLowCircle15 
    false
    float lowCirclePrice 
    na



    if allLiqList.size() > 0
        
    for 0 to allLiqList.size() - 1
            curLiq 
    allLiqList.get(i)
            if 
    not na(curLiq.info.endTime)
                continue
            if 
    curLiq.info.grabsFound == grabsPerZone
                
    continue
                
            
    bodySize math.abs(close open)
            
    wickSize curLiq.info.liqType == "Buyside" ? (high math.max(closeopen)) : (math.min(closeopen) - low)

            
    curWBR wickSize bodySize
            
    if curLiq.info.liqType == "Buyside"
                
    if high >= curLiq.info.price and (bar_index lastHigh minDist)
                    
    lastHigh := bar_index
                    
    if curWBR >= WBR 3
                        renderHighCircle15 
    := true
                    
    else if curWBR >= WBR 2
                        renderHighCircle10 
    := true
                    
    else if curWBR >= WBR
                        renderHighCircle5 
    := true
                    highCirclePrice 
    := high curATR bubbleOffset 100.0
                    curLiq
    .info.grabsFound += 1
            
    else
                if 
    low <= curLiq.info.price and (bar_index lastLow minDist)
                    
    lastLow := bar_index
                    
    if curWBR >= WBR 3
                        renderLowCircle15 
    := true
                    
    else if curWBR >= WBR 2
                        renderLowCircle10 
    := true
                    
    else if curWBR >= WBR
                        renderLowCircle5 
    := true
                    lowCirclePrice 
    := low curATR bubbleOffset 100.0
                    curLiq
    .info.grabsFound += 1

    plot
    (renderHighCircle5 and barstate.isconfirmed highCirclePrice na""buysideColorbubbleSizeplot.style_circlesfalse0)
    plot(renderHighCircle10 and barstate.isconfirmed highCirclePrice na""buysideColorint(bubbleSize 1.5), plot.style_circlesfalse0)
    plot(renderHighCircle15 and barstate.isconfirmed highCirclePrice na""buysideColorbubbleSize 2plot.style_circlesfalse0)

    plot(renderLowCircle5 and barstate.isconfirmed lowCirclePrice na""sellsideColorbubbleSizeplot.style_circlesfalse0)
    plot(renderLowCircle10 and barstate.isconfirmed lowCirclePrice na""sellsideColorint(bubbleSize 1.5), plot.style_circlesfalse0)
    plot(renderLowCircle15 and barstate.isconfirmed lowCirclePrice na""sellsideColorbubbleSize 2plot.style_circlesfalse0)

    alertcondition((renderHighCircle5 or renderHighCircle10 or renderHighCircle15) and barstate.isconfirmed"Buyside Liquidity Grab @ {{ticker}}""Buyside Liquidity Grab @ {{ticker}}")
    alertcondition((renderLowCircle5 or renderLowCircle10 or renderLowCircle15) and barstate.isconfirmed"Sellside Liquidity Grab @ {{ticker}}""Sellside Liquidity Grab @ {{ticker}}")

    if 
    barstate.islast
        handleLiqsFinal
    ()


    input.source(close)
    lp math.log(s)
    input.int(20)
    SD1 input.bool(false,"Show 1 SD Bands")
    SD2 input.bool(false,"Show 2 SD Bands")
    SD3 input.bool(true,"Show 3 SD Bands")
    SD4 input.bool(true,"Show 4 SD Bands")

    rollingMean(src,length) =>
        
    mean 0.00
        mean 
    := (nz(mean[1]) * (length-1) + src)/length
    stdev
    (src,length)=>
        
    sd=math.sqrt(rollingMean(src*src,length)-rollingMean(src,length)*rollingMean(src,length))
    bandwidth(sd,length) =>
        
    0.00
        h 
    := 1.06*sd*math.pow(length,-float(1)/5)

    rsd stdev(lp,n)
    rm rollingMean(lp,n)
    bandwidth(rsd,n)
    dev1 b
    upper 
    rm dev1
    lower 
    rm dev1
    dev2 
    b
    upper2 
    rm dev2
    lower2 
    rm dev2
    dev3 
    b
    upper3 
    rm dev3
    lower3 
    rm dev3
    dev4 
    b
    upper4 
    rm dev4
    lower4 
    rm dev4

    plot
    (math.exp(rm),color=color.white)
    plot(SD1?math.exp(upper):na,color=color.rgb(022048,50))
    plot(SD1?math.exp(lower):na,color=color.rgb(2113232,50))
    plot(SD2?math.exp(upper2):na,color=color.rgb(022048,50))
    plot(SD2?math.exp(lower2):na,color=color.rgb(2113232,50))
    plot(SD3?math.exp(upper3):na,color=color.rgb(022048,50))
    plot(SD3?math.exp(lower3):na,color=color.rgb(2113232,50))
    plot(SD4?math.exp(upper4):na,color=color.rgb(022048,50))
    plot(SD4?math.exp(lower4):na,color=color.rgb(2113232,50))


    ///     ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½     ///
    int length            input(20,    group "ï¼³ï½â€¦ï½â€ï½â€ï½â€°ï½ï½â€¡ï½â€œ")
    int offset            input(4,     group "ï¼³ï½â€¦ï½â€ï½â€ï½â€°ï½ï½â€¡ï½â€œ")
    series float src      input(closegroup "ï¼³ï½â€¦ï½â€ï½â€ï½â€°ï½ï½â€¡ï½â€œ")
    bool Use_High_and_Low input(truegroup "ï¼³ï½â€¦ï½â€ï½â€ï½â€°ï½ï½â€¡ï½â€œ")

    // Visual
    bool bar_color        input(true,        group "Vï½â€°ï½â€œï½â€¢ï½ï½Å’")
    color color_up        input(color.bluegroup "Vï½â€°ï½â€œï½â€¢ï½ï½Å’")
    color color_dn        input(color.red,  group "Vï½â€°ï½â€œï½â€¢ï½ï½Å’")

    /// ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ ///
    var series float hlt 0.0
    series float   upper33 
    ta.highest(Use_High_and_Low high srclength)[offset]
    series float   lower33 ta.lowestUse_High_and_Low high srclength)[offset]

    hlt :=  src upper33 
             
    lower33 src lower33 
              
    upper33 nz(hlt)

    ///      ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½         ///
    color color src >= hlt 
                 
    color_up 
                 
    color_dn

    p1 
    plot(hlt
             
    color color,
             
    style plot.style_cross
             
    )
             
    p2 plot(srcdisplay display.none)

    //fill(p1, p2, color = color.new(color, 80))

    // Bar color
    barcolor(bar_color color na)

    src44 input(closetitle='Source')
    X1 input.int(5'Faster Period'minval=1)
    X2 input.int(5'Period'minval=1)
    length44 input.int(2,'Bollinger Bands MA Period'minval=1)
    X4 input.int(20'Slower Period'minval=1)
    mult 2
    mav 
    input.string(title='Moving Average Type'defval='TMA'options=['SMA''EMA''WMA''TMA'])

    //showsupport = input(title="Show MOVING AVERAGE?", defval=false)


    ma(sourcelength44_type) =>
        switch 
    _type
            
    "SMA" => ta.sma(sourcelength44)
            
    "EMA" => ta.ema(sourcelength44)
            
    "WMA" => ta.wma(sourcelength44)
            
    "TMA" => ta.sma(ta.sma(sourcemath.ceil(length44 2)), math.floor(length44 2) + 1)
            



    K1 ta.highest(low,X1)
    K2 ta.lowest(K1,X2)
    BBandTop ma(K2length44mav) + mult ta.stdev(K2length44)
    PTTl ta.lowest(BBandTop,X4)

    E1 ta.lowest(high,X1)
    E2 ta.highest(E1,X2)
    BBandBot ma(E2length44mav) - mult ta.stdev(E2length44)
    PTTh ta.highest(BBandBot,X4)

    plot(PTTh"High"color=color.rgb(19956224100), linewidth=2)
    plot(PTTl"Low"color=color.rgb(33170243100), linewidth=2
    örnek görüntüler....







    bu kodda https://tr.tradingview.com/v/tjP35RG5/ rsi için...
    Çok teşekkürler sn. Yörük, selamlar

  7. PHP Code:
     //@version=5

    type bar
        float o 
    open
        float h 
    high
        float l 
    low
        float c 
    close
        int   i 
    bar_index

    type trend
        float h 
    na
        float l 
    na

    type scythe
        polyline a 
    na
        line     b 
    na

    type target
        float u 
    na
        float l 
    na
        float p 
    na
        int   d 
    0
        bool  r 
    false
        line  v 
    na
        line  h 
    na
        label e 
    na

    type alerts
        bool  u 
    na
        bool  d 
    na
        bool  b 
    na
        bool  s 
    na

    type prompt
        string s 
    ''
        
    bool   c false

    method notify
    (prompt p) =>
        if 
    p.c
            alert
    (p.salert.freq_once_per_bar_close)
            
    method any(alerts a) =>
        
    string s = switch
            
    a.=> 'Target Reached    '    
            
    a.=> 'Target Invalidated'
            
    a.=> 'Breakout '           
            
    a.=> 'Breakdown'         
            
    =>      na

        prompt
    .new(snot na(s))

    method atr(bar bsimple int len 1) =>
        
    float tr 
             
    na(b.h[1]) ? 
             
    b.b.l  
             
    math.max(
                 
    math.max(
                     
    b.b.l
                     
    math.abs(b.b.c[1])), 
                 
    math.abs    (b.b.c[1]))

        
    len == tr ta.rma(trlen)

    method piv(trend t) =>
        
    bool b = switch
            
    na(t.h) and na(t.l) => false
            
    =>                     true

        b

    method blade
    (array<chart.pointabool psimple color usimple color d) =>
        
        
    polyline.new(afalsetruexloc.bar_indexucolor.new(d80) : color.new(u80))

    method handle(bar btrend tfloat s) =>
        
    line  l = switch
            
    not na(t.l) => 
                
    line.new(b.ib.sb.ib.l    xloc.bar_indexextend.none#9c4b11, line.style_solid, 3)
                
            
    not na(t.h) => 
                
    line.new(b.ib.h    b.ib.sxloc.bar_indexextend.none#9c4b11, line.style_solid, 3)

        
    l

    method goal
    (target tbar bsimple int len) =>
        
    t.:= line .new(b.ib.cb.i      t.pxloc.bar_indexextend.nonechart.fg_colorline.style_dashed)
        
    t.:= line .new(b.it.pb.lent.pxloc.bar_indexextend.nonechart.fg_colorline.style_dashed)

        
    //t.e := label.new(b.i + len, t.p, "HEDEF", xloc.bar_index, yloc.price, #f0a71f78, label.style_label_left, chart.fg_color, size.normal)

    method cu(target tbar b) =>
        
        
    t.l[1] < b.c[1] and t.b.c

    method co
    (target tbar b) =>
        
        
    t.u[1] > b.c[1] and t.b.c

    method cr
    (target tbar b) =>
        
        ((
    t.==  and b.t.p)  or 
         (
    t.== -and b.t.p))

    method reached(target tbar b) =>
        
    t.h.set_xy2(b.it.h.get_y2())
        
    t.e.set_xy (b.it.h.get_y2())

        
    t.e.set_color(#4caf4f78)
        
    t.e.set_text ('KAR-AL'  )

    method failed(target tbar b) =>
        
    t.h.set_xy2(b.it.h.get_y2())
        
    t.e.set_xy (b.it.h.get_y2())

        
    t.e.set_color(#a53a3a78)
        
    t.e.set_text ('GEÇERSİZ'  )


    const 
    string ts 'Controls how restrained the target calculation is, higher values will result in tighter targets.'
    const string tb 'Adjusts the length of the scythes blade'
    const string tp 'Swing detection length'
    const string gs 'Scythes', const string gt 'Targets', const string gu 'UI Options'
    len  input.int  (20       "Pivot Length"  20100tp,               group gs)
    ext  input.int  (40       "Scythe Length" 20200tb,               group gs)
    sen  input.int  (50       "Sensitivity %"10010ts,               group gt)
    bts  input.bool (true     "Display"       ,                                group gt)
    bbs  input.bool (true     "Breakouts"     ,                                group gu)
    colu input.color(#eee7df, ""              ,                  inline = '1', group = gu)
    cold input.color(#c71313, ""              ,                  inline = '1', group = gu)


    bar   b bar  .new(        )
    float s b    .atr(     len) / len
    trend t 
    trend.new(
           
    ta.pivothigh(lenlen),
           
    ta.pivotlow (lenlen))

    var 
    target          g target.new            ()
    var 
    map<intfloatmap   .new<intfloat>()
    var 
    map<intfloatmap   .new<intfloat>()

    if 
    t.piv()
        array<
    chart.point= array.new<chart.point>()
        
    bar                z b[len]
        
    bool               p na(t.l)

        for 
    0 to ext 1
            float c 
    math.pow(i2) / ext
            a
    .push(chart.point.from_index(z.i, (? (z.c) : (z.c))))
        
        
    a.push(chart.point.from_index(z.i, (? (z.ext 5) : (z.ext 5))))
        
        switch
            
    not na(t.l) => 
                
    l.clear()
                for 
    point in a
                    l
    .put(point.indexpoint.price)

            
    not na(t.h) => 
                
    u.clear()
                for 
    point in a
                    u
    .put(point.indexpoint.price)
        
        
    scythe n scythe.new(a.blade(pcolucold), z.handle(tlen))
        

    g.:= u.contains(b.i) ? u.get(b.i) : na
    g
    .:= l.contains(b.i) ? l.get(b.i) : na

    bool ucon 
    false
    bool dcon 
    false
    bool bcon 
    false
    bool scon 
    false

    if g.cr(b) and not g.and bts
        g
    .reached(b)
        
    g.:= true
        scon 
    := true

    if g.co(b) and bts
        
    if not g.r
            g
    .failed(b)
            
    bcon := true
        
    else
            
    ucon := true
        g
    .:= false
        g
    .:= 1
        g
    .:= b.ext * (sen 100)
        
    g.goal(blen)

    if 
    g.cu(b) and bts
        
    if not g.r
            g
    .failed(b)
            
    bcon := true
        
    else
            
    dcon := true
        g
    .:= false
        g
    .:= -1
        g
    .:= b.ext * (sen 100)
        
    g.goal(blen)


    alerts a alerts.new(
                          
    ucon,
                          
    dcon,
                          
    bcon,
                          
    scon)

    plotshape(not na(t.l) ? (b[len]).len na"ÇIPA"shape.diamondlocation.absolutecolu, -lensize size.normal)
    plotshape(not na(t.h) ? (b[len]).len na"TIRPAN"shape.diamondlocation.absolutecold, -lensize size.normal)

    //plotshape(bbs and a.d, "KIRILIM", shape.labeldown, location.abovebar, color.new(cold, 60), 0, 'AK', chart.fg_color, size = size.normal)
    //plotshape(bbs and a.u, "KIRILIM", shape.labelup  , location.belowbar, color.new(colu, 60), 0, 'YK', chart.fg_color, size = size.normal)


    //alertcondition(a.b, 'Target Reached    ', 'Target Reached    ')
    //alertcondition(a.s, 'Target Invalidated', 'Target Invalidated')
    //alertcondition(a.u, 'Breakout '         , 'Breakout '         )
    //alertcondition(a.d, 'Breakdown'         , 'Breakdown'         )

    a.any().notify()
    /////////////////////////////// 

    PHP Code:
    //@version=5

    dual_color=false
    var bar_value//(1-16)

    currentHigh high
    previousHigh 
    high[1]
    currentClose close
    previousClose 
    close[1]
    currentLow low
    previousLow 
    low[1]

    // 
    condition1 currentHigh previousHigh and currentClose previousClose and currentLow previousLow
    condition2 
    currentHigh previousHigh and currentClose previousClose and currentLow previousLow
    condition3 
    currentHigh previousHigh and currentClose previousClose and currentLow previousLow
    condition4 
    currentHigh previousHigh and currentClose previousClose and currentLow previousLow
    //--------------------------------------------------------
    condition5 currentHigh previousHigh and currentClose previousClose and currentLow previousLow
    condition6 
    currentHigh previousHigh and currentClose previousClose and currentLow previousLow
    condition7 
    currentHigh previousHigh and currentClose previousClose and currentLow previousLow
    condition8 
    currentHigh previousHigh and currentClose previousClose and currentLow previousLow

    open_up   
    close open[1]
    open_down close open[1]

    switch
        
    condition1 and open_up   => bar_value:=16
        condition1 
    and open_down => bar_value:=15
        condition2 
    and open_up   => bar_value:=14
        condition2 
    and open_down => bar_value:=13
        condition3 
    and open_up   => bar_value:=12
        condition3 
    and open_down => bar_value:=11
        condition4 
    and open_up   => bar_value:=10
        condition4 
    and open_down => bar_value:=9
        condition5 
    and open_up   => bar_value:=8
        condition5 
    and open_down => bar_value:=7
        condition6 
    and open_up   => bar_value:=6
        condition6 
    and open_down => bar_value:=5
        condition7 
    and open_up   => bar_value:=4
        condition7 
    and open_down => bar_value:=3
        condition8 
    and open_up   => bar_value:=2
        condition8 
    and open_down => bar_value:=
    //plot(bar_value,display = display.none,title="Bar Value")

    barcolor(condition1 and not dual_color color.rgb(2472232) : natitle="C+L+H+")  
    barcolor(condition2 and not dual_color color.rgb(2472232)   : natitle="C+L+H-")
    barcolor(condition3 and not dual_color color.rgb(2472232)   : natitle="C+L-H+")
    barcolor(condition4 and not dual_color color.rgb(2522232)  : natitle="C+L-H-")
    //--------------------------------------------------------------------------
    barcolor(condition5 and not dual_color color.rgb(2134250) : natitle="C-L+H+")
    barcolor(condition6 and not dual_color color.rgb(2134250) : natitle="C-L+H-")
    barcolor(condition7 and not dual_color color.rgb(2134250)    : natitle="C-L-H+")     
    barcolor(condition8 and not dual_color color.rgb(2134250) : natitle="C-L-H-"
    PHP Code:
     greencolor #2DD204
    redcolor #D2042D 
    _jfract(count)=> 
        
    window math.ceil(count/2)
        
    _hl1  = (ta.highest(high[window], window) - ta.lowest(low[window], window)) / window
        _hl2  
    = (ta.highest(highwindow) - ta.lowest(lowwindow)) / window
        _hl   
    = (ta.highest(highcount) - ta.lowest(lowcount)) / count
        _d    
    = (math.log(_hl1 _hl2) - math.log(_hl)) / math.log(2)
        
    dim  _d _d _d

    _kama
    (srclenfastslowjcountefratiocalc) =>
        
    fastend = (2.0 /(fast 1))
        
    slowend = (2.0 /(slow 1))
        
    mom math.abs(ta.change(srclen))
        
    vola math.sum(math.abs(ta.change(src)), len)
        
    efratio efratiocalc == "Regular" ? (vola != mom vola 0) : math.min(2.0-_jfract(jcount), 1.0
        
    alpha math.pow(efratio * (fastend slowend) + slowend2)
        
    kama 0.0
        kama 
    := alpha src + (alpha) * nz(kama[1], src)
        
    kama

    blsrc 
    input.source(hl2"Source"group "Kaufman AMA Settings")
    period input.int(10"Period"minval 0group "Kaufman AMA Settings")
    kama_fastend input.float(2"Kaufman AMA Fast-end Period"minval 0.0group "Kaufman AMA Settings")
    kama_slowend input.float(30"Kaufman AMA Slow-end Period",  minval 0.0group "Kaufman AMA Settings")
    efratiocalc input.string("Regular""Efficiency Ratio Type"options = ["Regular""Jurik Fractal Dimension Adaptive"], group "Kaufman AMA Settings")
    jcount input.int(defval=2title="Jurik Fractal Dimension Count "group "Kaufman AMA Settings")

    start input.float(0"Start"minval 0.0step 0.01group "Parabolic SAR")
    accel input.float(0.1"Acceleration"minval 0.0step 0.01group "Parabolic SAR")
    finish input.float(0.2"Maximum"minval 0.0step 0.01group "Parabolic SAR")

    showSar input.bool(true"Show PSAR of Kaufman AMA?"group "UI Options")
    showBl input.bool(true"Show Kaufman AMA Baseline?"group "UI Options")
    trendmatch input.bool(true"Activate Trend Confluence?"group "UI Options")
    colorbars55 input.bool(true"Color bars?"group "UI Options")

    kamaHi _kama(highperiodkama_fastendkama_slowendjcountefratiocalc
    kamaLo  _kama(lowperiodkama_fastendkama_slowendjcountefratiocalc
    kamaMid = (kamaHi kamaLo) * 0.5


    pine_sar
    (startincmaxcutoff_high_low_close) =>
        var 
    float result na
        
    var float maxMin na
        
    var float acceleration na
        
    var bool isBelow na
        bool isFirstTrendBar 
    false
        
    if bar_index cutoff cutoff 0.2
            
    if _close _close[1]
                
    isBelow := true
                maxMin 
    := _high
                result 
    := _low[1]
            else
                
    isBelow := false
                maxMin 
    := _low
                result 
    := 0
            isFirstTrendBar 
    := true
            acceleration 
    := start
        result 
    := result acceleration * (maxMin result)
        if 
    isBelow
            
    if result _low
                isFirstTrendBar 
    := true
                isBelow 
    := false
                result 
    := math.max(_highmaxMin)
                
    maxMin := _low
                acceleration 
    := start
        
    else
            if 
    result _high
                isFirstTrendBar 
    := true
                isBelow 
    := true
                result 
    := math.min(_lowmaxMin)
                
    maxMin := _high
                acceleration 
    := start
        
    if not isFirstTrendBar
            
    if isBelow
                
    if _high maxMin
                    maxMin 
    := _high
                    acceleration 
    := math.min(acceleration incmax)
            else
                if 
    _low maxMin
                    maxMin 
    := _low
                    acceleration 
    := math.min(acceleration incmax)
        
        if 
    isBelow
            result 
    := math.min(result_low[1])
            if 
    bar_index 1
                result 
    := math.min(result_low[2])
            
        else
            
    result := math.max(result_high[1])
            if 
    bar_index 1
                result 
    := math.max(result_high[2])
        [
    resultisBelow]

    [
    sarisbelow] = pine_sar(startaccelfinishmath.max(periodkama_fastendkama_slowend), kamaHikamaLokamaMid)

    kamaClose _kama(blsrcperiodkama_fastendkama_slowendjcountefratiocalc

    trendMatchColor blsrc kamaClose and isbelow greencolor  blsrc kamaClose and not isbelow redcolor color.white
    regSarColor 
    isbelow greencolor redcolor
    regBlColor 
    blsrc kamaClose greencolor redcolor

    //plot(showSar ? sar : na, "PSAR", style = plot.style_circles, linewidth = 3, color = trendmatch ? trendMatchColor : regSarColor)
    //plot(showBl ? kamaClose : na, "Kaufman AMA Baseline", color = trendmatch ? trendMatchColor : regBlColor, linewidth = 2)
    //barcolor(colorbars55 ? trendMatchColor : na) 

    PHP Code:
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © loxx

    //@version=5
    indicator("..",
         
    shorttitle='.'
         
    overlay true
         
    timeframe=""
         
    timeframe_gaps true,
           
    max_polylines_count 100
           
    max_lines_count 500
           
    max_labels_count 500
           
    precision=2)

    //@version=5

    multiplier input.float(title='M'defval=0.5minval=0.5maxval=1.9)
    timeframe input.timeframe(title='Timeframe'defval='720')
    barsc input(title='BarsColor'defval=true)

    request.security(syminfo.tickeridtimeframeopen)
    request.security(syminfo.tickeridtimeframeclose)
    atr33 request.security(syminfo.tickeridtimeframeta.sma(ta.tr5))

    anomalia math.abs(c) > multiplier atr33 0
    //barcolor(anomalia == 1 and barsc == 1 ? color.blue : na, 0)

    dot anomalia == and atr33 anomalia == and atr33 na
    plotshape
    (dotstyle=shape.squarecolor=color.new(color.blue0), location=location.absolute)
    ///////////////////////
    //@version=5

    // ATR 
    atrLength       input.int(title="ATR Length"defval=12minval=1tooltip="ATR period"group "Average True Range -ATR-")
    lookback        input.int(title="Lookback"defval=14minval=1tooltip="How many bars to look back for highs/lows"group "Average True Range -ATR-")
    ATRSizeInput    input.int(title="ATR percentage to use"defval=150minval=0tooltip="Stop loss distance times ATR multiplier. Must use full percentage number"group "Average True Range -ATR-") / 100

    atrValue 
    ta.atr(atrLength)
    stopSize  atrValue ATRSizeInput

    lowStop         
    close ta.lowest(lowlookback)
    highStop        ta.highest(lowlookback) - close  

    //  SUPERTREND
    factor              input.float(3.0"Factor",     minval 0.01step 0.01group "SuperTrend"tooltip =  "The multiplier by which the ATR will get multiplied")

    [
    supertrenddirection] = ta.supertrend(factoratrLength)

    supertrend          := barstate.isfirst na supertrend

    // Get conditional Stop Loss DISTANCE from current price as ATR multiplier

    long_stop_distance       close stopSize ta.lowest(lowlookback) ? stopSize lowStop       
    short_stop_distance      
    close stopSize ta.lowest(lowlookback) ? stopSize highStop 

    long_stop_level          
    close long_stop_distance
    short_stop_level         
    close long_stop_distance

    // BOLLINGER BANDS
    lengthbb        input.int(20minval=1group "Bollinger Bands")
    mult            input.float(2.0minval=0.001maxval=50title="StdDev"group "Bollinger Bands")
    offset          input.int(0"Offset"minval = -500maxval 500)

    [
    middleupperlower] = ta.bb(closelengthbbmult)

    avg_stop direction ? (supertrend long_stop_level lower) / : (supertrend short_stop_level upper) / 
    plot
    (avg_stoptitle "Stop "color color.rgb(25525525500), style plot.style_steplinelinewidth 1trackprice trueprecision 2)
    ////////////////////// 
    Son düzenleme : @yörük@; 26-02-2024 saat: 22:41.
    Teknik olarak; yarına gebe olan bugünü yaşamalı ki, yarın, yaşanmış olsun.

  8. PHP Code:
     // This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/
    // ~~ © Zeiierman {

    //@version=5
    indicator("TrendCylinder (Expo)"overlay true)
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    // ~~ ToolTips {
    t1 "Volatility Period defines the length of the look-back period for calculating volatility. Higher values make the bands adapt more slowly to volatility changes. Lower values make them adapt more quickly."
    t2 "Trend Factor adjusts the sensitivity of the trend line to price movements. A higher value makes the trend line less sensitive and smoother. Lower values make it more sensitive and reactive to price changes."
    t3 "Trend Step controls how quickly the trend line adjusts to sudden price changes. Higher values cause slower adjustments, leading to smoother trend lines. Lower values result in quicker adjustments to sudden changes."
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    // ~~ Inputs {
    volatilityPeriod   input.int(100title="Period"step=10minval=2maxval=1000inline="vol"group="Volatility Settings"tooltip=t1)
    trendFactor        input.float(9step=0.1title='Factor'minval 0.1inline=""group="Trend Settings"tooltip=t2)
    trendStep          input.float(0.7"Step"step=0.1,minval 0.5maxval 5.0inline=""group="Trend Settings"tooltip=t3)

    color_trend        input.color(color.navytitle="Trend Line  "inline="trend"group="Style")
    colorForUpperBand  input.color(color.new(#862458, 10), title="Upper Band", inline="band", group="Style")
    colorForLowerBand  input.color(color.new(#493893, 10), title="Lower Band", inline="band", group="Style")
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    // ~~  Initialize Variables
    var float currentTrend        0.0
    var int trendDirection        0
    averageTrueRange              
    ta.atr(200)
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    // ~~  Function to determine the trend direction
    determineTrendDirection(direction) => direction direction[1] > : (direction direction[1] < ? -0)
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    // ~~  Calculate Trend Direction
    closingPrice      close
    scaledStandardDev 
    = (nz(averageTrueRange) * trendFactor)
    trendDirection    := determineTrendDirection(currentTrend) * int(scaledStandardDev)
    priceTrendDiff    closingPrice currentTrend closingPrice currentTrend currentTrend closingPrice
    reciprocalFactor  
    = (scaledStandardDev * (trendFactor)) * math.pow(2100)
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    // ~~ Calculate the Current Trend
    trendAdjustment   priceTrendDiff scaledStandardDev trendStep math.avg(closingPricecurrentTrend) : trendDirection reciprocalFactor currentTrend
    currentTrend      
    := trendAdjustment
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    // ~~  Calculate Upper and Lower Bands
    upperBand currentTrend scaledStandardDev averageTrueRange ta.ema(ta.stdev(closingPricevolatilityPeriod), 200)
    lowerBand currentTrend scaledStandardDev averageTrueRange ta.ema(ta.stdev(closingPricevolatilityPeriod), 200)
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    // ~~ Plot
    isTrendConsistent trendDirection == trendDirection[1]
    colorForPlot      trendDirection == color_trend color_trend

    plotTrend   
    plot(isTrendConsistent currentTrend natitle="Trend Line"color=colorForPlot)
    plotUpper   plot(isTrendConsistent upperBand natitle="Upper Band"color color.new(color.black100))
    plotLower   plot(isTrendConsistent lowerBand natitle="Lower Band"color color.new(color.black100))

    fill(plotUpperplotTrendtop_color colorForLowerBandbottom_color =color.new(na,100), top_value upperBandbottom_value currentTrendtitle="Background Upper")
    fill(plotTrendplotLowertop_color color.new(na,100), bottom_color colorForUpperBandtop_value currentTrendbottom_value lowerBandtitle="Background Lower")
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~} 


    PHP Code:
    //@version=5
    indicator(".",overlay=true,max_boxes_count=50,max_labels_count=50,max_lines_count=144,max_bars_back=1000)
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
    ////////////
    greencolor #2dd204
    redcolor #f80435 
    _jfract(count)=> 
        
    window math.ceil(count/2)
        
    _hl1  = (ta.highest(high[window], window) - ta.lowest(low[window], window)) / window
        _hl2  
    = (ta.highest(highwindow) - ta.lowest(lowwindow)) / window
        _hl   
    = (ta.highest(highcount) - ta.lowest(lowcount)) / count
        _d    
    = (math.log(_hl1 _hl2) - math.log(_hl)) / math.log(2)
        
    dim  _d _d _d

    _kama
    (srclenfastslowjcountefratiocalc) =>
        
    fastend = (2.0 /(fast 1))
        
    slowend = (2.0 /(slow 1))
        
    mom math.abs(ta.change(srclen))
        
    vola math.sum(math.abs(ta.change(src)), len)
        
    efratio efratiocalc == "Regular" ? (vola != mom vola 0) : math.min(2.0-_jfract(jcount), 1.0
        
    alpha math.pow(efratio * (fastend slowend) + slowend2)
        
    kama 0.0
        kama 
    := alpha src + (alpha) * nz(kama[1], src)
        
    kama

    blsrc 
    input.source(hl2"Source"group "Kaufman AMA Settings")
    period input.int(10"Period"minval 0group "Kaufman AMA Settings")
    kama_fastend input.float(2"Kaufman AMA Fast-end Period"minval 0.0group "Kaufman AMA Settings")
    kama_slowend input.float(30"Kaufman AMA Slow-end Period",  minval 0.0group "Kaufman AMA Settings")
    efratiocalc input.string("Regular""Efficiency Ratio Type"options = ["Regular""Jurik Fractal Dimension Adaptive"], group "Kaufman AMA Settings")
    jcount input.int(defval=2title="Jurik Fractal Dimension Count "group "Kaufman AMA Settings")

    start input.float(0"Start"minval 0.0step 0.01group "Parabolic SAR")
    accel input.float(0.1"Acceleration"minval 0.0step 0.01group "Parabolic SAR")
    finish input.float(0.3"Maximum"minval 0.0step 0.01group "Parabolic SAR")

    showSar input.bool(true"Show PSAR of Kaufman AMA?"group "UI Options")
    showBl input.bool(true"Show Kaufman AMA Baseline?"group "UI Options")
    trendmatch input.bool(true"Activate Trend Confluence?"group "UI Options")
    colorbars55 input.bool(true"Color bars?"group "UI Options")

    kamaHi _kama(highperiodkama_fastendkama_slowendjcountefratiocalc
    kamaLo  _kama(lowperiodkama_fastendkama_slowendjcountefratiocalc
    kamaMid = (kamaHi kamaLo) * 0.5


    pine_sar
    (startincmaxcutoff_high_low_close) =>
        var 
    float result na
        
    var float maxMin na
        
    var float acceleration na
        
    var bool isBelow na
        bool isFirstTrendBar 
    false
        
    if bar_index cutoff cutoff 0.2
            
    if _close _close[1]
                
    isBelow := true
                maxMin 
    := _high
                result 
    := _low[1]
            else
                
    isBelow := false
                maxMin 
    := _low
                result 
    := 0
            isFirstTrendBar 
    := true
            acceleration 
    := start
        result 
    := result acceleration * (maxMin result)
        if 
    isBelow
            
    if result _low
                isFirstTrendBar 
    := true
                isBelow 
    := false
                result 
    := math.max(_highmaxMin)
                
    maxMin := _low
                acceleration 
    := start
        
    else
            if 
    result _high
                isFirstTrendBar 
    := true
                isBelow 
    := true
                result 
    := math.min(_lowmaxMin)
                
    maxMin := _high
                acceleration 
    := start
        
    if not isFirstTrendBar
            
    if isBelow
                
    if _high maxMin
                    maxMin 
    := _high
                    acceleration 
    := math.min(acceleration incmax)
            else
                if 
    _low maxMin
                    maxMin 
    := _low
                    acceleration 
    := math.min(acceleration incmax)
        
        if 
    isBelow
            result 
    := math.min(result_low[1])
            if 
    bar_index 1
                result 
    := math.min(result_low[2])
            
        else
            
    result := math.max(result_high[1])
            if 
    bar_index 1
                result 
    := math.max(result_high[2])
        [
    resultisBelow]

    [
    sarisbelow] = pine_sar(startaccelfinishmath.max(periodkama_fastendkama_slowend), kamaHikamaLokamaMid)

    kamaClose _kama(blsrcperiodkama_fastendkama_slowendjcountefratiocalc

    trendMatchColor blsrc kamaClose and isbelow greencolor  blsrc kamaClose and not isbelow redcolor color.rgb(25525525500)
    regSarColor isbelow greencolor redcolor
    regBlColor 
    blsrc kamaClose greencolor redcolor

    plot
    (showSar sar na"Trend"style plot.style_steplinelinewidth 2color trendmatch trendMatchColor regSarColor)
    barcolor(colorbars55 trendMatchColor na)
    /////////////////////
    input.source(ohlc4)
    lp math.log(s)
    input.int(3)

    rollingMean(src,length) =>
        
    mean 0.00
        mean 
    := (nz(mean[1]) * (length-1) + src)/length
    stdev
    (src,length)=>
        
    sd=math.sqrt(rollingMean(src*src,length)-rollingMean(src,length)*rollingMean(src,length))
    bandwidth(sd,length) =>
        
    0.00
        h 
    := 1.06*sd*math.pow(length,-float(1)/5)

    rsd stdev(lp,n)
    rm rollingMean(lp,n)
    plot(math.exp(rm),color=color.rgb(255255255100), title="Stop"

    PHP Code:
     //@version=5
    indicator('.'shorttitle='.'overlay=truemax_polylines_count 100max_lines_count 100max_labels_count 100precision=2)

    length input.int(20"TTM Squeeze Length")

    //BOLLINGER BANDS
    BB_mult input.float(2.0"Bollinger Band STD Multiplier")
    BB_basis ta.sma(closelength)
    dev BB_mult ta.stdev(closelength)
    BB_upper BB_basis dev
    BB_lower 
    BB_basis dev
    atr 
    ta.atr(14)

    //KELTNER CHANNELS
    KC_mult_high input.float(1.0"Keltner Channel #1")
    KC_mult_mid input.float(1.5"Keltner Channel #2")
    KC_mult_low input.float(2.0"Keltner Channel #3")
    KC_basis ta.sma(closelength)
    devKC ta.sma(ta.trlength)
    KC_upper_high KC_basis devKC KC_mult_high
    KC_lower_high 
    KC_basis devKC KC_mult_high
    KC_upper_mid 
    KC_basis devKC KC_mult_mid
    KC_lower_mid 
    KC_basis devKC KC_mult_mid
    KC_upper_low 
    KC_basis devKC KC_mult_low
    KC_lower_low 
    KC_basis devKC KC_mult_low

    //SQUEEZE CONDITIONS
    NoSqz BB_lower KC_lower_low or BB_upper KC_upper_low //NO SQUEEZE: GREEN
    LowSqz BB_lower >= KC_lower_low or BB_upper <= KC_upper_low //LOW COMPRESSION: BLACK
    MidSqz BB_lower >= KC_lower_mid or BB_upper <= KC_upper_mid //MID COMPRESSION: RED
    HighSqz BB_lower >= KC_lower_high or BB_upper <= KC_upper_high //HIGH COMPRESSION: ORANGE

    //MOMENTUM OSCILLATOR
    mom ta.linreg(close math.avg(math.avg(ta.highest(highlength), ta.lowest(lowlength)), ta.sma(closelength)), length0)

    //MOMENTUM HISTOGRAM COLOR
    iff_1 mom nz(mom[1]) ? color.new(color.aqua0) : color.new(#2962ff, 0)
    iff_2 mom nz(mom[1]) ? color.new(color.red0) : color.new(color.yellow0)
    mom_color mom iff_1 iff_2

    // Bullsqueeze and Bearsqueeze Conditions
    bullsqueeze = ((NoSqz and mom_color == color.new(color.aqua0)) or (mom_color == color.new(color.aqua0) and mom_color[1] == color.new(color.red0)))
    bearsqueeze = ((NoSqz and mom_color == color.new(color.red0)) or (mom_color == color.new(color.red0) and mom_color[1] == color.new(color.aqua0)))


    // BULL AND BEAR WATCH OUT Conditions
    buyConf = (mom_color == color.new(color.aqua0) and mom_color[1] == color.new(color.yellow0)) and not bullsqueeze
    sellConf 
    = (mom_color == color.new(color.red0) and mom_color[1] == color.new(#2962ff, 0)) and not bearsqueeze


    // User inputs for colors and widths related to the BAND
    userColorBullish input.color(color.rgb(2472232), "Bullish Band Color"group"Customize BAND")
    userColorBearish input.color(color.black"Bearish Band Color",group"Customize BAND")
    bandWidthMultiplier input.float(2.0"Band Width Multiplier"minval=1.0,group"Customize BAND")
    userWidth input.int(2"Band Width"minval=1,group"Customize BAND")

    // Adjusted band calculations
    upperBand high + (atr bandWidthMultiplier)
    lowerBand low - (atr bandWidthMultiplier)

    // Initialize a color variable for the band
    var color bandColor na
    // Initialize a variable to store the previous band color
    var color prevBandColor na

    // Update the previous band color for the next bar
    prevBandColor := bandColor[1]

    // Create variables to store the previous squeeze state
    var bool prevBullSqueeze false
    var bool prevBearSqueeze false

    // Update the previous squeeze state at the beginning of each new bar
    if (barstate.isnew)
        
    prevBullSqueeze := bandColor == color.new(userColorBullish0)
        
    prevBearSqueeze := bandColor == color.new(userColorBearish100)

    // Determine the band color based on custom conditions
    if (bullsqueeze)
        
    bandColor := color.new(userColorBullish0)
    else if (
    bearsqueeze
        
    bandColor := color.new(userColorBearish100)
    else if (
    sellConf and prevBullSqueeze)
        
    bandColor := color.new(userColorBullish50
    else if (
    sellConf)
        
    bandColor := color.new(userColorBearish100)
    else if (
    buyConf and prevBearSqueeze)
        
    bandColor := color.new(userColorBearish100
    else if (
    buyConf)
        
    bandColor := color.new(userColorBullish50)

        

    // Plot the bands and store the plot references
    upperBandPlot plot(upperBand"H"color=bandColorlinewidth=userWidth)
    lowerBandPlot plot(lowerBand"L"color=bandColorlinewidth=userWidth)

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

    //@version=5

    dual_color=false
    var bar_value//(1-16)

    currentHigh high
    previousHigh 
    high[1]
    currentClose close
    previousClose 
    close[1]
    currentLow low
    previousLow 
    low[1]

    // 
    condition1 currentHigh previousHigh and currentClose previousClose and currentLow previousLow
    condition2 
    currentHigh previousHigh and currentClose previousClose and currentLow previousLow
    condition3 
    currentHigh previousHigh and currentClose previousClose and currentLow previousLow
    condition4 
    currentHigh previousHigh and currentClose previousClose and currentLow previousLow
    //--------------------------------------------------------
    condition5 currentHigh previousHigh and currentClose previousClose and currentLow previousLow
    condition6 
    currentHigh previousHigh and currentClose previousClose and currentLow previousLow
    condition7 
    currentHigh previousHigh and currentClose previousClose and currentLow previousLow
    condition8 
    currentHigh previousHigh and currentClose previousClose and currentLow previousLow

    open_up   
    close open[1]
    open_down close open[1]

    switch
        
    condition1 and open_up   => bar_value:=16
        condition1 
    and open_down => bar_value:=15
        condition2 
    and open_up   => bar_value:=14
        condition2 
    and open_down => bar_value:=13
        condition3 
    and open_up   => bar_value:=12
        condition3 
    and open_down => bar_value:=11
        condition4 
    and open_up   => bar_value:=10
        condition4 
    and open_down => bar_value:=9
        condition5 
    and open_up   => bar_value:=8
        condition5 
    and open_down => bar_value:=7
        condition6 
    and open_up   => bar_value:=6
        condition6 
    and open_down => bar_value:=5
        condition7 
    and open_up   => bar_value:=4
        condition7 
    and open_down => bar_value:=3
        condition8 
    and open_up   => bar_value:=2
        condition8 
    and open_down => bar_value:=
    //plot(bar_value,display = display.none,title="Bar Value")

    barcolor(condition1 and not dual_color color.rgb(2472232) : natitle="C+L+H+")  
    barcolor(condition2 and not dual_color color.rgb(2472232)   : natitle="C+L+H-")
    barcolor(condition3 and not dual_color color.rgb(2472232)   : natitle="C+L-H+")
    barcolor(condition4 and not dual_color color.rgb(2522232)  : natitle="C+L-H-")
    //--------------------------------------------------------------------------
    barcolor(condition5 and not dual_color color.rgb(2134250) : natitle="C-L+H+")
    barcolor(condition6 and not dual_color color.rgb(2134250) : natitle="C-L+H-")
    barcolor(condition7 and not dual_color color.rgb(2134250)    : natitle="C-L-H+")     
    barcolor(condition8 and not dual_color color.rgb(2134250) : natitle="C-L-H-")
    ///////////////////////
    //@version=5

    type bar
        float o 
    open
        float h 
    high
        float l 
    low
        float c 
    close
        int   i 
    bar_index

    type trend
        float h 
    na
        float l 
    na

    type scythe
        polyline a 
    na
        line     b 
    na

    type target
        float u 
    na
        float l 
    na
        float p 
    na
        int   d 
    0
        bool  r 
    false
        line  v 
    na
        line  h 
    na
        label e 
    na

    type alerts
        bool  u 
    na
        bool  d 
    na
        bool  b 
    na
        bool  s 
    na

    type prompt
        string s 
    ''
        
    bool   c false

    method notify
    (prompt p) =>
        if 
    p.c
            alert
    (p.salert.freq_once_per_bar_close)
            
    method any(alerts a) =>
        
    string s = switch
            
    a.=> 'Target Reached    '    
            
    a.=> 'Target Invalidated'
            
    a.=> 'Breakout '           
            
    a.=> 'Breakdown'         
            
    =>      na

        prompt
    .new(snot na(s))

    method atr(bar bsimple int len 1) =>
        
    float tr 
             
    na(b.h[1]) ? 
             
    b.b.l  
             
    math.max(
                 
    math.max(
                     
    b.b.l
                     
    math.abs(b.b.c[1])), 
                 
    math.abs    (b.b.c[1]))

        
    len == tr ta.rma(trlen)

    method piv(trend t) =>
        
    bool b = switch
            
    na(t.h) and na(t.l) => false
            
    =>                     true

        b

    method blade
    (array<chart.pointabool psimple color usimple color d) =>
        
        
    polyline.new(afalsetruexloc.bar_indexucolor.new(d80) : color.new(u80))

    method handle(bar btrend tfloat s) =>
        
    line  l = switch
            
    not na(t.l) => 
                
    line.new(b.ib.sb.ib.l    xloc.bar_indexextend.none#9c4b11, line.style_solid, 3)
                
            
    not na(t.h) => 
                
    line.new(b.ib.h    b.ib.sxloc.bar_indexextend.none#9c4b11, line.style_solid, 3)

        
    l

    method goal
    (target tbar bsimple int len) =>
        
    t.:= line .new(b.ib.cb.i      t.pxloc.bar_indexextend.nonechart.fg_colorline.style_dashed)
        
    t.:= line .new(b.it.pb.lent.pxloc.bar_indexextend.nonechart.fg_colorline.style_dashed)

        
    //t.e := label.new(b.i + len, t.p, "HEDEF", xloc.bar_index, yloc.price, #f0a71f78, label.style_label_left, chart.fg_color, size.normal)

    method cu(target tbar b) =>
        
        
    t.l[1] < b.c[1] and t.b.c

    method co
    (target tbar b) =>
        
        
    t.u[1] > b.c[1] and t.b.c

    method cr
    (target tbar b) =>
        
        ((
    t.==  and b.t.p)  or 
         (
    t.== -and b.t.p))

    method reached(target tbar b) =>
        
    t.h.set_xy2(b.it.h.get_y2())
        
    t.e.set_xy (b.it.h.get_y2())

        
    t.e.set_color(#4caf4f78)
        
    t.e.set_text ('KAR-AL'  )

    method failed(target tbar b) =>
        
    t.h.set_xy2(b.it.h.get_y2())
        
    t.e.set_xy (b.it.h.get_y2())

        
    t.e.set_color(#a53a3a78)
        
    t.e.set_text ('GEÇERSİZ'  )


    const 
    string ts 'Controls how restrained the target calculation is, higher values will result in tighter targets.'
    const string tb 'Adjusts the length of the scythes blade'
    const string tp 'Swing detection length'
    const string gs 'Scythes', const string gt 'Targets', const string gu 'UI Options'
    len  input.int  (20       "Pivot Length"  20100tp,               group gs)
    ext  input.int  (40       "Scythe Length" 20200tb,               group gs)
    sen  input.int  (50       "Sensitivity %"10010ts,               group gt)
    bts  input.bool (true     "Display"       ,                                group gt)
    bbs  input.bool (true     "Breakouts"     ,                                group gu)
    colu input.color(#eee7df, ""              ,                  inline = '1', group = gu)
    cold input.color(#c71313, ""              ,                  inline = '1', group = gu)


    bar   b bar  .new(        )
    float s b    .atr(     len) / len
    trend t 
    trend.new(
           
    ta.pivothigh(lenlen),
           
    ta.pivotlow (lenlen))

    var 
    target          g target.new            ()
    var 
    map<intfloatmap   .new<intfloat>()
    var 
    map<intfloatmap   .new<intfloat>()

    if 
    t.piv()
        array<
    chart.point= array.new<chart.point>()
        
    bar                z b[len]
        
    bool               p na(t.l)

        for 
    0 to ext 1
            float c 
    math.pow(i2) / ext
            a
    .push(chart.point.from_index(z.i, (? (z.c) : (z.c))))
        
        
    a.push(chart.point.from_index(z.i, (? (z.ext 5) : (z.ext 5))))
        
        switch
            
    not na(t.l) => 
                
    l.clear()
                for 
    point in a
                    l
    .put(point.indexpoint.price)

            
    not na(t.h) => 
                
    u.clear()
                for 
    point in a
                    u
    .put(point.indexpoint.price)
        
        
    scythe n scythe.new(a.blade(pcolucold), z.handle(tlen))
        

    g.:= u.contains(b.i) ? u.get(b.i) : na
    g
    .:= l.contains(b.i) ? l.get(b.i) : na

    bool ucon 
    false
    bool dcon 
    false
    bool bcon 
    false
    bool scon 
    false

    if g.cr(b) and not g.and bts
        g
    .reached(b)
        
    g.:= true
        scon 
    := true

    if g.co(b) and bts
        
    if not g.r
            g
    .failed(b)
            
    bcon := true
        
    else
            
    ucon := true
        g
    .:= false
        g
    .:= 1
        g
    .:= b.ext * (sen 100)
        
    g.goal(blen)

    if 
    g.cu(b) and bts
        
    if not g.r
            g
    .failed(b)
            
    bcon := true
        
    else
            
    dcon := true
        g
    .:= false
        g
    .:= -1
        g
    .:= b.ext * (sen 100)
        
    g.goal(blen)


    alerts a alerts.new(
                          
    ucon,
                          
    dcon,
                          
    bcon,
                          
    scon)

    plotshape(not na(t.l) ? (b[len]).len na"ÇIPA"shape.diamondlocation.absolutecolu, -lensize size.normal)
    plotshape(not na(t.h) ? (b[len]).len na"TIRPAN"shape.diamondlocation.absolutecold, -lensize size.normal)

    //plotshape(bbs and a.d, "KIRILIM", shape.labeldown, location.abovebar, color.new(cold, 60), 0, 'AK', chart.fg_color, size = size.normal)
    //plotshape(bbs and a.u, "KIRILIM", shape.labelup  , location.belowbar, color.new(colu, 60), 0, 'YK', chart.fg_color, size = size.normal)


    //alertcondition(a.b, 'Target Reached    ', 'Target Reached    ')
    //alertcondition(a.s, 'Target Invalidated', 'Target Invalidated')
    //alertcondition(a.u, 'Breakout '         , 'Breakout '         )
    //alertcondition(a.d, 'Breakdown'         , 'Breakdown'         )

    a.any().notify()
    ///////////////////////////////
    //@version=5
    OPEN request.security(syminfo.tickerid'60'open)

    //ADR L
    dayrange high low

    r1 
    request.security(syminfo.tickerid'60'dayrange[1])
    r2 request.security(syminfo.tickerid'60'dayrange[2])
    r3 request.security(syminfo.tickerid'60'dayrange[3])
    r4 request.security(syminfo.tickerid'60'dayrange[4])
    r5 request.security(syminfo.tickerid'60'dayrange[5])
    r6 request.security(syminfo.tickerid'60'dayrange[6])
    r7 request.security(syminfo.tickerid'60'dayrange[7])
    r8 request.security(syminfo.tickerid'60'dayrange[8])
    r9 request.security(syminfo.tickerid'60'dayrange[9])
    r10 request.security(syminfo.tickerid'60'dayrange[10])

    adr_10 = (r1 r2 r3 r4 r5 r6 r7 r8 r9 r10) / 10
    adr_9 
    = (r1 r2 r3 r4 r5 r6 r7 r8 r9) / 9
    adr_8 
    = (r1 r2 r3 r4 r5 r6 r7 r8) / 8
    adr_7 
    = (r1 r2 r3 r4 r5 r6 r7) / 7
    adr_6 
    = (r1 r2 r3 r4 r5 r6) / 6
    adr_5 
    = (r1 r2 r3 r4 r5) / 5
    adr_4 
    = (r1 r2 r3 r4) / 4
    adr_3 
    = (r1 r2 r3) / 3
    adr_2 
    = (r1 r2) / 2
    adr_1 
    r1

    //plot 
    adrhigh10 plot(OPEN adr_10 2title='HH'style=plot.style_linebrcolor=color.new(#ff9900, 100), linewidth=1)
    adrlow10 plot(OPEN adr_10 2title='HL'style=plot.style_linebrcolor=color.new(#ff9900, 100), linewidth=1)
    ////////////////////////
    // This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/
    // ~~ © Zeiierman {

    //@version=5
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    // ~~ ToolTips {
    t1 "Volatility Period defines the length of the look-back period for calculating volatility. Higher values make the bands adapt more slowly to volatility changes. Lower values make them adapt more quickly."
    t2 "Trend Factor adjusts the sensitivity of the trend line to price movements. A higher value makes the trend line less sensitive and smoother. Lower values make it more sensitive and reactive to price changes."
    t3 "Trend Step controls how quickly the trend line adjusts to sudden price changes. Higher values cause slower adjustments, leading to smoother trend lines. Lower values result in quicker adjustments to sudden changes."
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    // ~~ Inputs {
    volatilityPeriod   input.int(100title="Period"step=10minval=2maxval=1000inline="vol"group="Volatility Settings"tooltip=t1)
    trendFactor        input.float(9step=0.1title='Factor'minval 0.1inline=""group="Trend Settings"tooltip=t2)
    trendStep          input.float(0.7"Step"step=0.1,minval 0.5maxval 5.0inline=""group="Trend Settings"tooltip=t3)

    color_trend        input.color(color.navytitle="Trend Line  "inline="trend"group="Style")
    colorForUpperBand  input.color(color.new(#862458, 10), title="Upper Band", inline="band", group="Style")
    colorForLowerBand  input.color(color.new(#493893, 10), title="Lower Band", inline="band", group="Style")
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    // ~~  Initialize Variables
    var float currentTrend        0.0
    var int trendDirection        0
    averageTrueRange              
    ta.atr(200)
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    // ~~  Function to determine the trend direction
    determineTrendDirection(direction) => direction direction[1] > : (direction direction[1] < ? -0)
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    // ~~  Calculate Trend Direction
    closingPrice      close
    scaledStandardDev 
    = (nz(averageTrueRange) * trendFactor)
    trendDirection    := determineTrendDirection(currentTrend) * int(scaledStandardDev)
    priceTrendDiff    closingPrice currentTrend closingPrice currentTrend currentTrend closingPrice
    reciprocalFactor  
    = (scaledStandardDev * (trendFactor)) * math.pow(2100)
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    // ~~ Calculate the Current Trend
    trendAdjustment   priceTrendDiff scaledStandardDev trendStep math.avg(closingPricecurrentTrend) : trendDirection reciprocalFactor currentTrend
    currentTrend      
    := trendAdjustment
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    // ~~  Calculate Upper and Lower Bands
    upperBand88 currentTrend scaledStandardDev averageTrueRange ta.ema(ta.stdev(closingPricevolatilityPeriod), 200)
    lowerBand88 currentTrend scaledStandardDev averageTrueRange ta.ema(ta.stdev(closingPricevolatilityPeriod), 200)
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    // ~~ Plot
    isTrendConsistent trendDirection == trendDirection[1]
    colorForPlot      trendDirection == color_trend color_trend

    plotTrend   
    plot(isTrendConsistent currentTrend natitle="Trend ",  color color.new(na00))
    plotUpper   plot(isTrendConsistent upperBand88 natitle="Upper "color color.new(color.black00))
    plotLower   plot(isTrendConsistent lowerBand88 natitle="Lower "color color.new(color.black00))

    fill(plotUpperplotTrendtop_color colorForLowerBandbottom_color =color.new(na,100), top_value upperBand88bottom_value currentTrendtitle="Background Upper")
    fill(plotTrendplotLowertop_color color.new(na,100), bottom_color colorForUpperBandtop_value currentTrendbottom_value lowerBand88title="Background Lower")
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
    //@version=5


    interval_to_len timeframe.multiplier * (timeframe.isdaily 1440 timeframe.isweekly 1440 timeframe.ismonthly 1440 30 1)

    ep_interval 60 input.int(5minval=1title='Extreme Point Interval (hours)')
    len99 input.int(5minval=1title='Length')
    MA_type input.string('Exponential'title='Moving Average Type'options=['Simple''Exponential''Smoothed'])
    src close

    ep_len 
    math.ceil(ep_interval interval_to_len)
    _highest ta.highest(highep_len)
    _lowest ta.lowest(lowep_len)
    MA = if MA_type == 'Simple'
        
    ta.sma(srclen99)
    else
        if 
    MA_type == 'Smoothed'
            
    ta.rma(srclen99)
        else
            
    ta.ema(srclen99)
    SR src
    trend 
    math.sign(nz(src[1]) - nz(SR[1]))
    SR := nz(SR[1], SR) + trend math.abs(nz(MAsrc) - nz(MA[1], MA))
    SR := src SR and trend _highest src SR and trend _lowest SR
    trend 
    := math.sign(src SR)

    plot(SRcolor=trend != trend[1] ? na trend #65D25BFF : #FE6B69FF,linewidth = 4, title='.')
    ////////////////////

    //@version=5


    // inputs
    sdLength    input.int(3title 'Price-Action Length'minval 2maxval 100)
    labelType   input.string('Repaint'title 'Label Type'options = ['Repaint''No-Repaint'])
    candleType  input.string('Fill Only'title 'Candle Color Type'options = ['Entire Candle''Fill Only'])

    bullCSS     input.color(color.limetitle 'Bull')
    bearCSS     input.color(color.rgb(25500), title 'Bear')
    neutCSS     input.color(color.yellowtitle 'Neutral')

    useTrendTable   input.bool(truetitle 'Enabled'group 'MTF Trend')

    use_mtf1        input.bool(truetitle 'MTF 1'group 'MTF Trend'inline '1')
    mtf_1           input.timeframe("1"title ''group 'MTF Trend'inline '1')

    use_mtf2        input.bool(truetitle 'MTF 2'group 'MTF Trend'inline '2')
    mtf_2           input.timeframe("3"title ''group 'MTF Trend'inline '2')

    use_mtf3        input.bool(truetitle 'MTF 3'group 'MTF Trend'inline '3')
    mtf_3           input.timeframe("5"title ''group 'MTF Trend'inline '3')

    use_mtf4        input.bool(truetitle 'MTF 4'group 'MTF Trend'inline '4')
    mtf_4           input.timeframe("15"title ''group 'MTF Trend'inline '4')

    use_mtf5        input.bool(truetitle 'MTF 5'group 'MTF Trend'inline '5')
    mtf_5           input.timeframe("60"title ''group 'MTF Trend'inline '5')



    // functions
    f_getSwingValues(sdLengthoffset) =>
        
    sh ta.pivothigh(highsdLengthsdLength)
        
    sl ta.pivotlow(lowsdLengthsdLength)

        
    csh ta.valuewhen(not na(sh), high[sdLength], 0)
        
    csl ta.valuewhen(not na(sl), low[sdLength], 0)

        
    psh ta.valuewhen(not na(sh), high[sdLength], 1)
        
    psl ta.valuewhen(not na(sl), low[sdLength], 1)

        
    hh sh >= psh
        lh 
    sh psh
        ll 
    sl <= psl
        hl 
    sl psl

        
    var int trend na
        trend 
    := ((hh and high >= psh) or close csh) ? : ((ll and low <= psl) or close csl) ? -lh or hl trend[1]

        var 
    int last_signal na
        last_signal 
    := hh lh ? -ll ? -hl last_signal[1]

        [
    sh[offset], sl[offset], psh[offset], psl[offset], csh[offset], csl[offset], hh[offset], lh[offset], ll[offset], hl[offset], trend[offset], last_signal[offset]]



    // calculate chart tf
    [shslpshpslcshcslhhlhllhltrend45last_signal] =
     
    request.security(syminfo.tickerid""f_getSwingValues(sdLength0))


    plotshape(ll and not na(sl), text="LL"title="Lower Low"style=shape.labelupdisplay display.none,
     
    color=bearCSStextcolor=color.blacklocation=location.belowbaroffset labelType == 'Repaint' ? -sdLength 0)

    plotshape(hl and not na(sl), text="HL"title="Higher Low"style=shape.labelupdisplay display.none,
     
    color=neutCSStextcolor=color.blacklocation=location.belowbaroffset labelType == 'Repaint' ? -sdLength 0)

    plotshape(hh and not na(sh), text="HH"title="Higher High"style=shape.labeldowndisplay display.none,
     
    color=bullCSStextcolor=color.blacklocation=location.abovebaroffset labelType == 'Repaint' ? -sdLength 0)

    plotshape(lh and not na(sh), text="LH"title="Lower High"style=shape.labeldowndisplay display.none,
     
    color=neutCSStextcolor=color.blacklocation=location.abovebaroffset labelType == 'Repaint' ? -sdLength 0)


    barCSS trend45 == bullCSS
     
    trend45 == -bearCSS
     
    neutCSS


    barcolor
    (candleType != 'Fill Only' na
     
    barCSSeditable false)


    plotcandle(openhighlowclosetitle 'Price Action Candles',
     
    color barCSSwickcolor barCSSbordercolor barCSS,
     
    display candleType == 'Entire Candle' display.all display.noneeditable false)



    // calculate mtf
    f_ltf_values(tf) =>
        var 
    int returnTrend na

        adjusted_timeframe 
    timeframe.in_seconds(tf) >= timeframe.in_seconds() ? '' tf
        
    [ltf_shltf_slltf_pshltf_pslltf_cshltf_cslltf_hhltf_lhltf_llltf_hlltf_trendltf_last_signal] = 
         
    request.security_lower_tf(syminfo.tickeridadjusted_timeframef_getSwingValues(sdLength0))

        if array.
    size(ltf_trend) > 0
            returnTrend 
    := array.last(ltf_trend)
        else
            
    returnTrend := 0

        returnTrend



    f_htf_values
    (tf) =>
        [
    htf_shhtf_slhtf_pshhtf_pslhtf_cshhtf_cslhtf_hhhtf_lhhtf_llhtf_hlhtf_trendhtf_last_signal] = 
         
    request.security(syminfo.tickeridtff_getSwingValues(sdLength1), lookahead barmerge.lookahead_on)

        
    htf_trend


    f_sametf_values
    () =>
        [
    sametf_shsametf_slsametf_pshsametf_pslsametf_cshsametf_cslsametf_hhsametf_lhsametf_llsametf_hlsametf_trendsametf_last_signal] =
         
    f_getSwingValues(sdLength0)

        
    sametf_trend


    var int mtf1_trend na
    var int mtf2_trend na
    var int mtf3_trend na
    var int mtf4_trend na
    var int mtf5_trend na

    if barstate.islast
        
    if use_mtf1
            
    if timeframe.in_seconds() == timeframe.in_seconds(mtf_1)
                
    mtf1_trend := f_sametf_values()
            else if 
    timeframe.in_seconds() > timeframe.in_seconds(mtf_1)
                
    mtf1_trend := f_ltf_values(mtf_1)
            else
                
    mtf1_trend := f_htf_values(mtf_1)

        if 
    use_mtf2
            
    if timeframe.in_seconds() == timeframe.in_seconds(mtf_2)
                
    mtf2_trend := f_sametf_values()
            else if 
    timeframe.in_seconds() > timeframe.in_seconds(mtf_2)
                
    mtf2_trend := f_ltf_values(mtf_2)
            else
                
    mtf2_trend := f_htf_values(mtf_2)

        if 
    use_mtf3
            
    if timeframe.in_seconds() == timeframe.in_seconds(mtf_3)
                
    mtf3_trend := f_sametf_values()
            else if 
    timeframe.in_seconds() > timeframe.in_seconds(mtf_3)
                
    mtf3_trend := f_ltf_values(mtf_3)
            else
                
    mtf3_trend := f_htf_values(mtf_3)

        if 
    use_mtf4
            
    if timeframe.in_seconds() == timeframe.in_seconds(mtf_4)
                
    mtf4_trend := f_sametf_values()
            else if 
    timeframe.in_seconds() > timeframe.in_seconds(mtf_4)
                
    mtf4_trend := f_ltf_values(mtf_4)
            else
                
    mtf4_trend := f_htf_values(mtf_4)

        if 
    use_mtf5
            
    if timeframe.in_seconds() == timeframe.in_seconds(mtf_5)
                
    mtf5_trend := f_sametf_values()
            else if 
    timeframe.in_seconds() > timeframe.in_seconds(mtf_5)
                
    mtf5_trend := f_ltf_values(mtf_5)
            else
                
    mtf5_trend := f_htf_values(mtf_5)




    // table
    if barstate.islast and useTrendTable
        
    var trendTable table.new(position position.bottom_rightcolumns 5rows 1border_width 1border_color color.blackframe_width 2frame_color color.black)
        
        if 
    use_mtf1
            table
    .cell(trendTable00text str.tostring(mtf_1), text_color color.black,
             
    bgcolor color.new(mtf1_trend == bullCSS mtf1_trend == -bearCSS neutCSS0))
            
        if 
    use_mtf2
            table
    .cell(trendTable10text str.tostring(mtf_2), text_color color.black,
             
    bgcolor color.new(mtf2_trend == bullCSS mtf2_trend == -bearCSS neutCSS0))

        if 
    use_mtf3
            table
    .cell(trendTable20text str.tostring(mtf_3), text_color color.black,
             
    bgcolor color.new(mtf3_trend == bullCSS mtf3_trend == -bearCSS neutCSS0))

        if 
    use_mtf4
            table
    .cell(trendTable30text str.tostring(mtf_4), text_color color.black,
             
    bgcolor color.new(mtf4_trend == bullCSS mtf4_trend == -bearCSS neutCSS0))

        if 
    use_mtf5
            table
    .cell(trendTable40text str.tostring(mtf_5), text_color color.black,
             
    bgcolor color.new(mtf5_trend == bullCSS mtf5_trend == -bearCSS neutCSS0))
    ///////////////////////////////////////// 
    Son düzenleme : @yörük@; 26-02-2024 saat: 23:15.
    Teknik olarak; yarına gebe olan bugünü yaşamalı ki, yarın, yaşanmış olsun.

Sayfa 28/36 İlkİlk ... 182627282930 ... 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
  •