Sayfa 197/272 İlkİlk ... 97147187195196197198199207247 ... SonSon
Arama sonucu : 2172 madde; 1,569 - 1,576 arası.

Konu: Tradingview

  1. https://tr.tradingview.com/v/vwUt3cEJ/ trend hesaplaması.....https://www.tradingview.com/x/RphIbUoL/

    https://tr.tradingview.com/v/hjJw9cqN/ trend hesaplaması.... https://www.tradingview.com/x/bwCd1qHV/

    https://tr.tradingview.com/v/g6Nyg5kS/ trend hesaplaması.....https://www.tradingview.com/x/lqDItsjW/

    üçünün kombine birleşmiş ve sade hali.....
    https://www.tradingview.com/x/8tAQCJz7/


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

    //@version=5

    // { <DECLARATION STATEMENT>

    indicator(title "Dodge Trend [JacobMagleby]"shorttitle "Dodge Trend [JacobMagleby] - Version 1.0.0"overlay truetimeframe "")

    // } <DECLARATION STATEMENT>



    // { <CONSTANT_DECLARATIONS>

    INDICATOR_GROUP "Indicator Settings"
    COLOR_GROUP     "Color Settings"
    COLOR_INLINE    "Color Inline"

    // } <CONSTANTS>



    // { <INPUTS>

    lengthInput     input.int(
     
    title          "Length",
      
    defval        5,
       
    minval       1,
         
    group      INDICATOR_GROUP,
          
    tooltip   "How Much Price Action To Take Into Consideration. Lower Values = More Reactive To Current Market Volatility.")

    sizeInput       input.float(
     
    title          "Size",
      
    defval        3.0,
       
    minval       0.1,
         
    step       0.1,
          
    group     INDICATOR_GROUP,
           
    tooltip  "How Wide The Gap Is From The Current Price To The Line When Flipping.")

    sourceInput     input.source(
     
    title          "Source",
      
    defval        hl2,
       
    group        INDICATOR_GROUP,
         
    tooltip    "Source For The Dodge Line")

    dodgeIntensity  input.float(
     
    title          "Dodge Intensity",
      
    defval        95.0,
       
    minval       0.0,
         
    maxval     99,
          
    step      0.1,   
           
    group    INDICATOR_GROUP,
             
    tooltip"How Intense/Aggressive The Dodge Effect Is. Anything Above 96 Will Get Very Intense. 95 Is Recommended Default. 0 Will Yield Almost No Dodge Effect.")

    upColorInput    input.color(
     
    title          "",
      
    defval        color.green,
       
    group        COLOR_GROUP,
         
    inline     COLOR_INLINE)

    downColorInput  input.color(
     
    title          "",
      
    defval        color.red,
       
    group        COLOR_GROUP,
         
    inline     COLOR_INLINE)

    // } <INPUTS>



    // { <USER DEFINED TYPES>

    type dodgeTrend
        int length
        float size
        float source
        color upColor
        color downColor
        float trueRangeAverage
        float referenceTop
        float referenceBottom
        float lowestReferenceTop
        float highestReferenceBottom
        float activeTop
        float activeBottom
        float combinedValue
        float direction
        color currentColor

    method updateDependencies
    (dodgeTrend self)=>
        
    trueRangeAverage      ta.sma(ta.trlengthInput)
        
    self.referenceTop    := sourceInput + (trueRangeAverage sizeInput)
        
    self.referenceBottom := sourceInput - (trueRangeAverage sizeInput)
        if 
    na(self.direction) and not na(self.referenceTop)
            
    self.direction              := 1
            self
    .activeTop              := na
            self
    .activeBottom           := self.referenceBottom
            self
    .combinedValue          := self.referenceBottom
            self
    .highestReferenceBottom := self.referenceBottom
            self
    .currentColor           := self.upColor
        self

    method updateActives
    (dodgeTrend self)=>
        
    self.lowestReferenceTop     := ta.change(self.direction) ? self.referenceTop :
                                       
    self.lowestReferenceTop
        self
    .highestReferenceBottom := ta.change(self.direction) ? self.referenceBottom :
                                       
    self.highestReferenceBottom
        self
    .activeTop              := self.direction == -and self.direction[1] == self.referenceTop :
                                       
    self.direction == and self.direction[1] == -na :
                                       
    self.activeTop
        self
    .activeBottom           := self.direction == and self.direction[1] == -self.referenceBottom :
                                       
    self.direction == -and self.direction[1] == na :
                                       
    self.activeBottom
                                       
        rPrevB   
    self.referenceBottom[1]
        
    rPrevBH  self.highestReferenceBottom
        rPrevT   
    self.referenceTop[1]
        
    rPrevTH  self.lowestReferenceTop
        pullback 
    .60 * (100 dodgeIntensity)
        
    recover  .40 * (100 dodgeIntensity)
        if 
    self.direction == 1
            self
    .highestReferenceBottom   := self.referenceBottom self.highestReferenceBottom self.referenceBottom :
                                             
    self.highestReferenceBottom
            self
    .activeBottom             := self.highestReferenceBottom rPrevBH self.activeBottom + (self.highestReferenceBottom rPrevBH) :
                                             
    self.referenceBottom rPrevB self.activeBottom - ((rPrevB self.referenceBottom) / pullback) :
                                             
    self.referenceBottom rPrevB self.activeBottom + ((self.referenceBottom rPrevB) / recover) :
                                             
    self.activeBottom
            self
    .combinedValue            := self.activeBottom
            self
    .direction                := close self.activeBottom ? -:
                                             
    self.direction
            self
    .currentColor             := self.upColor

        
    else
            
    self.lowestReferenceTop := self.referenceTop self.lowestReferenceTop self.referenceTop :
                                       
    self.lowestReferenceTop
            self
    .activeTop          := self.lowestReferenceTop rPrevTH self.activeTop - (rPrevTH self.lowestReferenceTop) :
                                       
    self.referenceTop rPrevT self.activeTop + ((self.referenceTop rPrevT) / pullback) :
                                       
    self.referenceTop rPrevT self.activeTop - ((rPrevT self.referenceTop) / recover) :
                                       
    self.activeTop
            self
    .combinedValue      := self.activeTop
            self
    .direction          := close self.activeTop :
                                       
    self.direction
            self
    .currentColor       := self.downColor
        self

    method run
    (dodgeTrend self)=>
        
    self.updateDependencies()
        
    self.updateActives()
        
    self

    // } <USER DEFINED TYPES>



    // { <CALCULATIONS>

    var dodgeTrend dodgeTrend.new(
     
    length         lengthInput,
      
    size          sizeInput,
       
    source       sourceInput,
         
    upColor    upColorInput,
          
    downColor downColorInput)

    dodgeTrend.run()

    // } <CALCULATIONS>



    // { <VISUALS>

    topBoundry dodgeTrend.combinedValue + (ta.atr(1000) / 3)
    botBoundry dodgeTrend.combinedValue - (ta.atr(1000) / 3)
    invisible  color.new(color.white100)
    //topBoundryPlot = plot(topBoundry, color = invisible, editable = false)
    //botBoundryPlot = plot(botBoundry, color = invisible, editable = false)
    centerBoundryPlot plot(dodgeTrend.combinedValue"Dodge Trend"dodgeTrend.currentColor2)
    //fill(topBoundryPlot, centerBoundryPlot, topBoundry, dodgeTrend.combinedValue, invisible, color.new(dodgeTrend.currentColor, 75))
    //fill(centerBoundryPlot, botBoundryPlot, dodgeTrend.combinedValue, botBoundry, color.new(dodgeTrend.currentColor, 75), invisible)

    // } <VISUALS>



    // { <ALERTS>

    alertcondition(
     
    condition dodgeTrend.direction == and dodgeTrend.direction[1] == -1,
      
    title "Dodge Trend Flips Up")

    alertcondition(
     
    condition dodgeTrend.direction == -and dodgeTrend.direction[1] == 1,
      
    title "Dodge Trend Flips Down")

    // } <ALERTS>
    /////////////////////////////////////////////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © justatradebro

    //@version=5

    ima_color input.color(color.orangetitle 'IMA Color')
    trail_color_up input.color(color.rgb(761757970), title 'Trail Up')
    trail_color_down input.color(color.rgb(255828270), title 'Trail Down')
    //candle_color_up = input.color(color.green, title = 'Candle Up')
    //candle_color_down = input.color(color.red, title = 'Candle Down')

    // IMA Calculation
    length 5  // Length parameter for IMA calculation
    ph 0.0
    pl 
    0.0
    alpha 
    2.5 / (length 1)
    ima 0.0
    ima 
    := alpha ohlc4[1] + (alpha) * nz(ima[1])

    p1 plot(imacolor=ima_colorlinewidth=2title="Instantaneous Moving Average")

    lowest_low ta.lowest(low[1], 5)
    highest_high ta.highest(high[1], 5)
    avg_low ta.sma(low[1], 5)
    avg_high ta.sma(high[1], 5)

    // Trailing stop
    0.0
    0.0
    0.0
    0.0
    0.0
    0.0
    trail 
    0.0

    if bar_index and nz(a[1]) == 1
        b 
    := math.max(lowest_lownz(b[1]))
        
    := avg_high nz(b[1]) and close low[1] ? nz(z[1])
        
    := avg_high nz(b[1]) and close low[1] ? nz(a[1])
        
    := avg_high nz(b[1]) and close low[1] ? highest_high nz(c[1])
    else if 
    nz(a[1]) == 0
        c 
    := math.min(highest_highnz(c[1]))
        
    := avg_low nz(c[1]) and close high[1] ? nz(z[1])
        
    := avg_low nz(c[1]) and close high[1] ? nz(a[1])
        
    := avg_low nz(c[1]) and close high[1] ? lowest_low nz(b[1])
    else
        
    := nz(b[1])
        
    := nz(z[1])
        
    := nz(a[1])
        
    := nz(c[1])

    if 
    == 0
        l 
    := nz(z[1]) != nz(s[1]) : math.max(nz(b[1]), nz(l[1]))
        
    := 0
    else if nz(z[1]) != 1
        s 
    := nz(l[1])
        
    := 0
    else if == 1
        s 
    := math.min(cnz(s[1]))
        
    := nz(l[1])
    else
        
    := nz(l[1])
        
    := nz(s[1])

    if 
    0
        trail 
    := l
    else
        
    trail := s

    trail_color_cond 
    ima trail trail_color_down trail_color_up
    //candle_color_cond = ohlc4 < trail ? candle_color_down : candle_color_up

    //p2 = plot(trail, color=trail_color_cond, title = "Trail")

    //plotcandle(open,high,low,close, color=candle_color_cond, wickcolor=candle_color_cond, bordercolor = candle_color_cond)

    //fill(plot1=p1, plot2=p2, color=trail_color_cond)
    //////////////////////////////////////////////////////////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © TZack88

    //@version=5

    // ** ---> Inputs ------------- {
    var bool positive       false
    var bool negative       false
    string RSI_group        
    "RSI Settings"
    string mom_group        "Momentum Vales"
    string visual           "Visuals" 
    int Len2                input(14,"RSI 1️⃣",inline "rsi",group RSI_group)
    int pmom                input(65," Positive above",inline "rsi1",group =RSI_group )
    int nmom                input(32,"Negative below",inline "rsi1",group =RSI_group )
    bool showlabels         input(true,"Show Momentum ❓",inline "001",group =visual )
    color p                 input(color.rgb(761757962),"Positive",inline "001",group =visual )
    color n                 input(color.rgb(255828266),"Negative",inline "001",group =visual )
    bool filleshow          input(true,"Show highlighter ❓",inline "002",group =visual )
    color bull              input(color.rgb(761757962),"Bull",inline "002",group =visual )
    color bear              input(color.rgb(255828266),"Bear",inline "002",group =visual )
    rsi                     ta.rsi(closeLen2)
    //------------------- }

    // ** ---> Momentums ------------- {

    p_mom               rsi[1] < pmom and rsi pmom and rsi nmom and ta.change(ta.ema(close,5)) > 0
    n_mom               
    rsi nmom and ta.change(ta.ema(close,5)) < 0
    if p_mom
        positive
    := true
        negative
    := false

    if n_mom
        positive
    := false
        negative
    := true     

    // ** ---> Entry Conditions ------------- {

    a11 plot(filleshow ta.ema(high,5) : na,display display.none,editable false)
    b11 plot(filleshow ta.ema(low,10) : na,style plot.style_stepline,color color.red,display display.none,editable false)

    // fill(a,b,color = color.from_gradient(rsi14,35,pmom,color.rgb(255, 82, 82, 66),color.rgb(76, 175, 79, 64)) )
    fill(a11,b11,color positive bull :bear ,editable false)

    //plotting 
    pcondition positive and not positive[1]
    ncondition2 negative and not negative[1]
    plotshape(showlabels pconditionna title="Positive Signal",style=shape.labelupcolor=plocationlocation.belowbar size=size.tiny,text"Positive",textcolor color.white)
    plotshape(showlabels ncondition2na title="Negative Signal",style=shape.labeldowncolor=nlocationlocation.abovebar size=size.tiny,text "Negative",textcolor color.white)
    // Alerts
    alertcondition(pcondition,"Positive Trend")
    alertcondition(ncondition2,"Negative Trend"
    Teknik olarak; yarına gebe olan bugünü yaşamalı ki, yarın, yaşanmış olsun.

  2. https://tr.tradingview.com/v/fOYvs9sf/
    bu fibo çalışması çok güzel....
    kendi otomatik....

    benim beğendiğim ise....
    1569 nolu mesajda derlediğimiz trend....

    içinden istediğim...veriyi alıp....işlemek....

    örnekte...
    ima verisine göre hesapladı...ve longta....
    https://www.tradingview.com/x/0YKYl026/

    bu örnekte ise longu...ima verisine göre....
    shortu....tr verisine göre işleyip....
    long-short açtığı gibi.....
    otomatik... bu verilere göre fibo hesaplıyor....



    fibo ile strateji kuranlar bu kodu kurcalamalı....
    en sade böyle....https://www.tradingview.com/x/qac2D9XN/
    Teknik olarak; yarına gebe olan bugünü yaşamalı ki, yarın, yaşanmış olsun.

  3.  Alıntı Originally Posted by @yörük@ Yazıyı Oku
    https://tr.tradingview.com/v/vwUt3cEJ/ trend hesaplaması.....https://www.tradingview.com/x/RphIbUoL/

    https://tr.tradingview.com/v/hjJw9cqN/ trend hesaplaması.... https://www.tradingview.com/x/bwCd1qHV/

    https://tr.tradingview.com/v/g6Nyg5kS/ trend hesaplaması.....https://www.tradingview.com/x/lqDItsjW/

    üçünün kombine birleşmiş ve sade hali.....
    https://www.tradingview.com/x/8tAQCJz7/


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

    //@version=5

    // { <DECLARATION STATEMENT>

    indicator(title "Dodge Trend [JacobMagleby]"shorttitle "Dodge Trend [JacobMagleby] - Version 1.0.0"overlay truetimeframe "")

    // } <DECLARATION STATEMENT>



    // { <CONSTANT_DECLARATIONS>

    INDICATOR_GROUP "Indicator Settings"
    COLOR_GROUP     "Color Settings"
    COLOR_INLINE    "Color Inline"

    // } <CONSTANTS>



    // { <INPUTS>

    lengthInput     input.int(
     
    title          "Length",
      
    defval        5,
       
    minval       1,
         
    group      INDICATOR_GROUP,
          
    tooltip   "How Much Price Action To Take Into Consideration. Lower Values = More Reactive To Current Market Volatility.")

    sizeInput       input.float(
     
    title          "Size",
      
    defval        3.0,
       
    minval       0.1,
         
    step       0.1,
          
    group     INDICATOR_GROUP,
           
    tooltip  "How Wide The Gap Is From The Current Price To The Line When Flipping.")

    sourceInput     input.source(
     
    title          "Source",
      
    defval        hl2,
       
    group        INDICATOR_GROUP,
         
    tooltip    "Source For The Dodge Line")

    dodgeIntensity  input.float(
     
    title          "Dodge Intensity",
      
    defval        95.0,
       
    minval       0.0,
         
    maxval     99,
          
    step      0.1,   
           
    group    INDICATOR_GROUP,
             
    tooltip"How Intense/Aggressive The Dodge Effect Is. Anything Above 96 Will Get Very Intense. 95 Is Recommended Default. 0 Will Yield Almost No Dodge Effect.")

    upColorInput    input.color(
     
    title          "",
      
    defval        color.green,
       
    group        COLOR_GROUP,
         
    inline     COLOR_INLINE)

    downColorInput  input.color(
     
    title          "",
      
    defval        color.red,
       
    group        COLOR_GROUP,
         
    inline     COLOR_INLINE)

    // } <INPUTS>



    // { <USER DEFINED TYPES>

    type dodgeTrend
        int length
        float size
        float source
        color upColor
        color downColor
        float trueRangeAverage
        float referenceTop
        float referenceBottom
        float lowestReferenceTop
        float highestReferenceBottom
        float activeTop
        float activeBottom
        float combinedValue
        float direction
        color currentColor

    method updateDependencies
    (dodgeTrend self)=>
        
    trueRangeAverage      ta.sma(ta.trlengthInput)
        
    self.referenceTop    := sourceInput + (trueRangeAverage sizeInput)
        
    self.referenceBottom := sourceInput - (trueRangeAverage sizeInput)
        if 
    na(self.direction) and not na(self.referenceTop)
            
    self.direction              := 1
            self
    .activeTop              := na
            self
    .activeBottom           := self.referenceBottom
            self
    .combinedValue          := self.referenceBottom
            self
    .highestReferenceBottom := self.referenceBottom
            self
    .currentColor           := self.upColor
        self

    method updateActives
    (dodgeTrend self)=>
        
    self.lowestReferenceTop     := ta.change(self.direction) ? self.referenceTop :
                                       
    self.lowestReferenceTop
        self
    .highestReferenceBottom := ta.change(self.direction) ? self.referenceBottom :
                                       
    self.highestReferenceBottom
        self
    .activeTop              := self.direction == -and self.direction[1] == self.referenceTop :
                                       
    self.direction == and self.direction[1] == -na :
                                       
    self.activeTop
        self
    .activeBottom           := self.direction == and self.direction[1] == -self.referenceBottom :
                                       
    self.direction == -and self.direction[1] == na :
                                       
    self.activeBottom
                                       
        rPrevB   
    self.referenceBottom[1]
        
    rPrevBH  self.highestReferenceBottom
        rPrevT   
    self.referenceTop[1]
        
    rPrevTH  self.lowestReferenceTop
        pullback 
    .60 * (100 dodgeIntensity)
        
    recover  .40 * (100 dodgeIntensity)
        if 
    self.direction == 1
            self
    .highestReferenceBottom   := self.referenceBottom self.highestReferenceBottom self.referenceBottom :
                                             
    self.highestReferenceBottom
            self
    .activeBottom             := self.highestReferenceBottom rPrevBH self.activeBottom + (self.highestReferenceBottom rPrevBH) :
                                             
    self.referenceBottom rPrevB self.activeBottom - ((rPrevB self.referenceBottom) / pullback) :
                                             
    self.referenceBottom rPrevB self.activeBottom + ((self.referenceBottom rPrevB) / recover) :
                                             
    self.activeBottom
            self
    .combinedValue            := self.activeBottom
            self
    .direction                := close self.activeBottom ? -:
                                             
    self.direction
            self
    .currentColor             := self.upColor

        
    else
            
    self.lowestReferenceTop := self.referenceTop self.lowestReferenceTop self.referenceTop :
                                       
    self.lowestReferenceTop
            self
    .activeTop          := self.lowestReferenceTop rPrevTH self.activeTop - (rPrevTH self.lowestReferenceTop) :
                                       
    self.referenceTop rPrevT self.activeTop + ((self.referenceTop rPrevT) / pullback) :
                                       
    self.referenceTop rPrevT self.activeTop - ((rPrevT self.referenceTop) / recover) :
                                       
    self.activeTop
            self
    .combinedValue      := self.activeTop
            self
    .direction          := close self.activeTop :
                                       
    self.direction
            self
    .currentColor       := self.downColor
        self

    method run
    (dodgeTrend self)=>
        
    self.updateDependencies()
        
    self.updateActives()
        
    self

    // } <USER DEFINED TYPES>



    // { <CALCULATIONS>

    var dodgeTrend dodgeTrend.new(
     
    length         lengthInput,
      
    size          sizeInput,
       
    source       sourceInput,
         
    upColor    upColorInput,
          
    downColor downColorInput)

    dodgeTrend.run()

    // } <CALCULATIONS>



    // { <VISUALS>

    topBoundry dodgeTrend.combinedValue + (ta.atr(1000) / 3)
    botBoundry dodgeTrend.combinedValue - (ta.atr(1000) / 3)
    invisible  color.new(color.white100)
    //topBoundryPlot = plot(topBoundry, color = invisible, editable = false)
    //botBoundryPlot = plot(botBoundry, color = invisible, editable = false)
    centerBoundryPlot plot(dodgeTrend.combinedValue"Dodge Trend"dodgeTrend.currentColor2)
    //fill(topBoundryPlot, centerBoundryPlot, topBoundry, dodgeTrend.combinedValue, invisible, color.new(dodgeTrend.currentColor, 75))
    //fill(centerBoundryPlot, botBoundryPlot, dodgeTrend.combinedValue, botBoundry, color.new(dodgeTrend.currentColor, 75), invisible)

    // } <VISUALS>



    // { <ALERTS>

    alertcondition(
     
    condition dodgeTrend.direction == and dodgeTrend.direction[1] == -1,
      
    title "Dodge Trend Flips Up")

    alertcondition(
     
    condition dodgeTrend.direction == -and dodgeTrend.direction[1] == 1,
      
    title "Dodge Trend Flips Down")

    // } <ALERTS>
    /////////////////////////////////////////////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © justatradebro

    //@version=5

    ima_color input.color(color.orangetitle 'IMA Color')
    trail_color_up input.color(color.rgb(761757970), title 'Trail Up')
    trail_color_down input.color(color.rgb(255828270), title 'Trail Down')
    //candle_color_up = input.color(color.green, title = 'Candle Up')
    //candle_color_down = input.color(color.red, title = 'Candle Down')

    // IMA Calculation
    length 5  // Length parameter for IMA calculation
    ph 0.0
    pl 
    0.0
    alpha 
    2.5 / (length 1)
    ima 0.0
    ima 
    := alpha ohlc4[1] + (alpha) * nz(ima[1])

    p1 plot(imacolor=ima_colorlinewidth=2title="Instantaneous Moving Average")

    lowest_low ta.lowest(low[1], 5)
    highest_high ta.highest(high[1], 5)
    avg_low ta.sma(low[1], 5)
    avg_high ta.sma(high[1], 5)

    // Trailing stop
    0.0
    0.0
    0.0
    0.0
    0.0
    0.0
    trail 
    0.0

    if bar_index and nz(a[1]) == 1
        b 
    := math.max(lowest_lownz(b[1]))
        
    := avg_high nz(b[1]) and close low[1] ? nz(z[1])
        
    := avg_high nz(b[1]) and close low[1] ? nz(a[1])
        
    := avg_high nz(b[1]) and close low[1] ? highest_high nz(c[1])
    else if 
    nz(a[1]) == 0
        c 
    := math.min(highest_highnz(c[1]))
        
    := avg_low nz(c[1]) and close high[1] ? nz(z[1])
        
    := avg_low nz(c[1]) and close high[1] ? nz(a[1])
        
    := avg_low nz(c[1]) and close high[1] ? lowest_low nz(b[1])
    else
        
    := nz(b[1])
        
    := nz(z[1])
        
    := nz(a[1])
        
    := nz(c[1])

    if 
    == 0
        l 
    := nz(z[1]) != nz(s[1]) : math.max(nz(b[1]), nz(l[1]))
        
    := 0
    else if nz(z[1]) != 1
        s 
    := nz(l[1])
        
    := 0
    else if == 1
        s 
    := math.min(cnz(s[1]))
        
    := nz(l[1])
    else
        
    := nz(l[1])
        
    := nz(s[1])

    if 
    0
        trail 
    := l
    else
        
    trail := s

    trail_color_cond 
    ima trail trail_color_down trail_color_up
    //candle_color_cond = ohlc4 < trail ? candle_color_down : candle_color_up

    //p2 = plot(trail, color=trail_color_cond, title = "Trail")

    //plotcandle(open,high,low,close, color=candle_color_cond, wickcolor=candle_color_cond, bordercolor = candle_color_cond)

    //fill(plot1=p1, plot2=p2, color=trail_color_cond)
    //////////////////////////////////////////////////////////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © TZack88

    //@version=5

    // ** ---> Inputs ------------- {
    var bool positive       false
    var bool negative       false
    string RSI_group        
    "RSI Settings"
    string mom_group        "Momentum Vales"
    string visual           "Visuals" 
    int Len2                input(14,"RSI 1ï¸âƒ£",inline "rsi",group RSI_group)
    int pmom                input(65," Positive above",inline "rsi1",group =RSI_group )
    int nmom                input(32,"Negative below",inline "rsi1",group =RSI_group )
    bool showlabels         input(true,"Show Momentum â“",inline "001",group =visual )
    color p                 input(color.rgb(761757962),"Positive",inline "001",group =visual )
    color n                 input(color.rgb(255828266),"Negative",inline "001",group =visual )
    bool filleshow          input(true,"Show highlighter â“",inline "002",group =visual )
    color bull              input(color.rgb(761757962),"Bull",inline "002",group =visual )
    color bear              input(color.rgb(255828266),"Bear",inline "002",group =visual )
    rsi                     ta.rsi(closeLen2)
    //------------------- }

    // ** ---> Momentums ------------- {

    p_mom               rsi[1] < pmom and rsi pmom and rsi nmom and ta.change(ta.ema(close,5)) > 0
    n_mom               
    rsi nmom and ta.change(ta.ema(close,5)) < 0
    if p_mom
        positive
    := true
        negative
    := false

    if n_mom
        positive
    := false
        negative
    := true     

    // ** ---> Entry Conditions ------------- {

    a11 plot(filleshow ta.ema(high,5) : na,display display.none,editable false)
    b11 plot(filleshow ta.ema(low,10) : na,style plot.style_stepline,color color.red,display display.none,editable false)

    // fill(a,b,color = color.from_gradient(rsi14,35,pmom,color.rgb(255, 82, 82, 66),color.rgb(76, 175, 79, 64)) )
    fill(a11,b11,color positive bull :bear ,editable false)

    //plotting 
    pcondition positive and not positive[1]
    ncondition2 negative and not negative[1]
    plotshape(showlabels pconditionna title="Positive Signal",style=shape.labelupcolor=plocationlocation.belowbar size=size.tiny,text"Positive",textcolor color.white)
    plotshape(showlabels ncondition2na title="Negative Signal",style=shape.labeldowncolor=nlocationlocation.abovebar size=size.tiny,text "Negative",textcolor color.white)
    // Alerts
    alertcondition(pcondition,"Positive Trend")
    alertcondition(ncondition2,"Negative Trend"
    buna....https://tr.tradingview.com/v/XrvyQSzH/ bu kodun sadece kırılımı eklenirse...
    görüntü....
    https://www.tradingview.com/x/fmBxUOLa/
    Teknik olarak; yarına gebe olan bugünü yaşamalı ki, yarın, yaşanmış olsun.

  4. https://tr.tradingview.com/v/bO3SyHtK/
    kodu ekliyoz....uzunluğu 5 yapıp... trende göre bar renklendir diyoruz....
    https://www.tradingview.com/x/7jjIvAlq/

    grafiğin üstüne taşıyınca...
    https://www.tradingview.com/x/l8nTeqNK/

    gerçekten adı gibi oluyor.....
    Teknik olarak; yarına gebe olan bugünü yaşamalı ki, yarın, yaşanmış olsun.


  5. https://tr.tradingview.com/v/AP50fvlX/

    https://tr.tradingview.com/v/nMkQmtsu/

    bu iki kodda...10 atr ile trend hesaplaması yapıyor....
    https://www.tradingview.com/x/kRQCCI8t/

    biri tableli...diğeri değil....

    birinin üzerinden combine derleme ...

    https://tr.tradingview.com/v/zFk8Fpr3/ bunu ekleyelim....

    eklenmiş görüntü....https://www.tradingview.com/x/XT29Qy9k/

    PHP Code:
      //@version=5
    indicator(title "Farzan Paid Caliburn",  precision=2overlay true)

    bull1 input(color.green"Regular"group="Bullish Colors"inline="Bullish Colors")
    bull2 input(color.green"Outside"group="Bullish Colors"inline="Bullish Colors")
    mid1 input(color.green,  "Inside"group="Bullish Colors"inline="Bullish Colors")

    bear1 input(color.red,  "Regular"group="Bearish Colors"inline="Bearish Colors")
    bear2 input(color.red"Outside",  group="Bearish Colors"inline="Bearish Colors")
    mid2 input(color.red,    "Inside"group="Bearish Colors"inline="Bearish Colors")


    inside high high[1] and low low[1]
    outside high high[1] and low low[1]
    bull close open
    bear 
    open close

    candlecol 
    bull? (insidemid1 outsidebull2 bull1) : bear? (insidemid2 outsidebear2 bear1) : color.gray

    bodycol 
    color.new(candlecol00)

    //plotcandle(open,high,low,close, color = bodycol, bordercolor = candlecol, wickcolor = candlecol)

    atrPeriod input(10"ATR Length")
    factor input.float(3.0"Factor"step 0.01)

    [
    supertrenddirection] = ta.supertrend(factoratrPeriod)

    bodyMiddle plot((open close) / 2display=display.none)
    upTrend plot(direction supertrend na"Up Trend"color color.greenstyle=plot.style_linebr)
    downTrend plot(direction 0na supertrend"Down Trend"color color.redstyle=plot.style_linebr)

    //fill(bodyMiddle, upTrend, color.new(color.green, 90), fillgaps=false)
    //fill(bodyMiddle, downTrend, color.new(color.red, 90), fillgaps=false)
    ///////////////////////////////////
    //@version=5

    // Define input variables
    emaLength input.int(5minval=1title='EMA Length')
    rsiLength input.int(14minval=1title='RSI Length')
    rsiOverbought input(80title='RSI Overbought Level')
    rsiOversold input(20title='RSI Oversold Level')

    start input.float(title='Start'step=0.001defval=0.05)
    increment input.float(title='Increment'step=0.001defval=0.075)
    maximum input.float(title='Maximum'step=0.01defval=0.35)
    width input.int(title='Point Width'minval=1defval=2)

    psar ta.sar(startincrementmaximum)
    dir psar close : -1

    psarColor 
    dir == #3388bb : #fdcc02
    //psarPlot = plot(psar, title='PSAR', style=plot.style_circles, linewidth=width, color=color.new(psarColor,0))


    // Calculate EMA
    emaValue ta.ema(closeemaLength)

    // Calculate RSI
    rsiValue ta.rsi(closersiLength)

    // Define variables
    var bool strongLongSignal false
    var bool strongShortSignal false
    highlightState 
    input(title='Highlight State ?'defval=true)
    src input(closetitle='Source')

    // Plotting
    //plot(rsiValue, title='RSI', color=color.new(color.red, 0))

    // Determine long and short signals based on conditions
    strongLongSignal := high[1] < emaValue[1] and high high[1] and rsiValue rsiOversold and rsiValue rsiValue[1]
    longSignal strongLongSignal
    strongShortSignal 
    := low[1] > emaValue[1] and low low[1] and rsiValue rsiOverbought and rsiValue rsiValue[1]
    shortSignal strongShortSignal

    // Buy Signal as per PSR
    buySignalPSR dir == and dir[1] == -1
    sellSignalPSR 
    dir == -and dir[1] == 1


    //5-8-13 Signal
    len5 input.int(5minval=1title='5EMA')
    out5 ta.ema(srclen5)
    emaValue5 ta.ema(closelen5)

    len8 input.int(8minval=1title='8EMA')
    out8 ta.ema(srclen8)
    emaValue8 ta.ema(closelen8)

    len13 input.int(13minval=1title='13EMA')
    out13 ta.ema(srclen13)
    emaValue13 ta.ema(closelen13)

    //Plot 5-8-13 EMA on Chart
    //plot(out5, title='EMA5', color=color.new(color.red, 0), linewidth=1)
    //plot(out8, title='EMA8', color=color.new(color.blue, 0), linewidth=1)
    //plot(out13, title='EMA13', color=color.new(color.green, 0), linewidth=1)

    // 5-8-13 EMA Buy Sell Signals Calculation
    long5813 = ((ta.crossover(emaValue5emaValue8) or emaValue5 emaValue8) and
               (
    ta.crossover(emaValue5emaValue13) or emaValue5 emaValue13) and 
               (
    buySignalPSR or dir == 1) and close close[1] and
               
    close emaValue5 and close emaValue8 and close emaValue13)


    short5813 = (((ta.crossunder(emaValue5emaValue8) or emaValue5 emaValue8) and
                  (
    ta.crossunder(emaValue5emaValue13) or emaValue5 emaValue13)) and
                 (
    sellSignalPSR or dir == -1) and close close[1] and
                 
    close emaValue5 and close emaValue8 and close emaValue13)



    //Recheck Quick Buy and Sell Signals before plotting
    if short5813
        longSignal 
    := false

    if long5813
        shortSignal 
    := false

    // Plot long and short signals 
    plotshape(not longSignal[1] ? longSignal nacolor=color.new(color.green0), style=shape.arrowuptext='QB'title='Quick Buy'location=location.belowbar)
    plotshape(not long5813[1] ? long5813 natitle='Strong Buy'color=color.new(color.green0), style=shape.triangleuptext='SB',location =location.belowbar)
    plotshape(not shortSignal[1] ? shortSignal nacolor=color.new(color.red0), style=shape.arrowdowntext='QS',title='Quick Sell'location=location.abovebartextcolor=color.new(color.red,0))
    plotshape(not short5813[1] ? short5813 natitle='Strong Sell'color=color.new(color.red0), style=shape.triangledowntext='SS'location=location.abovebar,textcolor=color.new(color.red,0))

    midPricePlot plot(ohlc4title='PSAR Plot'display=display.none)
    fillColor highlightState dir == color.green color.red na
    //fill(midPricePlot, psarPlot, title='Trade State Filling', color=color.new(fillColor,90))

    alertcondition(not longSignal[1] ? longSignal na'Scalp Buy Signal''Scalp Buy/Long')
    alertcondition(not long5813[1] ? long5813 na'Strong Buy Signal''Buy/Long')
    alertcondition(not shortSignal[1] ? shortSignal na'Scalp Sell Signal''Scalp Sell/Short')
    alertcondition(not short5813[1] ? short5813 na'Strong Sell Signal''Sell/Short'

    https://tr.tradingview.com/v/gThgCf69/ belki bu eklenebilir gibi....
    https://www.tradingview.com/x/YFGR0Oec/

    https://tr.tradingview.com/v/Cc7xGmYO/ bunda bar renklendirme olunca...
    ve yaklaşık olarak supertrendle aynı değerler söz konusu olunca.....

    böyle daha mantıklı gibi.....

    PHP Code:
      // This source code is subject to these terms:
    // Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
    // https://creativecommons.org/licenses/by-nc/4.0/
    // You are free to Share, copy and redistribute. Adapt, transform and re-build on this script.
    // Under the following terms: Non-commercial & Attribution.
    // © gu5tavo71 (Gustavo Cardelle)

    //@version=5
    VERSION                  'v1.4.42'
    indicator(
      
    'Donchian Channels [Gu5]',
      
    shorttitle             'DC ' VERSION,
      
    overlay                true,
      
    explicit_plot_zorder   true)

    // Donchian Channels developed by Richard Donchian
    // Actual Study Version: @gu5tavo71
    // 2023.05.12
    // Project #687
    // This script reuses open source code from another authors:
    // @PineCoders, Built-in Library, and Community Scripts
    // Disclaimer: I am not a financial advisor.
    //             For purpose educate only. Use at your own risk.


    //#region ——————————— <constant_declarations> {
    //<my colors>
    C_GREEN      =                   #006400    //Green
    C_GREENLIGHT =                   #388e3c    //Green Light
    C_RED        =                   #8B0000    //Red
    C_REDLIGHT   =                   #b71c1c    //Red Light
    //#endregion }
    //#region ——————————— <inputs> {
    i_dcLen      input.int       (20,        'Length'                        minval 1)
    //Display
    G_DISPLAY    'Display'
    i_showBasis  input.bool      (true,      '■ Basis On/Off'                group   G_DISPLAY)
    i_alertOn    input.bool      (false,     '■ Alert On/Off'                group   G_DISPLAY)
    i_showFill   input.bool      (false,     '■ Fill On/Off'                 group   G_DISPLAY)
    i_showBarCol input.bool      (true,      '■ Bar Color On/Off'            group   G_DISPLAY)
    i_showClose  input.bool      (false,     '■ Close Alert On/Off'          group   G_DISPLAY)
    //#endregion }
    //#region ——————————— <calculations> {
    //<set initial values>
    condition    0.0
    dc           
    0.0
    dcDirCond    
    0.0
    dcTopDir     
    0.0
    dcBotDir     
    0.0

    dcTop        
    ta.highest(i_dcLen)
    dcBot        ta.lowest (i_dcLen)
    dcBasis      math.avg(dcTopdcBot)

    dc          := dc[1] !=  and dcTop dcTop[1] ?  :
                   
    dc[1] != -and dcBot dcBot[1] ? -nz(dc[1])

    dcDirUp      dcTop dcTop[1]
    dcDirDn      dcBot dcBot[1]
    dcDirZero    ta.crossunder(closedcBasis) or ta.crossover(closedcBasis)
    dcDirCond   := dcDirCond[1] !=  and dcDirUp   ?  :
                   
    dcDirCond[1] != -and dcDirDn   ? -:
                   
    dcDirCond[1] !=  and dcDirZero ?  nz(dcDirCond[1])
    dcDir        dcDirCond == :
                   
    dc        == : -1
    dcTopDir    
    := dcTop dcTop[1] ?  :
                   
    dcTop dcTop[1] ?  nz(dcTopDir[1])
    dcBotDir    := dcBot dcBot[1] ?  :
                   
    dcBot dcBot[1] ? -nz(dcBotDir[1])
    dcRange      dcTopDir == and dcBotDir == 0
    //<rules>
    longErule    dcTop dcTop[1]
    shortErule   dcBot dcBot[1]
    longXrule    i_showClose ta.crossunder(closedcBasis) : false
    shortXrule   
    i_showClose ta.crossover (closedcBasis) : false
    //<conditions>
    condition   := condition[1] !=  and longErule  ?  :
                   
    condition[1] != -and shortErule ? -:
                   
    condition[1] !=  and longXrule  ?  :
                   
    condition[1] !=  and shortXrule ?  nz(condition[1])
    longE        condition[1] !=  and condition ==  1
    shortE       
    condition[1] != -and condition == -1
    longX        
    condition[1] ==  and longXrule
    shortX       
    condition[1] == -and shortXrule

    // <color>
    c_range      dcRange or condition ==  0
    c_dcTop      
    c_range                           color.new(color.gray,   75) :
                   
    condition ==  1                   color.new(color.green,   0) :
                   
    condition ==  0                   color.new(color.orange,  0) :
                   
    dcRange                           color.new(color.orange,  0) :
                   
    color.new(color.gray,   75)
    c_dcBot      c_range                           color.new(color.gray,   75) :
                   
    condition == -1                   color.new(color.red,     0) :
                   
    condition ==  0                   color.new(color.orange,  0) :
                   
    color.new(color.gray,   75)
    c_dcBasis    dcRange                           color.new(color.orange,  0) :
                   
    dc ==  1                          color.new(color.green,  25) :
                   
    dc == -1                          color.new(color.red,    25) : na
    c_dcFill     
    dcRange                           color.new(color.orange80) :
                   
    dc ==  1                          color.new(color.green,  80) :
                   
    dc == -1                          color.new(color.red,    80) : na
    c_barCol     
    c_range         and open <= close color.new(color.orange,  0) :
                   
    c_range         and open >  close color.new(color.yellow,  0) :
                   
    condition ==  and open <= close color.new(C_GREEN,       0) :
                   
    condition ==  and open >  close color.new(color.green,   0) :
                   
    condition == -and open >= close color.new(C_RED,         0) :
                   
    condition == -and open <  close color.new(color.red,     0) :
                   
    color.new(color.gray0)
    //#endregion }
    //#region ——————————— <visuals> {
    plot(
      
    i_showBasis dcBasis na,
      
    title      'Basis',
      
    linewidth  2,
      
    color      c_dcBasis)
      
    barcolor(i_showBarCol c_barCol na)
    //#endregion }
    ///////////////////////////////////
    //version=5

    // Define input variables
    emaLength input.int(5minval=1title='EMA Length')
    rsiLength input.int(14minval=1title='RSI Length')
    rsiOverbought input(80title='RSI Overbought Level')
    rsiOversold input(20title='RSI Oversold Level')

    start input.float(title='Start'step=0.001defval=0.05)
    increment input.float(title='Increment'step=0.001defval=0.075)
    maximum input.float(title='Maximum'step=0.01defval=0.35)
    width input.int(title='Point Width'minval=1defval=2)

    psar ta.sar(startincrementmaximum)
    dir psar close : -1

    psarColor 
    dir == #3388bb : #fdcc02
    //psarPlot = plot(psar, title='PSAR', style=plot.style_circles, linewidth=width, color=color.new(psarColor,0))


    // Calculate EMA
    emaValue ta.ema(closeemaLength)

    // Calculate RSI
    rsiValue ta.rsi(closersiLength)

    // Define variables
    var bool strongLongSignal false
    var bool strongShortSignal false
    highlightState 
    input(title='Highlight State ?'defval=true)
    src input(closetitle='Source')

    // Plotting
    //plot(rsiValue, title='RSI', color=color.new(color.red, 0))

    // Determine long and short signals based on conditions
    strongLongSignal := high[1] < emaValue[1] and high high[1] and rsiValue rsiOversold and rsiValue rsiValue[1]
    longSignal strongLongSignal
    strongShortSignal 
    := low[1] > emaValue[1] and low low[1] and rsiValue rsiOverbought and rsiValue rsiValue[1]
    shortSignal strongShortSignal

    // Buy Signal as per PSR
    buySignalPSR dir == and dir[1] == -1
    sellSignalPSR 
    dir == -and dir[1] == 1


    //5-8-13 Signal
    len5 input.int(5minval=1title='5EMA')
    out5 ta.ema(srclen5)
    emaValue5 ta.ema(closelen5)

    len8 input.int(8minval=1title='8EMA')
    out8 ta.ema(srclen8)
    emaValue8 ta.ema(closelen8)

    len13 input.int(13minval=1title='13EMA')
    out13 ta.ema(srclen13)
    emaValue13 ta.ema(closelen13)

    //Plot 5-8-13 EMA on Chart
    //plot(out5, title='EMA5', color=color.new(color.red, 0), linewidth=1)
    //plot(out8, title='EMA8', color=color.new(color.blue, 0), linewidth=1)
    //plot(out13, title='EMA13', color=color.new(color.green, 0), linewidth=1)

    // 5-8-13 EMA Buy Sell Signals Calculation
    long5813 = ((ta.crossover(emaValue5emaValue8) or emaValue5 emaValue8) and
               (
    ta.crossover(emaValue5emaValue13) or emaValue5 emaValue13) and 
               (
    buySignalPSR or dir == 1) and close close[1] and
               
    close emaValue5 and close emaValue8 and close emaValue13)


    short5813 = (((ta.crossunder(emaValue5emaValue8) or emaValue5 emaValue8) and
                  (
    ta.crossunder(emaValue5emaValue13) or emaValue5 emaValue13)) and
                 (
    sellSignalPSR or dir == -1) and close close[1] and
                 
    close emaValue5 and close emaValue8 and close emaValue13)



    //Recheck Quick Buy and Sell Signals before plotting
    if short5813
        longSignal 
    := false

    if long5813
        shortSignal 
    := false

    // Plot long and short signals 
    plotshape(not longSignal[1] ? longSignal nacolor=color.new(color.green0), style=shape.arrowuptext='QB'title='Quick Buy'location=location.belowbar)
    plotshape(not long5813[1] ? long5813 natitle='Strong Buy'color=color.new(color.green0), style=shape.triangleuptext='SB',location =location.belowbar)
    plotshape(not shortSignal[1] ? shortSignal nacolor=color.new(color.red0), style=shape.arrowdowntext='QS',title='Quick Sell'location=location.abovebartextcolor=color.new(color.red,0))
    plotshape(not short5813[1] ? short5813 natitle='Strong Sell'color=color.new(color.red0), style=shape.triangledowntext='SS'location=location.abovebar,textcolor=color.new(color.red,0))

    midPricePlot plot(ohlc4title='PSAR Plot'display=display.none)
    fillColor highlightState dir == color.green color.red na
    //fill(midPricePlot, psarPlot, title='Trade State Filling', color=color.new(fillColor,90))

    alertcondition(not longSignal[1] ? longSignal na'Scalp Buy Signal''Scalp Buy/Long')
    alertcondition(not long5813[1] ? long5813 na'Strong Buy Signal''Buy/Long')
    alertcondition(not shortSignal[1] ? shortSignal na'Scalp Sell Signal''Scalp Sell/Short')
    alertcondition(not short5813[1] ? short5813 na'Strong Sell Signal''Sell/Short')
    ////////////////////////// 

    https://www.tradingview.com/x/gddG1fOG/


    https://tr.tradingview.com/v/NKpGkblS/
    bu eklenince görüntü.... https://www.tradingview.com/x/doQXSm7b/

    PHP Code:
     // This source code is subject to these terms:
    // Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
    // https://creativecommons.org/licenses/by-nc/4.0/
    // You are free to Share, copy and redistribute. Adapt, transform and re-build on this script.
    // Under the following terms: Non-commercial & Attribution.
    // © gu5tavo71 (Gustavo Cardelle)

    //@version=5
    VERSION                  'v1.4.42'
    indicator(
      
    'Donchian Channels [Gu5]',
      
    shorttitle             'DC ' VERSION,
      
    overlay                true,
      
    explicit_plot_zorder   true,
      
    max_bars_back 5000)

    // Donchian Channels developed by Richard Donchian
    // Actual Study Version: @gu5tavo71
    // 2023.05.12
    // Project #687
    // This script reuses open source code from another authors:
    // @PineCoders, Built-in Library, and Community Scripts
    // Disclaimer: I am not a financial advisor.
    //             For purpose educate only. Use at your own risk.


    //#region ——————————— <constant_declarations> {
    //<my colors>
    C_GREEN      =                   #006400    //Green
    C_GREENLIGHT =                   #388e3c    //Green Light
    C_RED        =                   #8B0000    //Red
    C_REDLIGHT   =                   #b71c1c    //Red Light
    //#endregion }
    //#region ——————————— <inputs> {
    i_dcLen      input.int       (20,        'Length'                        minval 1)
    //Display
    G_DISPLAY    'Display'
    i_showBasis  input.bool      (true,      '■ Basis On/Off'                group   G_DISPLAY)
    i_alertOn    input.bool      (false,     '■ Alert On/Off'                group   G_DISPLAY)
    i_showFill   input.bool      (false,     '■ Fill On/Off'                 group   G_DISPLAY)
    i_showBarCol input.bool      (true,      '■ Bar Color On/Off'            group   G_DISPLAY)
    i_showClose  input.bool      (false,     '■ Close Alert On/Off'          group   G_DISPLAY)
    //#endregion }
    //#region ——————————— <calculations> {
    //<set initial values>
    condition    0.0
    dc           
    0.0
    dcDirCond    
    0.0
    dcTopDir     
    0.0
    dcBotDir     
    0.0

    dcTop        
    ta.highest(i_dcLen)
    dcBot        ta.lowest (i_dcLen)
    dcBasis      math.avg(dcTopdcBot)

    dc          := dc[1] !=  and dcTop dcTop[1] ?  :
                   
    dc[1] != -and dcBot dcBot[1] ? -nz(dc[1])

    dcDirUp      dcTop dcTop[1]
    dcDirDn      dcBot dcBot[1]
    dcDirZero    ta.crossunder(closedcBasis) or ta.crossover(closedcBasis)
    dcDirCond   := dcDirCond[1] !=  and dcDirUp   ?  :
                   
    dcDirCond[1] != -and dcDirDn   ? -:
                   
    dcDirCond[1] !=  and dcDirZero ?  nz(dcDirCond[1])
    dcDir        dcDirCond == :
                   
    dc        == : -1
    dcTopDir    
    := dcTop dcTop[1] ?  :
                   
    dcTop dcTop[1] ?  nz(dcTopDir[1])
    dcBotDir    := dcBot dcBot[1] ?  :
                   
    dcBot dcBot[1] ? -nz(dcBotDir[1])
    dcRange      dcTopDir == and dcBotDir == 0
    //<rules>
    longErule    dcTop dcTop[1]
    shortErule   dcBot dcBot[1]
    longXrule    i_showClose ta.crossunder(closedcBasis) : false
    shortXrule   
    i_showClose ta.crossover (closedcBasis) : false
    //<conditions>
    condition   := condition[1] !=  and longErule  ?  :
                   
    condition[1] != -and shortErule ? -:
                   
    condition[1] !=  and longXrule  ?  :
                   
    condition[1] !=  and shortXrule ?  nz(condition[1])
    longE        condition[1] !=  and condition ==  1
    shortE       
    condition[1] != -and condition == -1
    longX        
    condition[1] ==  and longXrule
    shortX       
    condition[1] == -and shortXrule

    // <color>
    c_range      dcRange or condition ==  0
    c_dcTop      
    c_range                           color.new(color.gray,   75) :
                   
    condition ==  1                   color.new(color.green,   0) :
                   
    condition ==  0                   color.new(color.orange,  0) :
                   
    dcRange                           color.new(color.orange,  0) :
                   
    color.new(color.gray,   75)
    c_dcBot      c_range                           color.new(color.gray,   75) :
                   
    condition == -1                   color.new(color.red,     0) :
                   
    condition ==  0                   color.new(color.orange,  0) :
                   
    color.new(color.gray,   75)
    c_dcBasis    dcRange                           color.new(color.orange,  0) :
                   
    dc ==  1                          color.new(color.green,  25) :
                   
    dc == -1                          color.new(color.red,    25) : na
    c_dcFill     
    dcRange                           color.new(color.orange80) :
                   
    dc ==  1                          color.new(color.green,  80) :
                   
    dc == -1                          color.new(color.red,    80) : na
    c_barCol     
    c_range         and open <= close color.new(color.orange,  0) :
                   
    c_range         and open >  close color.new(color.yellow,  0) :
                   
    condition ==  and open <= close color.new(C_GREEN,       0) :
                   
    condition ==  and open >  close color.new(color.green,   0) :
                   
    condition == -and open >= close color.new(C_RED,         0) :
                   
    condition == -and open <  close color.new(color.red,     0) :
                   
    color.new(color.gray0)
    //#endregion }
    //#region ——————————— <visuals> {
    plot(
      
    i_showBasis dcBasis na,
      
    title      'Basis',
      
    linewidth  2,
      
    color      c_dcBasis)
      
    barcolor(i_showBarCol c_barCol na)
    //#endregion }
    ///////////////////////////////////
    //version=5

    // Define input variables
    emaLength input.int(5minval=1title='EMA Length')
    rsiLength input.int(14minval=1title='RSI Length')
    rsiOverbought input(80title='RSI Overbought Level')
    rsiOversold input(20title='RSI Oversold Level')

    start input.float(title='Start'step=0.001defval=0.05)
    increment input.float(title='Increment'step=0.001defval=0.075)
    maximum input.float(title='Maximum'step=0.01defval=0.35)
    width input.int(title='Point Width'minval=1defval=2)

    psar ta.sar(startincrementmaximum)
    dir psar close : -1

    psarColor 
    dir == #3388bb : #fdcc02
    //psarPlot = plot(psar, title='PSAR', style=plot.style_circles, linewidth=width, color=color.new(psarColor,0))


    // Calculate EMA
    emaValue ta.ema(closeemaLength)

    // Calculate RSI
    rsiValue ta.rsi(closersiLength)

    // Define variables
    var bool strongLongSignal false
    var bool strongShortSignal false
    highlightState 
    input(title='Highlight State ?'defval=true)
    src input(closetitle='Source')

    // Plotting
    //plot(rsiValue, title='RSI', color=color.new(color.red, 0))

    // Determine long and short signals based on conditions
    strongLongSignal := high[1] < emaValue[1] and high high[1] and rsiValue rsiOversold and rsiValue rsiValue[1]
    longSignal strongLongSignal
    strongShortSignal 
    := low[1] > emaValue[1] and low low[1] and rsiValue rsiOverbought and rsiValue rsiValue[1]
    shortSignal strongShortSignal

    // Buy Signal as per PSR
    buySignalPSR dir == and dir[1] == -1
    sellSignalPSR 
    dir == -and dir[1] == 1


    //5-8-13 Signal
    len5 input.int(5minval=1title='5EMA')
    out5 ta.ema(srclen5)
    emaValue5 ta.ema(closelen5)

    len8 input.int(8minval=1title='8EMA')
    out8 ta.ema(srclen8)
    emaValue8 ta.ema(closelen8)

    len13 input.int(13minval=1title='13EMA')
    out13 ta.ema(srclen13)
    emaValue13 ta.ema(closelen13)

    //Plot 5-8-13 EMA on Chart
    //plot(out5, title='EMA5', color=color.new(color.red, 0), linewidth=1)
    //plot(out8, title='EMA8', color=color.new(color.blue, 0), linewidth=1)
    //plot(out13, title='EMA13', color=color.new(color.green, 0), linewidth=1)

    // 5-8-13 EMA Buy Sell Signals Calculation
    long5813 = ((ta.crossover(emaValue5emaValue8) or emaValue5 emaValue8) and
               (
    ta.crossover(emaValue5emaValue13) or emaValue5 emaValue13) and 
               (
    buySignalPSR or dir == 1) and close close[1] and
               
    close emaValue5 and close emaValue8 and close emaValue13)


    short5813 = (((ta.crossunder(emaValue5emaValue8) or emaValue5 emaValue8) and
                  (
    ta.crossunder(emaValue5emaValue13) or emaValue5 emaValue13)) and
                 (
    sellSignalPSR or dir == -1) and close close[1] and
                 
    close emaValue5 and close emaValue8 and close emaValue13)



    //Recheck Quick Buy and Sell Signals before plotting
    if short5813
        longSignal 
    := false

    if long5813
        shortSignal 
    := false

    // Plot long and short signals 
    plotshape(not longSignal[1] ? longSignal nacolor=color.new(color.green0), style=shape.arrowuptext='QB'title='Quick Buy'location=location.belowbar)
    plotshape(not long5813[1] ? long5813 natitle='Strong Buy'color=color.new(color.green0), style=shape.triangleuptext='SB',location =location.belowbar)
    plotshape(not shortSignal[1] ? shortSignal nacolor=color.new(color.red0), style=shape.arrowdowntext='QS',title='Quick Sell'location=location.abovebartextcolor=color.new(color.red,0))
    plotshape(not short5813[1] ? short5813 natitle='Strong Sell'color=color.new(color.red0), style=shape.triangledowntext='SS'location=location.abovebar,textcolor=color.new(color.red,0))

    midPricePlot plot(ohlc4title='PSAR Plot'display=display.none)
    fillColor highlightState dir == color.green color.red na
    //fill(midPricePlot, psarPlot, title='Trade State Filling', color=color.new(fillColor,90))

    alertcondition(not longSignal[1] ? longSignal na'Scalp Buy Signal''Scalp Buy/Long')
    alertcondition(not long5813[1] ? long5813 na'Strong Buy Signal''Buy/Long')
    alertcondition(not shortSignal[1] ? shortSignal na'Scalp Sell Signal''Scalp Sell/Short')
    alertcondition(not short5813[1] ? short5813 na'Strong Sell Signal''Sell/Short')
    //////////////////////////
    //@version=5

    // ----- * ----- // ----- * ----- // ----- * ----- // ----- * ----- P A R A M E T E R S - S E T U P ----- * ----- // ----- * ----- // ----- * ----- // ----- * -----

    // EMA & ATR

    float ema_16 math.round_to_mintick(ta.ema(close16))
    float ema_64 math.round_to_mintick(ta.ema(close64))
    float ema_256 math.round_to_mintick(ta.ema(close256))
    float atr ta.atr(16)
    bool golden_cross ta.crossover(ema_64ema_256)
    bool death_cross ta.crossunder(ema_64ema_256)
    bool bullish_64 ema_16 ema_64
    bool bearish_64 
    ema_16 ema_64
    bool bullish_256 
    ema_64 ema_256
    bool bearish_256 
    ema_64 ema_256
    color trend_color_64 
    bullish_64 color.new(#00E676, 50) : color.new(#FF5252, 50)
    color trend_color_256 bullish_256 color.new(#00E676, 10) : color.new(#FF5252, 10)

    // ----- * ----- // ----- * ----- // ----- * ----- // ----- * ----- T R A D I N G - S E T U P ----- * ----- // ----- * ----- // ----- * ----- // ----- * -----

    // Accumulation zone

    float upper_atr ema_16 atr
    float lower_atr 
    ema_16 atr
    bool in_trend 
    = (hl2 upper_atr or hl2 lower_atr) or (ema_64 upper_atr or ema_64 lower_atr)
    ub plot(in_trend na upper_atr"Upper Band"color color.new(#FF5252, 100), editable = false, offset = 0, display = display.none)
    lb plot(in_trend na lower_atr"Lower Band"color color.new(#FF5252, 100), editable = false, offset = 0, display = display.none)
    //fill(ub, lb, title = "Accumulation Zone", color = color.new(#FF5252, 25), display = display.none)

    // Long & short conditions

    bool long_conditions bullish_64 and bullish_256 //and in_trend (to be developed)
    bool short_conditions bearish_64 and bearish_256 //and in_trend (to be developed)
    bool trigger_l_64 = (ta.crossunder(lowema_64) or open ema_64) and (close ema_64) and long_conditions
    bool trigger_l_256 
    = (ta.crossunder(lowema_256) or low == ema_256 or open ema_256) and (close ema_256) and bullish_256
    bool trigger_s_64 
    = (ta.crossover(highema_64) or high == ema_64) and (close ema_64) and short_conditions
    bool trigger_s_256 
    = (ta.crossover(highema_256) or high == ema_256) and (close ema_256) and bearish_256

    // Execution check long

    ta.barssince(golden_cross)

    bool executed_l_64 false
    1
    while not executed_l_64 and x
        
    if (trigger_l_64[i]) or (close[i] < ema_64)
            
    executed_l_64 := true
        
    else
            
    := 1

    bool executed_l_256 
    false
    1
    while not executed_l_256 and x
        
    if trigger_l_256[j]
            
    executed_l_256 := true
        
    else
            
    := 1

    // Execution check short

    ta.barssince(death_cross)

    bool executed_s_64 false
    1
    while not executed_s_64 and y
        
    if (trigger_s_64[k]) or (close[k] > ema_64)
            
    executed_s_64 := true
        
    else
            
    := 1

    bool executed_s_256 
    false
    1
    while not executed_s_256 and y
        
    if trigger_s_256[l]
            
    executed_s_256 := true
        
    else
            
    := 1

    // Position opening & SL

    bool long_64 trigger_l_64 and (executed_l_64 == false)
    bool long_256 trigger_l_256 and (executed_l_256 == false)
    bool short_64 trigger_s_64 and (executed_s_64 == false)
    bool short_256 trigger_s_256 and (executed_s_256 == false)
    float entry close[1]
    float sl_long low[1] * .995
    float sl_short 
    high[1] * 1.005

    //float lowest_low = ta.lowest(math.max(nz(x), 1)) // Support to be developed
    //float highest_high = ta.highest(math.max(nz(y), 1)) // Resistance to be developed

    // ----- * ----- // ----- * ----- // ----- * ----- // ----- * ----- P L O T ----- * ----- // ----- * ----- // ----- * ----- // ----- * -----

    float ema_64_pips math.round_to_mintick(math.abs(close ema_64[1]))
    float ema_64_percent math.round_to_mintick(close ema_64[1] - 1) * 100
    float ema_256_pips 
    math.round_to_mintick(math.abs(close ema_256[1]))
    float ema_256_percent math.round_to_mintick(close ema_256[1] - 1) * 100

    //plot(ema_16, "EMA 16", color = color.new(#FF9800, 0), linewidth = 1, display = display.none)
    plot(ema_64"EMA 64"color trend_color_64linewidth 2display display.none)
    //plot(ema_256, "EMA 256", color = trend_color_256, linewidth = 3, display = display.all) 

    https://tr.tradingview.com/v/iwEyBE2d/
    görüntü.... https://www.tradingview.com/x/BDyCfDDw/

    PHP Code:
      // This source code is subject to these terms:
    // Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
    // https://creativecommons.org/licenses/by-nc/4.0/
    // You are free to Share, copy and redistribute. Adapt, transform and re-build on this script.
    // Under the following terms: Non-commercial & Attribution.
    // © gu5tavo71 (Gustavo Cardelle)

    //@version=5
    VERSION                  'v1.4.42'
    indicator(
      
    'Donchian Channels [Gu5]',
      
    shorttitle             'DC ' VERSION,
      
    overlay                true,
      
    explicit_plot_zorder   true,
      
    max_bars_back 5000)

    // Donchian Channels developed by Richard Donchian
    // Actual Study Version: @gu5tavo71
    // 2023.05.12
    // Project #687
    // This script reuses open source code from another authors:
    // @PineCoders, Built-in Library, and Community Scripts
    // Disclaimer: I am not a financial advisor.
    //             For purpose educate only. Use at your own risk.


    //#region ——————————— <constant_declarations> {
    //<my colors>
    C_GREEN      =                   #006400    //Green
    C_GREENLIGHT =                   #388e3c    //Green Light
    C_RED        =                   #8B0000    //Red
    C_REDLIGHT   =                   #b71c1c    //Red Light
    //#endregion }
    //#region ——————————— <inputs> {
    i_dcLen      input.int       (20,        'Length'                        minval 1)
    //Display
    G_DISPLAY    'Display'
    i_showBasis  input.bool      (true,      '■ Basis On/Off'                group   G_DISPLAY)
    i_alertOn    input.bool      (false,     '■ Alert On/Off'                group   G_DISPLAY)
    i_showFill   input.bool      (false,     '■ Fill On/Off'                 group   G_DISPLAY)
    i_showBarCol input.bool      (true,      '■ Bar Color On/Off'            group   G_DISPLAY)
    i_showClose  input.bool      (false,     '■ Close Alert On/Off'          group   G_DISPLAY)
    //#endregion }
    //#region ——————————— <calculations> {
    //<set initial values>
    condition    0.0
    dc           
    0.0
    dcDirCond    
    0.0
    dcTopDir     
    0.0
    dcBotDir     
    0.0

    dcTop        
    ta.highest(i_dcLen)
    dcBot        ta.lowest (i_dcLen)
    dcBasis      math.avg(dcTopdcBot)

    dc          := dc[1] !=  and dcTop dcTop[1] ?  :
                   
    dc[1] != -and dcBot dcBot[1] ? -nz(dc[1])

    dcDirUp      dcTop dcTop[1]
    dcDirDn      dcBot dcBot[1]
    dcDirZero    ta.crossunder(closedcBasis) or ta.crossover(closedcBasis)
    dcDirCond   := dcDirCond[1] !=  and dcDirUp   ?  :
                   
    dcDirCond[1] != -and dcDirDn   ? -:
                   
    dcDirCond[1] !=  and dcDirZero ?  nz(dcDirCond[1])
    dcDir        dcDirCond == :
                   
    dc        == : -1
    dcTopDir    
    := dcTop dcTop[1] ?  :
                   
    dcTop dcTop[1] ?  nz(dcTopDir[1])
    dcBotDir    := dcBot dcBot[1] ?  :
                   
    dcBot dcBot[1] ? -nz(dcBotDir[1])
    dcRange      dcTopDir == and dcBotDir == 0
    //<rules>
    longErule    dcTop dcTop[1]
    shortErule   dcBot dcBot[1]
    longXrule    i_showClose ta.crossunder(closedcBasis) : false
    shortXrule   
    i_showClose ta.crossover (closedcBasis) : false
    //<conditions>
    condition   := condition[1] !=  and longErule  ?  :
                   
    condition[1] != -and shortErule ? -:
                   
    condition[1] !=  and longXrule  ?  :
                   
    condition[1] !=  and shortXrule ?  nz(condition[1])
    longE        condition[1] !=  and condition ==  1
    shortE       
    condition[1] != -and condition == -1
    longX        
    condition[1] ==  and longXrule
    shortX       
    condition[1] == -and shortXrule

    // <color>
    c_range      dcRange or condition ==  0
    c_dcTop      
    c_range                           color.new(color.gray,   75) :
                   
    condition ==  1                   color.new(color.green,   0) :
                   
    condition ==  0                   color.new(color.orange,  0) :
                   
    dcRange                           color.new(color.orange,  0) :
                   
    color.new(color.gray,   75)
    c_dcBot      c_range                           color.new(color.gray,   75) :
                   
    condition == -1                   color.new(color.red,     0) :
                   
    condition ==  0                   color.new(color.orange,  0) :
                   
    color.new(color.gray,   75)
    c_dcBasis    dcRange                           color.new(color.orange,  0) :
                   
    dc ==  1                          color.new(color.green,  25) :
                   
    dc == -1                          color.new(color.red,    25) : na
    c_dcFill     
    dcRange                           color.new(color.orange80) :
                   
    dc ==  1                          color.new(color.green,  80) :
                   
    dc == -1                          color.new(color.red,    80) : na
    c_barCol     
    c_range         and open <= close color.new(color.orange,  0) :
                   
    c_range         and open >  close color.new(color.yellow,  0) :
                   
    condition ==  and open <= close color.new(C_GREEN,       0) :
                   
    condition ==  and open >  close color.new(color.green,   0) :
                   
    condition == -and open >= close color.new(C_RED,         0) :
                   
    condition == -and open <  close color.new(color.red,     0) :
                   
    color.new(color.gray0)
    //#endregion }
    //#region ——————————— <visuals> {
    plot(
      
    i_showBasis dcBasis na,
      
    title      'Basis',
      
    linewidth  2,
      
    color      c_dcBasis)
      
    barcolor(i_showBarCol c_barCol na)
    //#endregion }
    ///////////////////////////////////
    //version=5

    // Define input variables
    emaLength input.int(5minval=1title='EMA Length')
    rsiLength input.int(14minval=1title='RSI Length')
    rsiOverbought input(80title='RSI Overbought Level')
    rsiOversold input(20title='RSI Oversold Level')

    start input.float(title='Start'step=0.001defval=0.05)
    increment input.float(title='Increment'step=0.001defval=0.075)
    maximum input.float(title='Maximum'step=0.01defval=0.35)
    width input.int(title='Point Width'minval=1defval=2)

    psar ta.sar(startincrementmaximum)
    dir psar close : -1

    psarColor 
    dir == #3388bb : #fdcc02
    //psarPlot = plot(psar, title='PSAR', style=plot.style_circles, linewidth=width, color=color.new(psarColor,0))


    // Calculate EMA
    emaValue ta.ema(closeemaLength)

    // Calculate RSI
    rsiValue ta.rsi(closersiLength)

    // Define variables
    var bool strongLongSignal false
    var bool strongShortSignal false
    highlightState 
    input(title='Highlight State ?'defval=true)
    src input(closetitle='Source')

    // Plotting
    //plot(rsiValue, title='RSI', color=color.new(color.red, 0))

    // Determine long and short signals based on conditions
    strongLongSignal := high[1] < emaValue[1] and high high[1] and rsiValue rsiOversold and rsiValue rsiValue[1]
    longSignal strongLongSignal
    strongShortSignal 
    := low[1] > emaValue[1] and low low[1] and rsiValue rsiOverbought and rsiValue rsiValue[1]
    shortSignal strongShortSignal

    // Buy Signal as per PSR
    buySignalPSR dir == and dir[1] == -1
    sellSignalPSR 
    dir == -and dir[1] == 1


    //5-8-13 Signal
    len5 input.int(5minval=1title='5EMA')
    out5 ta.ema(srclen5)
    emaValue5 ta.ema(closelen5)

    len8 input.int(8minval=1title='8EMA')
    out8 ta.ema(srclen8)
    emaValue8 ta.ema(closelen8)

    len13 input.int(13minval=1title='13EMA')
    out13 ta.ema(srclen13)
    emaValue13 ta.ema(closelen13)

    //Plot 5-8-13 EMA on Chart
    //plot(out5, title='EMA5', color=color.new(color.red, 0), linewidth=1)
    //plot(out8, title='EMA8', color=color.new(color.blue, 0), linewidth=1)
    //plot(out13, title='EMA13', color=color.new(color.green, 0), linewidth=1)

    // 5-8-13 EMA Buy Sell Signals Calculation
    long5813 = ((ta.crossover(emaValue5emaValue8) or emaValue5 emaValue8) and
               (
    ta.crossover(emaValue5emaValue13) or emaValue5 emaValue13) and 
               (
    buySignalPSR or dir == 1) and close close[1] and
               
    close emaValue5 and close emaValue8 and close emaValue13)


    short5813 = (((ta.crossunder(emaValue5emaValue8) or emaValue5 emaValue8) and
                  (
    ta.crossunder(emaValue5emaValue13) or emaValue5 emaValue13)) and
                 (
    sellSignalPSR or dir == -1) and close close[1] and
                 
    close emaValue5 and close emaValue8 and close emaValue13)



    //Recheck Quick Buy and Sell Signals before plotting
    if short5813
        longSignal 
    := false

    if long5813
        shortSignal 
    := false

    // Plot long and short signals 
    //plotshape(not longSignal[1] ? longSignal : na, color=color.new(color.green, 0), style=shape.arrowup, text='QB', title='Quick Buy', location=location.belowbar)
    //plotshape(not long5813[1] ? long5813 : na, title='Strong Buy', color=color.new(color.green, 0), style=shape.triangleup, text='SB',location =location.belowbar)
    //plotshape(not shortSignal[1] ? shortSignal : na, color=color.new(color.red, 0), style=shape.arrowdown, text='QS',title='Quick Sell', location=location.abovebar, textcolor=color.new(color.red,0))
    //plotshape(not short5813[1] ? short5813 : na, title='Strong Sell', color=color.new(color.red, 0), style=shape.triangledown, text='SS', location=location.abovebar,textcolor=color.new(color.red,0))

    midPricePlot plot(ohlc4title='PSAR Plot'display=display.none)
    fillColor highlightState dir == color.green color.red na
    //fill(midPricePlot, psarPlot, title='Trade State Filling', color=color.new(fillColor,90))

    alertcondition(not longSignal[1] ? longSignal na'Scalp Buy Signal''Scalp Buy/Long')
    alertcondition(not long5813[1] ? long5813 na'Strong Buy Signal''Buy/Long')
    alertcondition(not shortSignal[1] ? shortSignal na'Scalp Sell Signal''Scalp Sell/Short')
    alertcondition(not short5813[1] ? short5813 na'Strong Sell Signal''Sell/Short')
    //////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © ChartPrime

    //@version=5

    // Custom cosh function
    cosh(float x) =>
        (
    math.exp(x) + math.exp(-x)) / 2

    // Custom acosh function
    acosh(float x) =>
        
    na math.log(math.sqrt(1))

    // Custom sinh function
    sinh(float x) =>
        (
    math.exp(x) - math.exp(-x)) / 2

    // Custom asinh function
    asinh(float x) =>
        
    math.log(math.sqrt(1))

    // Custom inverse tangent function
    atan(float x) =>
        
    math.pi math.atan(x)

    // Chebyshev Type I Moving Average
    chebyshevI(float srcint lenfloat ripple) =>
        
    0.
        b 
    0.
        g 
    0.
        chebyshev 
    0.
        
        a 
    := cosh(len acosh(/ (ripple)))
        
    := sinh(len asinh(ripple))
        
    := (b) / (b)
        
    chebyshev := (g) * src nz(chebyshev[1])
        
    chebyshev

    bool_to_float
    (bool source) =>
        
    source 0

    ema
    (source)=>
        var 
    float ema 0.0
        
    var int count 0
        count 
    := nz(count[1]) + 1
        ema 
    := (1.0 2.0 / (count 1.0)) * nz(ema[1]) + 2.0 / (count 1.0) * source
        ema

    atan2
    (yx) =>
        var 
    float angle 0.0
        
    if 0
            angle 
    := math.atan(x)
        else
            if 
    and >= 0
                angle 
    := math.atan(x) + math.pi
            
    else
                if 
    and 0
                    angle 
    := math.atan(x) - math.pi
                
    else
                    if 
    == and 0
                        angle 
    := math.pi 2
                    
    else
                        if 
    == and 0
                            angle 
    := -math.pi 2
        angle

    degrees
    (float source) =>
        
    source 180 math.pi

    tra
    ()=>
        
    atr ema(ta.tr)
        
    slope = (close close[10]) / (atr 10)
        
    angle_rad atan2(slope1)
        
    degrees degrees(angle_rad)
        
    source ta.sma((degrees high low), 2)

    mats(sourcelength) =>
        
    smooth 0.
        higher_high 
    math.max(math.sign(ta.change(ta.highest(length))), 0)
        
    lower_low math.max(math.sign(ta.change(ta.lowest(length)) * -1), 0)
        
    time_constant math.pow(ta.sma(bool_to_float(higher_high or lower_low), length), 2)
        
    smooth := nz(smooth[1] + time_constant * (source smooth[1]), source)

        
    wilders_period length 1

        atr 
    math.abs(nz(smooth[1]) - smooth)
        
    ma_atr ta.ema(atrwilders_period)
        
    delta_fast_atr ta.ema(ma_atrwilders_period) * length 0.4

        result 
    0.0
        
    if smooth nz(result[1])
            if 
    smooth delta_fast_atr result[1]
                
    result := result[1]
            else
                
    result := smooth delta_fast_atr
        
    else
            if 
    smooth delta_fast_atr result[1]
                
    result := result[1]
            else
                
    result := smooth delta_fast_atr

        
    // Return
        
    result

    length 
    input.int(20"Length"2)
    up_color input.color(color.blue""inline "color")
    down_color input.color(color.orange""inline "color")
    enable_glow input.bool(true"Enable Glow"inline "color")

    mats mats(tra(), length)

    atr ta.atr(length)

    colour ta.sma(close2) > mats up_color down_color

    atr_10 
    ema(ta.tr) / 2

    alpha 
    color.new(color.black100)

    max mats atr_10
    min 
    mats atr_10

    center 
    plot(mats"Moving Average Trend Sniper"coloureditable true)
    //plot(mats, "Moving Average Trend Sniper", color.new(colour, 70), 2, editable = true)
    //plot(mats, "Moving Average Trend Sniper", color.new(colour, 80), 3, editable = true)
    //plot(mats, "Moving Average Trend Sniper", color.new(colour, 90), 4, editable = true)

    //top = plot(enable_glow ? max : na, "Moving Average Trend Sniper", alpha)
    //bottom = plot(enable_glow ? min : na, "Moving Average Trend Sniper", alpha)

    //fill(top, center, top_value =  max, bottom_value = mats, bottom_color = color.new(colour, 75), top_color = alpha, editable = true)
    //fill(center, bottom, top_value =  mats, bottom_value = min, bottom_color = alpha, top_color = color.new(colour, 75), editable = true) 

    https://tr.tradingview.com/v/pFV6T1r2/
    görüntü.... https://www.tradingview.com/x/xiNNJnwC/

    PHP Code:
     // This source code is subject to these terms:
    // Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
    // https://creativecommons.org/licenses/by-nc/4.0/
    // You are free to Share, copy and redistribute. Adapt, transform and re-build on this script.
    // Under the following terms: Non-commercial & Attribution.
    // © gu5tavo71 (Gustavo Cardelle)

    //@version=5
    VERSION                  'v1.4.42'
    indicator(
      
    'Donchian Channels [Gu5]',
      
    shorttitle             'DC ' VERSION,
      
    overlay                true,
      
    explicit_plot_zorder   true,
      
    max_bars_back 5000)

    // Donchian Channels developed by Richard Donchian
    // Actual Study Version: @gu5tavo71
    // 2023.05.12
    // Project #687
    // This script reuses open source code from another authors:
    // @PineCoders, Built-in Library, and Community Scripts
    // Disclaimer: I am not a financial advisor.
    //             For purpose educate only. Use at your own risk.


    //#region ——————————— <constant_declarations> {
    //<my colors>
    C_GREEN      =                   #006400    //Green
    C_GREENLIGHT =                   #388e3c    //Green Light
    C_RED        =                   #8B0000    //Red
    C_REDLIGHT   =                   #b71c1c    //Red Light
    //#endregion }
    //#region ——————————— <inputs> {
    i_dcLen      input.int       (20,        'Length'                        minval 1)
    //Display
    G_DISPLAY    'Display'
    i_showBasis  input.bool      (true,      '■ Basis On/Off'                group   G_DISPLAY)
    //i_alertOn    = input.bool      (false,     '■ Alert On/Off'                , group   = G_DISPLAY)
    //i_showFill   = input.bool      (false,     '■ Fill On/Off'                 , group   = G_DISPLAY)
    i_showBarCol input.bool      (true,      '■ Bar Color On/Off'            group   G_DISPLAY)
    i_showClose  input.bool      (false,     '■ Close Alert On/Off'          group   G_DISPLAY)
    //#endregion }
    //#region ——————————— <calculations> {
    //<set initial values>
    condition    0.0
    dc           
    0.0
    dcDirCond    
    0.0
    dcTopDir     
    0.0
    dcBotDir     
    0.0

    dcTop        
    ta.highest(i_dcLen)
    dcBot        ta.lowest (i_dcLen)
    dcBasis      math.avg(dcTopdcBot)

    dc          := dc[1] !=  and dcTop dcTop[1] ?  :
                   
    dc[1] != -and dcBot dcBot[1] ? -nz(dc[1])

    dcDirUp      dcTop dcTop[1]
    dcDirDn      dcBot dcBot[1]
    dcDirZero    ta.crossunder(closedcBasis) or ta.crossover(closedcBasis)
    dcDirCond   := dcDirCond[1] !=  and dcDirUp   ?  :
                   
    dcDirCond[1] != -and dcDirDn   ? -:
                   
    dcDirCond[1] !=  and dcDirZero ?  nz(dcDirCond[1])
    dcDir        dcDirCond == :
                   
    dc        == : -1
    dcTopDir    
    := dcTop dcTop[1] ?  :
                   
    dcTop dcTop[1] ?  nz(dcTopDir[1])
    dcBotDir    := dcBot dcBot[1] ?  :
                   
    dcBot dcBot[1] ? -nz(dcBotDir[1])
    dcRange      dcTopDir == and dcBotDir == 0
    //<rules>
    longErule    dcTop dcTop[1]
    shortErule   dcBot dcBot[1]
    longXrule    i_showClose ta.crossunder(closedcBasis) : false
    shortXrule   
    i_showClose ta.crossover (closedcBasis) : false
    //<conditions>
    condition   := condition[1] !=  and longErule  ?  :
                   
    condition[1] != -and shortErule ? -:
                   
    condition[1] !=  and longXrule  ?  :
                   
    condition[1] !=  and shortXrule ?  nz(condition[1])
    longE        condition[1] !=  and condition ==  1
    shortE       
    condition[1] != -and condition == -1
    longX        
    condition[1] ==  and longXrule
    shortX       
    condition[1] == -and shortXrule

    // <color>
    c_range      dcRange or condition ==  0
    c_dcTop      
    c_range                           color.new(color.gray,   75) :
                   
    condition ==  1                   color.new(color.green,   0) :
                   
    condition ==  0                   color.new(color.orange,  0) :
                   
    dcRange                           color.new(color.orange,  0) :
                   
    color.new(color.gray,   75)
    c_dcBot      c_range                           color.new(color.gray,   75) :
                   
    condition == -1                   color.new(color.red,     0) :
                   
    condition ==  0                   color.new(color.orange,  0) :
                   
    color.new(color.gray,   75)
    c_dcBasis    dcRange                           color.new(color.orange,  0) :
                   
    dc ==  1                          color.new(color.green,  25) :
                   
    dc == -1                          color.new(color.red,    25) : na
    c_dcFill     
    dcRange                           color.new(color.orange80) :
                   
    dc ==  1                          color.new(color.green,  80) :
                   
    dc == -1                          color.new(color.red,    80) : na
    c_barCol     
    c_range         and open <= close color.new(color.orange,  0) :
                   
    c_range         and open >  close color.new(color.yellow,  0) :
                   
    condition ==  and open <= close color.new(C_GREEN,       0) :
                   
    condition ==  and open >  close color.new(color.green,   0) :
                   
    condition == -and open >= close color.new(C_RED,         0) :
                   
    condition == -and open <  close color.new(color.red,     0) :
                   
    color.new(color.gray0)
    //#endregion }
    //#region ——————————— <visuals> {
    plot(
      
    i_showBasis dcBasis na,
      
    title      'Basis',
      
    linewidth  2,
      
    color      c_dcBasis)
      
    barcolor(i_showBarCol c_barCol na)
    //#endregion }


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

    //@version=5

    // Custom cosh function
    cosh(float x) =>
        (
    math.exp(x) + math.exp(-x)) / 2

    // Custom acosh function
    acosh(float x) =>
        
    na math.log(math.sqrt(1))

    // Custom sinh function
    sinh(float x) =>
        (
    math.exp(x) - math.exp(-x)) / 2

    // Custom asinh function
    asinh(float x) =>
        
    math.log(math.sqrt(1))

    // Custom inverse tangent function
    atan(float x) =>
        
    math.pi math.atan(x)

    // Chebyshev Type I Moving Average
    chebyshevI(float srcint lenfloat ripple) =>
        
    0.
        b 
    0.
        g 
    0.
        chebyshev 
    0.
        
        a 
    := cosh(len acosh(/ (ripple)))
        
    := sinh(len asinh(ripple))
        
    := (b) / (b)
        
    chebyshev := (g) * src nz(chebyshev[1])
        
    chebyshev

    bool_to_float
    (bool source) =>
        
    source 0

    ema
    (source)=>
        var 
    float ema 0.0
        
    var int count 0
        count 
    := nz(count[1]) + 1
        ema 
    := (1.0 2.0 / (count 1.0)) * nz(ema[1]) + 2.0 / (count 1.0) * source
        ema

    atan2
    (yx) =>
        var 
    float angle 0.0
        
    if 0
            angle 
    := math.atan(x)
        else
            if 
    and >= 0
                angle 
    := math.atan(x) + math.pi
            
    else
                if 
    and 0
                    angle 
    := math.atan(x) - math.pi
                
    else
                    if 
    == and 0
                        angle 
    := math.pi 2
                    
    else
                        if 
    == and 0
                            angle 
    := -math.pi 2
        angle

    degrees
    (float source) =>
        
    source 180 math.pi

    tra
    ()=>
        
    atr ema(ta.tr)
        
    slope = (close close[10]) / (atr 10)
        
    angle_rad atan2(slope1)
        
    degrees degrees(angle_rad)
        
    source ta.sma((degrees high low), 2)

    mats(sourcelength) =>
        
    smooth 0.
        higher_high 
    math.max(math.sign(ta.change(ta.highest(length))), 0)
        
    lower_low math.max(math.sign(ta.change(ta.lowest(length)) * -1), 0)
        
    time_constant math.pow(ta.sma(bool_to_float(higher_high or lower_low), length), 2)
        
    smooth := nz(smooth[1] + time_constant * (source smooth[1]), source)

        
    wilders_period length 1

        atr 
    math.abs(nz(smooth[1]) - smooth)
        
    ma_atr ta.ema(atrwilders_period)
        
    delta_fast_atr ta.ema(ma_atrwilders_period) * length 0.4

        result 
    0.0
        
    if smooth nz(result[1])
            if 
    smooth delta_fast_atr result[1]
                
    result := result[1]
            else
                
    result := smooth delta_fast_atr
        
    else
            if 
    smooth delta_fast_atr result[1]
                
    result := result[1]
            else
                
    result := smooth delta_fast_atr

        
    // Return
        
    result

    length 
    input.int(20"Length"2)
    up_color input.color(color.blue""inline "color")
    down_color input.color(color.orange""inline "color")
    enable_glow input.bool(true"Enable Glow"inline "color")

    mats mats(tra(), length)

    atr ta.atr(length)

    colour ta.sma(close2) > mats up_color down_color

    atr_10 
    ema(ta.tr) / 2

    alpha 
    color.new(color.black100)

    max mats atr_10
    min 
    mats atr_10

    center 
    plot(mats"Moving Average Trend Sniper"coloureditable true)

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


    //@version=5

    // Input settings
    atrLength input(3title="ATR Length")
    thresholdMultiplier input(1.5title="Threshold Multiplier")
    HTF input.timeframe('''TimeFrame')

    // Get data from the higher timeframe
    [h_highh_lowh_close] = request.security(syminfo.tickeridHTF, [highlowclose])

    // Calculate True Range and Average True Range
    trueRange math.max(math.max(h_high h_lowmath.abs(h_high h_close[1])), math.abs(h_low h_close[1]))
    atr33 ta.sma(trueRangeatrLength)
    threshold atr33 thresholdMultiplier

    // Determine if it's a high volatility candle
    isHighVolatility h_close h_close[1] + threshold

    // Line settings
    last input(5'Display last X lines')
    lineLevel isHighVolatility ? (h_close[1] > h_close h_high h_low) : na
    // Line management variables
    var line[] mylines = array.new_line(0)
    var 
    bool[] mylinestyles = array.new_bool(0// Store initial styles
    var int[] crossCount = array.new_int(0// Store cross counts
    var float prevLineLevel na
    var int prevBarIndex na
    var bool prevState na

    // Draw trendlines
    if isHighVolatility
        
    if not na(prevLineLevel)
            
    // Determine the initial color and style based on price action
            
    initialColor close[1] > lineLevel color.rgb(108240126) : color.red
            initialStyle 
    close[1] > lineLevel line.style_solid line.style_solid

            
    // Create the new line and add it to the array
            
    lineId line.new(x1=prevBarIndexy1=prevLineLevelx2=bar_index[0], y2=lineLevelxloc=xloc.bar_indexstyle=initialStyleextend=array.size(mylines) == last extend.right extend.nonecolor=initialColorwidth=2)
            array.
    push(mylineslineId)
            array.
    push(mylinestylesinitialStyle == line.style_solid// Store the initial style as a boolean (true for solid)
            
    array.push(crossCount0// Initialize cross count for the new line

            // Remove lines and associated data beyond the recent X amount of lines
            
    if array.size(mylines) > last
                line
    .delete(array.shift(mylines))
                array.
    shift(mylinestyles)
                array.
    shift(crossCount)

        
    // Update previous line level and bar index
        
    prevLineLevel := lineLevel
        prevBarIndex 
    := bar_index[0]

    // Check for price crossing the trendline
    var line closestLine na
    if array.size(mylines) > 0
        closestLine 
    := array.get(mylines, array.size(mylines) - 1)

    crossOver ta.crossover(closeline.get_price(closestLinebar_index))
    crossUnder ta.crossunder(closeline.get_price(closestLinebar_index))

    // Declare isAboveLine variable
    bool isAboveLine na

    // Update the color of the closest trendline based on price action
    if array.size(mylines) > 0
        isAboveLine 
    := close >= line.get_price(closestLinebar_index)
        if 
    na(prevState)
            
    prevState := isAboveLine

        
    if crossOver or crossUnder
            
    // Increment the cross count
            
    array.set(crossCount, array.size(crossCount) - 1, array.get(crossCount, array.size(crossCount) - 1) + 1)

            
    // Check if the price has crossed the trendline twice
            
    if array.get(crossCount, array.size(crossCount) - 1) >= 2
                line
    .set_style(closestLineline.style_dashed// Set line style to dashed when the price crosses a red line
            
    else
                
    line.set_color(closestLineisAboveLine color.rgb(108240126) : color.rgb(2558282))
            
    prevState := isAboveLine

        
    // Extend only the current line to the right
        
    for 0 to array.size(mylines) - 1
            line
    .set_extend(array.get(mylinesi), == array.size(mylines) - extend.right extend.none
    Son düzenleme : @yörük@; 03-07-2023 saat: 20:25.
    Teknik olarak; yarına gebe olan bugünü yaşamalı ki, yarın, yaşanmış olsun.





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

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

Sayfa 197/272 İlkİlk ... 97147187195196197198199207247 ... 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
  •