Sayfa 180/272 İlkİlk ... 80130170178179180181182190230 ... SonSon
Arama sonucu : 2172 madde; 1,433 - 1,440 arası.

Konu: Tradingview

  1. Doğum tarihim 16/07/2024 olarak güncellenmiştir.

  2. https://tr.tradingview.com/v/T2juFbHt/

    2 farklı zaman dilimi kullanarak...spertrend yöntemiyle....trend hesaplama....
    https://www.tradingview.com/x/wsILPfOu/


    bu da saatlik ve seanaslık kodun birleşmiş hali......
    https://www.tradingview.com/x/I4Ab0Ggb/


    PHP Code:
    //@version=5
    strategy('deneme'overlay=trueformat=format.price)
    ////////////////////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © peacefulLizard50262

    //@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 srcfloat 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

    // Chebyshev Type II Moving Average
    chebyshevII(float srcfloat 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], src)
        
    chebyshev

    chebyshev
    (float srcfloat lengthfloat ripplebool style) =>
        
    style ?
         
    chebyshevI(srclengthripple) :
         
    chebyshevII(srclengthripple)

    source44 input.source(hl2"Source")
    up_color input.color(color.new(color.green20), "Up Color")
    down_color input.color(color.new(color.red20), "Down Color")
    text_color input.color(color.black"Text Color")
    mean_length input.float(24"Mean Length"510000.5)
    mean_ripple input.float(0.5"Mean Ripple"0.010.990.01)
    style44 input.bool(false"True Chebyshev I | False : Chebyshev II")
    atr_style input.bool(true"True: |Open-Close|  False: High-Low")
    atr_length input.float(64"ATR Length"610000.5)
    atr_ripple input.float(0.05"Mean Ripple"0.010.990.01)
    multiplier input.float(1.5"Multiplier"0.125100.125)
    alerts input.bool(false"Alerts")
    labels input.bool(true"Labels")

    atr chebyshev(atr_style high low math.abs(open close), atr_lengthatr_ripplestyle44)
    mean chebyshevI(source44mean_lengthmean_ripple)

    var 
    float offset 0.0
    var bool state na
    var float newOffset 0.0

    crossover 
    ta.crossover(source44offset)
    position source44 offset
    crossunder 
    ta.crossunder(source44offset)

    prevOffset nz(offset[1])

    if 
    crossover[2] and position[1] and position or (position and position[1] and position[2]) 
        
    newOffset := mean atr multiplier
        offset 
    := newOffset nz(prevOffset) or close[1] > nz(prevOffset) ? newOffset nz(prevOffset)
        
    state := true

    if crossunder[2] and not position[1] and not position or (not position and not position[1] and not position[2]) 
        
    newOffset := mean atr multiplier
        offset 
    := newOffset nz(prevOffset) or close[1] < nz(prevOffset) ? newOffset nz(prevOffset)
        
    state := false

    cross 
    ta.cross(closeoffset)

    down_trend not state and not state[1]
    up_trend state and state[1]

    colour up_trend up_color down_trend down_color color.new(color.white100

    if 
    up_trend and not up_trend[1] and labels
        label
    .new(bar_indexoffset"Up Trend \n" str.tostring(close), color up_colorstyle label.style_label_uptextcolor text_color)
        
    alert("Up Trend at " str.tostring(close))
    else
        
    alert("Up Trend at " str.tostring(close))

    if 
    down_trend and not down_trend[1] and labels
        label
    .new(bar_indexoffset"Down Trend \n" str.tostring(close), color down_colorstyle label.style_label_downtextcolor text_color)
        
    alert("Down Trend at " str.tostring(close))
    else
        
    alert("Down Trend at " str.tostring(close))
        
    plot(offset"Trend"colourstyle plot.style_stepline_diamond)

    plotshape(cross"Trend Is Getting Ready To Change"shape.xcrosslocation.belowbarcolor close offset up_color down_color)
    ////////////////////////////////////////////
    /// Creator: Tim Tillson (T3 Moving Average)
    // Author: @dg_factor [09.12.2021]

    // UYARI : 
    // Geliştirme amaçlıdır. Risk yönetimi olmaksızın alım-satım stratejisi yerine ikame edilemez.

    // AÇIKLAMALAR
    // Orijinal hasaplamalara sadık kalınarak farklı derecelerde (1-5) binom açılımları uygulandı. 
    // EMA dahil, toplamda yedi farklı hareketli ortalama türü üzerinde çalışabilen dinamik bir yapı inşa edildi. 
    // Derece ve ortalama türü, opsiyonel birer parametre olarak kullanıcı tercihine sunuldu. 
    // Diğer detaylar en aşağıda.

    //@version=5

    // Inputs
    src     close
    length  
    input(title='Length'defval=20)
    factor  input.float(title='Factor'defval=0.7step=0.1)
    degree  input.int(title='Degree'minval=1maxval=5defval=3tooltip='1-5'group="DEGREE & TYPE")
    ma_type input.string(title="Type"defval="EMA"options=["EMA""RMA""EVMA""GAUS""HULLT""MCGD""TSF"], group="DEGREE & TYPE")

    // MA Functions

    // EVMA [Elastic Volume Weighted Moving Average]
    f_evma(datau1) =>
        
    ta.sma(datau1)
        
    math.sum(volumeu1)
        
    0.0
        r 
    := na(r[1]) ? nz(r[1]) * (volume) / volume data a
    //

    // GAUS [Ehlers - Gaussian Filter]
    f_gaus(datau1) =>
        
    = (math.cos(math.pi u1)) / (math.sqrt(2) - 1)
        
    = -math.sqrt(math.pow(a2) + a)
        
    0.0
        r 
    := na(r[1]) ? data math.pow(b2) * data * (b) * nz(r[1]) - math.pow(b2) * nz(r[2])
    //

    // HULLT [Triple Hull Moving Average]    
    f_hullt(datau1) =>
        
    u1 u1 2
        b 
    u1 u1 3
        r 
    ta.wma(ta.wma(datab) * ta.wma(dataa) - ta.wma(datau1), u1)
    //

    // MCGD [McGinley Dynamic Moving Average]
    f_mcgd(datau1) =>
        
    ta.ema(datau1)
        
    0.0
        r 
    := na(r[1]) ? r[1] + (data r[1]) / (u1 math.pow(data r[1], 4))
    //

    // TSF [Time Series Function]
    f_tsf(datau1) => 
          
    ta.linreg(datau10) - ta.linreg(datau11)

    // MA Return
    f_ma(datau1) => 
          
    ma_type == "EMA"   ta.ema(datau1)  :
          
    ma_type == "EVMA"  f_evma(datau1)  :
          
    ma_type == "GAUS"  f_gaus(datau1)  :
          
    ma_type == "HULLT" f_hullt(datau1) :
          
    ma_type == "MCGD"  f_mcgd(datau1)  :
          
    ma_type == "RMA"   ta.rma(datau1)  :      
          
    ma_type == "TSF"   f_tsf(datau1)   :
          
    na
    //

    // Variables
    factor
    factor 1
    f_ma(srclength)
    f_ma(zlength)


    // Degreed Tillson MA Functions

    d1(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    b0 = -math.pow(x1) * math.pow(y0)
        
    b1 = +math.pow(x0) * math.pow(y1)
        
    b0 a1 b1 a0
    //

    d2(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    a2 f_ma(a1length)
        
    b0 = +math.pow(x2) * math.pow(y0)
        
    b1 = -math.pow(x1) * math.pow(y1)
        
    b2 = +math.pow(x0) * math.pow(y2)
        
    b0 a2 b1 a1 b2 a0
    //

    d3(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    a2 f_ma(a1length)
        
    a3 f_ma(a2length)
        
    b0 = -math.pow(x3) * math.pow(y0)
        
    b1 = +math.pow(x2) * math.pow(y1)
        
    b2 = -math.pow(x1) * math.pow(y2)
        
    b3 = +math.pow(x0) * math.pow(y3)
        
    b0 a3 b1 a2 b2 a1 b3 a0
    //

    d4(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    a2 f_ma(a1length)
        
    a3 f_ma(a2length)
        
    a4 f_ma(a3length)
        
    b0 = +math.pow(x4) * math.pow(y0)
        
    b1 = -math.pow(x3) * math.pow(y1)
        
    b2 = +math.pow(x2) * math.pow(y2)
        
    b3 = -math.pow(x1) * math.pow(y3)
        
    b4 = +math.pow(x0) * math.pow(y4)
        
    b0 a4 b1 a3 b2 a2 b3 a1 b4 a0
    //

    d5(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    a2 f_ma(a1length)
        
    a3 f_ma(a2length)
        
    a4 f_ma(a3length)
        
    a5 f_ma(a4length)
        
    b0 = -1  math.pow(x5) * math.pow(y0)
        
    b1 = +5  math.pow(x4) * math.pow(y1)
        
    b2 = -10 math.pow(x3) * math.pow(y2)
        
    b3 = +10 math.pow(x2) * math.pow(y3)
        
    b4 = -5  math.pow(x1) * math.pow(y4)
        
    b5 = +1  math.pow(x0) * math.pow(y5)
        
    b0 a5 b1 a4 b2 a3 b3 a2 b4 a1 b5 a0
    //

    // Out
    out 
      
    degree == 1  d1(srclength) : 
      
    degree == 2  d2(srclength) : 
      
    degree == 3  d3(srclength) : 
      
    degree == 4  d4(srclength) : 
      
    degree == 5  d5(srclength) :  
      
    na
    //

    // Print
    plot(outcolor=#3082a500, title='Tillson MA')
    barcolor(out out[1] ? #00bb00 : out < out[1] ? #bb0000 : #333333)

    // Bitti
    //plotshape(barstate.isfirst, title="@ dg_factor", color=#13172200, editable=false)

    // DETAYLAR

    // T3'teki "3" nedir?
    //      T3 Moving Average, iç içe kurgulanmış üssel hareketli ortalamaların üçüncü dereceden binom açılımı alınarak hesaplanır. 
    //      T3 şeklinde adlandırılmasının nedeni budur.
    //      Ufak bir matematiksel müdahale ile farklı dereceler kodlanabilir, netekim bu indikatör yöntem olarak çarpanlara ayırma önermektedir.

    // Ömer Hayyam'ın mevzuyla ne ilgisi var?
    //      Binom açılımı, Pascal Üçgeni olarak bilinen bir tamsayı dizisine dayanır.
    //      İsmi Pascal'la anılsa da, bu üçgensel sayı dizisinin ilk olarak Ömer Hayyam'ın hesaplamalarında tanımlandığı kabul edilir.  
    //      Pascal üçgeninin kartezyen toplamları kullanılarak Fibonacci dizisini elde etmek de mümkündür.
    //      Yayılım örüntülerini açıklamadaki gücü bakımından Pascal Üçgeni sıkça kullanılan bir argümandır. 
    //      Özetle finansal algoritmalar Hayyam'a çok şey borçludur.

    // Ne işe yarayacak?
    //      Başıma bir iş gelmeyecekse; 
    //      Trendi genellikle yakalar, ama terste bırakma ihtimali de yüksektir. Risk yönetimi bu yüzden gerekli.
    //      Farklı dereceler fiyat frekansını üretebilecek yöntemlere katkı sunabilir.
    //      Hatta ortalamaya ait önceki tepe ve diplerin yeni sinyal yönü için geçerli destek/direnç seviyeleri olarak çalıştığı da oluyor.
    //      Tabi herhangi bir işe yaramayabilir de :).
    ////////////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © Baby_whale_to_moon

    //@version=5

    // BACKTEST DATE
    Start_Time input.time(defval=timestamp('01 January 2017 13:30 +0000'), title='Start_Time'group " ################# BACKTEST DATE ################ " )
    End_Time input.time(defval=timestamp('30 April 2024 19:30 +0000'), title='End_Time'group " ################# BACKTEST DATE ################ " )

    // supertrend 
    atrPeriod input(10'ATR Length'group " #################  Supertrend  ################ ")
    factor77 input(3'Factor'group " #################  Supertrend  ################ ")

    time1 input.string(title='Short Time Period'defval='07 1h'options=['01 1m','02 3m','03 5m',  '04 15m''05 30m''06 45m''07 1h''08 2h''09 3h''10 4h''11 1D''12 1W' ], group " #################  Supertrend  ################ ",tooltip "this timeframe is the value of our short-time supertrend indicator")
    time2 input.string(title='Long Time Period'defval='10 4h'options=[ '01 1m','02 3m','03 5m''04 15m''05 30m''06 45m''07 1h''08 2h''09 3h''10 4h''11 1D''12 1W' ], group " #################  Supertrend  ################ ",tooltip "this timeframe is the value of our long-time supertrend indicator")


    res(Resolution) =>
        if 
    Resolution == '00 Current'
            
    timeframe.period
        
    else
            if 
    Resolution == '01 1m'
                '1'
            
    else
                if 
    Resolution == '02 3m'
                    '3'
                
    else
                    if 
    Resolution == '03 5m'
                        '5'
                    
    else
                        if 
    Resolution == '04 15m'
                            '15'
                        
    else
                            if 
    Resolution == '05 30m'
                                '30'
                            
    else
                                if 
    Resolution == '06 45m'
                                    '45'
                                
    else
                                    if 
    Resolution == '07 1h'
                                        '60'
                                    
    else
                                        if 
    Resolution == '08 2h'
                                            '120'
                                        
    else
                                            if 
    Resolution == '09 3h'
                                                '180'
                                            
    else
                                                if 
    Resolution == '10 4h'
                                                    '240'
                                                
    else
                                                    if 
    Resolution == '11 1D'
                                                        '1D'
                                                    
    else
                                                        if 
    Resolution == '12 1W'
                                                            '1W'
                                                        
    else
                                                            if 
    Resolution == '13 1M'
                                                                '1M'


    // supertrend Long time period 
    [supertrend2direction2] = request.security(syminfo.tickeridres(time2), ta.supertrend(factor77atrPeriod))
    bodyMiddle4 plot((open close) / 2display=display.none)
    upTrend2 plot(direction2 supertrend2 na'seans up'color=color.new(#4caf4f, 100), style=plot.style_linebr, linewidth=2)
    downTrend2 plot(direction2 na supertrend2'seans Down'color=color.new(#ff5252, 100), style=plot.style_linebr, linewidth=2)

    // supertrend short time period 
    [supertrend1direction1] = request.security(syminfo.tickeridres(time1), ta.supertrend(factor77atrPeriod))
    bodyMiddle plot((open close) / 2display=display.none)
    upTrend plot(direction1 supertrend1 na'saat Up 'color=color.new(#ffeb3b, 100), style=plot.style_linebr)
    downTrend plot(direction1 na supertrend1'saat Down 'color=color.new(#ff9900, 100), style=plot.style_linebr)


    // Stochastic RSI
    low_limit_stoch_rsi input.float(title 'Stoch Rsi Low Limit'step=0.5defval=15group " #################  Stoch RSI   ################ "tooltip "when Stock rsi value crossover Low Limit value we get Long")
    up_limit_stoch_rsi input.float(title 'Stoch Rsi Up Limit'step=0.5defval=85group " #################  Stoch RSI   ################ "tooltip "when Stock rsi value crossunder Up Limit value we get Short")
    stocrsi_back_length input.int(20'Stoch Rsi retroactive length'minval=1group " #################  Stoch RSI   ################ "tooltip "How many candles are left behind, even if there is a buy or sell signal, it will be valid now")
    smoothK input.int(3'Stochastic RSI K'minval=1group " #################  Stoch RSI   ################ ")
    lengthRSI input.int(14'RSI Length'minval=1group " #################  Stoch RSI   ################ ")
    lengthStoch input.int(14'Stochastic Length'minval=1group " #################  Stoch RSI   ################ ")
    src_rsi input(closetitle='RSI Source'group " #################  Stoch RSI   ################ ")
    rsi1 request.security(syminfo.tickerid'240'ta.rsi(src_rsilengthRSI))
    request.security(syminfo.tickerid'240'ta.sma(ta.stoch(rsi1rsi1rsi1lengthStoch), smoothK))



    //////////////////////////////////////// 
    denenip...testleri yapılabilir......

    1 dakkalıkta grafiği bozmadı en azından.....
    Doğum tarihim 16/07/2024 olarak güncellenmiştir.

  3. https://tr.tradingview.com/v/ziw9l3lF/

    supertrend fiboya göre long short açıyo....
    https://www.tradingview.com/x/17ua8ktC/


    PHP Code:
    //@version=5
    indicator("deneme"overlay truemax_lines_count 500max_labels_count 500format=format.price)
    ////////////////////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © peacefulLizard50262

    //@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 srcfloat 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

    // Chebyshev Type II Moving Average
    chebyshevII(float srcfloat 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], src)
        
    chebyshev

    chebyshev
    (float srcfloat lengthfloat ripplebool style) =>
        
    style ?
         
    chebyshevI(srclengthripple) :
         
    chebyshevII(srclengthripple)

    source44 input.source(hl2"Source")
    up_color input.color(color.new(color.green20), "Up Color")
    down_color input.color(color.new(color.red20), "Down Color")
    text_color input.color(color.black"Text Color")
    mean_length input.float(24"Mean Length"510000.5)
    mean_ripple input.float(0.5"Mean Ripple"0.010.990.01)
    style44 input.bool(false"True Chebyshev I | False : Chebyshev II")
    atr_style input.bool(true"True: |Open-Close|  False: High-Low")
    atr_length input.float(64"ATR Length"610000.5)
    atr_ripple input.float(0.05"Mean Ripple"0.010.990.01)
    multiplier input.float(1.5"Multiplier"0.125100.125)
    alerts input.bool(false"Alerts")
    labels input.bool(true"Labels")

    atr chebyshev(atr_style high low math.abs(open close), atr_lengthatr_ripplestyle44)
    mean chebyshevI(source44mean_lengthmean_ripple)

    var 
    float offset 0.0
    var bool state na
    var float newOffset 0.0

    crossover 
    ta.crossover(source44offset)
    position source44 offset
    crossunder 
    ta.crossunder(source44offset)

    prevOffset nz(offset[1])

    if 
    crossover[2] and position[1] and position or (position and position[1] and position[2]) 
        
    newOffset := mean atr multiplier
        offset 
    := newOffset nz(prevOffset) or close[1] > nz(prevOffset) ? newOffset nz(prevOffset)
        
    state := true

    if crossunder[2] and not position[1] and not position or (not position and not position[1] and not position[2]) 
        
    newOffset := mean atr multiplier
        offset 
    := newOffset nz(prevOffset) or close[1] < nz(prevOffset) ? newOffset nz(prevOffset)
        
    state := false

    cross 
    ta.cross(closeoffset)

    down_trend not state and not state[1]
    up_trend state and state[1]

    colour up_trend up_color down_trend down_color color.new(color.white100

    if 
    up_trend and not up_trend[1] and labels
        label
    .new(bar_indexoffset"Up Trend \n" str.tostring(close), color up_colorstyle label.style_label_uptextcolor text_color)
        
    alert("Up Trend at " str.tostring(close))
    else
        
    alert("Up Trend at " str.tostring(close))

    if 
    down_trend and not down_trend[1] and labels
        label
    .new(bar_indexoffset"Down Trend \n" str.tostring(close), color down_colorstyle label.style_label_downtextcolor text_color)
        
    alert("Down Trend at " str.tostring(close))
    else
        
    alert("Down Trend at " str.tostring(close))
        
    plot(offset"Trend"colourstyle plot.style_stepline_diamond)

    plotshape(cross"Trend Is Getting Ready To Change"shape.xcrosslocation.belowbarcolor close offset up_color down_color)
    ////////////////////////////////////////////
    /// Creator: Tim Tillson (T3 Moving Average)
    // Author: @dg_factor [09.12.2021]

    // UYARI : 
    // Geliştirme amaçlıdır. Risk yönetimi olmaksızın alım-satım stratejisi yerine ikame edilemez.

    // AÇIKLAMALAR
    // Orijinal hasaplamalara sadık kalınarak farklı derecelerde (1-5) binom açılımları uygulandı. 
    // EMA dahil, toplamda yedi farklı hareketli ortalama türü üzerinde çalışabilen dinamik bir yapı inşa edildi. 
    // Derece ve ortalama türü, opsiyonel birer parametre olarak kullanıcı tercihine sunuldu. 
    // Diğer detaylar en aşağıda.

    //@version=5

    // Inputs
    src     close
    length  
    input(title='Length'defval=20)
    factor  input.float(title='Factor'defval=0.7step=0.1)
    degree  input.int(title='Degree'minval=1maxval=5defval=3tooltip='1-5'group="DEGREE & TYPE")
    ma_type input.string(title="Type"defval="EMA"options=["EMA""RMA""EVMA""GAUS""HULLT""MCGD""TSF"], group="DEGREE & TYPE")

    // MA Functions

    // EVMA [Elastic Volume Weighted Moving Average]
    f_evma(datau1) =>
        
    ta.sma(datau1)
        
    math.sum(volumeu1)
        
    0.0
        r 
    := na(r[1]) ? nz(r[1]) * (volume) / volume data a
    //

    // GAUS [Ehlers - Gaussian Filter]
    f_gaus(datau1) =>
        
    = (math.cos(math.pi u1)) / (math.sqrt(2) - 1)
        
    = -math.sqrt(math.pow(a2) + a)
        
    0.0
        r 
    := na(r[1]) ? data math.pow(b2) * data * (b) * nz(r[1]) - math.pow(b2) * nz(r[2])
    //

    // HULLT [Triple Hull Moving Average]    
    f_hullt(datau1) =>
        
    u1 u1 2
        b 
    u1 u1 3
        r 
    ta.wma(ta.wma(datab) * ta.wma(dataa) - ta.wma(datau1), u1)
    //

    // MCGD [McGinley Dynamic Moving Average]
    f_mcgd(datau1) =>
        
    ta.ema(datau1)
        
    0.0
        r 
    := na(r[1]) ? r[1] + (data r[1]) / (u1 math.pow(data r[1], 4))
    //

    // TSF [Time Series Function]
    f_tsf(datau1) => 
          
    ta.linreg(datau10) - ta.linreg(datau11)

    // MA Return
    f_ma(datau1) => 
          
    ma_type == "EMA"   ta.ema(datau1)  :
          
    ma_type == "EVMA"  f_evma(datau1)  :
          
    ma_type == "GAUS"  f_gaus(datau1)  :
          
    ma_type == "HULLT" f_hullt(datau1) :
          
    ma_type == "MCGD"  f_mcgd(datau1)  :
          
    ma_type == "RMA"   ta.rma(datau1)  :      
          
    ma_type == "TSF"   f_tsf(datau1)   :
          
    na
    //

    // Variables
    factor
    factor 1
    f_ma(srclength)
    f_ma(zlength)


    // Degreed Tillson MA Functions

    d1(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    b0 = -math.pow(x1) * math.pow(y0)
        
    b1 = +math.pow(x0) * math.pow(y1)
        
    b0 a1 b1 a0
    //

    d2(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    a2 f_ma(a1length)
        
    b0 = +math.pow(x2) * math.pow(y0)
        
    b1 = -math.pow(x1) * math.pow(y1)
        
    b2 = +math.pow(x0) * math.pow(y2)
        
    b0 a2 b1 a1 b2 a0
    //

    d3(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    a2 f_ma(a1length)
        
    a3 f_ma(a2length)
        
    b0 = -math.pow(x3) * math.pow(y0)
        
    b1 = +math.pow(x2) * math.pow(y1)
        
    b2 = -math.pow(x1) * math.pow(y2)
        
    b3 = +math.pow(x0) * math.pow(y3)
        
    b0 a3 b1 a2 b2 a1 b3 a0
    //

    d4(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    a2 f_ma(a1length)
        
    a3 f_ma(a2length)
        
    a4 f_ma(a3length)
        
    b0 = +math.pow(x4) * math.pow(y0)
        
    b1 = -math.pow(x3) * math.pow(y1)
        
    b2 = +math.pow(x2) * math.pow(y2)
        
    b3 = -math.pow(x1) * math.pow(y3)
        
    b4 = +math.pow(x0) * math.pow(y4)
        
    b0 a4 b1 a3 b2 a2 b3 a1 b4 a0
    //

    d5(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    a2 f_ma(a1length)
        
    a3 f_ma(a2length)
        
    a4 f_ma(a3length)
        
    a5 f_ma(a4length)
        
    b0 = -1  math.pow(x5) * math.pow(y0)
        
    b1 = +5  math.pow(x4) * math.pow(y1)
        
    b2 = -10 math.pow(x3) * math.pow(y2)
        
    b3 = +10 math.pow(x2) * math.pow(y3)
        
    b4 = -5  math.pow(x1) * math.pow(y4)
        
    b5 = +1  math.pow(x0) * math.pow(y5)
        
    b0 a5 b1 a4 b2 a3 b3 a2 b4 a1 b5 a0
    //

    // Out
    out 
      
    degree == 1  d1(srclength) : 
      
    degree == 2  d2(srclength) : 
      
    degree == 3  d3(srclength) : 
      
    degree == 4  d4(srclength) : 
      
    degree == 5  d5(srclength) :  
      
    na
    //

    // Print
    plot(outcolor=#3082a500, title='Tillson MA')
    barcolor(out out[1] ? #00bb00 : out < out[1] ? #bb0000 : #333333)

    // Bitti
    //plotshape(barstate.isfirst, title="@ dg_factor", color=#13172200, editable=false)

    // DETAYLAR

    // T3'teki "3" nedir?
    //      T3 Moving Average, iç içe kurgulanmış üssel hareketli ortalamaların üçüncü dereceden binom açılımı alınarak hesaplanır. 
    //      T3 şeklinde adlandırılmasının nedeni budur.
    //      Ufak bir matematiksel müdahale ile farklı dereceler kodlanabilir, netekim bu indikatör yöntem olarak çarpanlara ayırma önermektedir.

    // Ömer Hayyam'ın mevzuyla ne ilgisi var?
    //      Binom açılımı, Pascal Üçgeni olarak bilinen bir tamsayı dizisine dayanır.
    //      İsmi Pascal'la anılsa da, bu üçgensel sayı dizisinin ilk olarak Ömer Hayyam'ın hesaplamalarında tanımlandığı kabul edilir.  
    //      Pascal üçgeninin kartezyen toplamları kullanılarak Fibonacci dizisini elde etmek de mümkündür.
    //      Yayılım örüntülerini açıklamadaki gücü bakımından Pascal Üçgeni sıkça kullanılan bir argümandır. 
    //      Özetle finansal algoritmalar Hayyam'a çok şey borçludur.

    // Ne işe yarayacak?
    //      Başıma bir iş gelmeyecekse; 
    //      Trendi genellikle yakalar, ama terste bırakma ihtimali de yüksektir. Risk yönetimi bu yüzden gerekli.
    //      Farklı dereceler fiyat frekansını üretebilecek yöntemlere katkı sunabilir.
    //      Hatta ortalamaya ait önceki tepe ve diplerin yeni sinyal yönü için geçerli destek/direnç seviyeleri olarak çalıştığı da oluyor.
    //      Tabi herhangi bir işe yaramayabilir de :).
    ////////////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © Baby_whale_to_moon

    //@version=5

    // BACKTEST DATE
    Start_Time input.time(defval=timestamp('01 January 2017 13:30 +0000'), title='Start_Time'group " ################# BACKTEST DATE ################ " )
    End_Time input.time(defval=timestamp('30 April 2024 19:30 +0000'), title='End_Time'group " ################# BACKTEST DATE ################ " )

    // supertrend 
    atrPeriod input(10'ATR Length'group " #################  Supertrend  ################ ")
    factor77 input(3'Factor'group " #################  Supertrend  ################ ")

    time1 input.string(title='Short Time Period'defval='07 1h'options=['01 1m','02 3m','03 5m',  '04 15m''05 30m''06 45m''07 1h''08 2h''09 3h''10 4h''11 1D''12 1W' ], group " #################  Supertrend  ################ ",tooltip "this timeframe is the value of our short-time supertrend indicator")
    time2 input.string(title='Long Time Period'defval='10 4h'options=[ '01 1m','02 3m','03 5m''04 15m''05 30m''06 45m''07 1h''08 2h''09 3h''10 4h''11 1D''12 1W' ], group " #################  Supertrend  ################ ",tooltip "this timeframe is the value of our long-time supertrend indicator")


    res(Resolution) =>
        if 
    Resolution == '00 Current'
            
    timeframe.period
        
    else
            if 
    Resolution == '01 1m'
                '1'
            
    else
                if 
    Resolution == '02 3m'
                    '3'
                
    else
                    if 
    Resolution == '03 5m'
                        '5'
                    
    else
                        if 
    Resolution == '04 15m'
                            '15'
                        
    else
                            if 
    Resolution == '05 30m'
                                '30'
                            
    else
                                if 
    Resolution == '06 45m'
                                    '45'
                                
    else
                                    if 
    Resolution == '07 1h'
                                        '60'
                                    
    else
                                        if 
    Resolution == '08 2h'
                                            '120'
                                        
    else
                                            if 
    Resolution == '09 3h'
                                                '180'
                                            
    else
                                                if 
    Resolution == '10 4h'
                                                    '240'
                                                
    else
                                                    if 
    Resolution == '11 1D'
                                                        '1D'
                                                    
    else
                                                        if 
    Resolution == '12 1W'
                                                            '1W'
                                                        
    else
                                                            if 
    Resolution == '13 1M'
                                                                '1M'


    // supertrend Long time period 
    [supertrend2direction2] = request.security(syminfo.tickeridres(time2), ta.supertrend(factor77atrPeriod))
    bodyMiddle4 plot((open close) / 2display=display.none)
    upTrend2 plot(direction2 supertrend2 na'seans up'color=color.new(#4caf4f, 100), style=plot.style_linebr, linewidth=2)
    downTrend2 plot(direction2 na supertrend2'seans Down'color=color.new(#ff5252, 100), style=plot.style_linebr, linewidth=2)

    // supertrend short time period 
    [supertrend1direction1] = request.security(syminfo.tickeridres(time1), ta.supertrend(factor77atrPeriod))
    bodyMiddle plot((open close) / 2display=display.none)
    upTrend plot(direction1 supertrend1 na'saat Up 'color=color.new(#ffeb3b, 100), style=plot.style_linebr)
    downTrend plot(direction1 na supertrend1'saat Down 'color=color.new(#ff9900, 100), style=plot.style_linebr)


    // Stochastic RSI
    low_limit_stoch_rsi input.float(title 'Stoch Rsi Low Limit'step=0.5defval=15group " #################  Stoch RSI   ################ "tooltip "when Stock rsi value crossover Low Limit value we get Long")
    up_limit_stoch_rsi input.float(title 'Stoch Rsi Up Limit'step=0.5defval=85group " #################  Stoch RSI   ################ "tooltip "when Stock rsi value crossunder Up Limit value we get Short")
    stocrsi_back_length input.int(20'Stoch Rsi retroactive length'minval=1group " #################  Stoch RSI   ################ "tooltip "How many candles are left behind, even if there is a buy or sell signal, it will be valid now")
    smoothK input.int(3'Stochastic RSI K'minval=1group " #################  Stoch RSI   ################ ")
    lengthRSI input.int(14'RSI Length'minval=1group " #################  Stoch RSI   ################ ")
    lengthStoch input.int(14'Stochastic Length'minval=1group " #################  Stoch RSI   ################ ")
    src_rsi input(closetitle='RSI Source'group " #################  Stoch RSI   ################ ")
    rsi1 request.security(syminfo.tickerid'240'ta.rsi(src_rsilengthRSI))
    request.security(syminfo.tickerid'240'ta.sma(ta.stoch(rsi1rsi1rsi1lengthStoch), smoothK))



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

    //@version=5


    // |++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++|
    // |                                   INPUT                                    |
    // |++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++|
    // SuperTrend
    supAtr input.int(10"ATR Length"1,            group "Supertrend"inline "1")
    factor88 input.float(3.0"   Factor",             group "Supertrend"inline "1")

    pltChk input.bool(true"Show Supertrend Line?"group "Supertrend"inline "2")
    upCol  input.color(color.green"   ",         group "Supertrend"inline "2")
    dnCol  input.color(color.red"",              group "Supertrend"inline "2")

    // Table Style 
    tablePos input.string("Top Right""RunUp Statistics Table Location "
                 [
    "Hide""Top Right" "Middle Right"  "Bottom Right" 
                  
    "Top Center""Middle Center" "Bottom Center"
                  
    "Top Left"  "Middle Left"   "Bottom Left" ], inline "1"group "Fibonacci Run-Up Historical Statistics Table")

    tBgCol input.color(#696969, "Title",     inline = "2", group = "Fibonacci Run-Up Historical Statistics Table")
    cBgCol input.color(#A9A9A9, "     Cell", inline = "2", group = "Fibonacci Run-Up Historical Statistics Table")
    txtCol input.color(#ffffff, "     Text", inline = "2", group = "Fibonacci Run-Up Historical Statistics Table")

    // Line Style
    linExt input.string("None Extend""Lines ‏ ‏",
             [
    "Hide""Right Extend""Left Extend""Both Extend""None Extend"], group "Line & Label Style"inline "line")
    linSty input.string("________"""
             [
    "________""-----------""..........."],                            group "Line & Label Style"inline "line")
    linSiz input.int(2""1tooltip "Line Extend | Line Style | Line Size",  group "Line & Label Style"inline "line")

    // Label Style
    lblPos input.string("Right""Labels", ["Hide""Right"],                     group "Line & Label Style"inline "label")
    lblSty input.string("Percent"""
             [
    "Percent""Value""Price""Percent & Price""Value & Price"],     group "Line & Label Style"inline "label")
    lblSiz input.string("Small"""
             [
    "Auto""Huge""Large""Normal""Small""Tiny"],                  group "Line & Label Style"inline "label",
                 
    tooltip "Label Position | Label Style | Label Size")

    // Fibonacci
    lastSet input.bool(true"Apply Fibonacci Levels to ONLY Last Supertrend Direction"group "Fibonacci Levels")
    confrim input.bool(true"Apply Fibonacci Levels After Confirmed Signal",            group "Fibonacci Levels")


    bgTrans input.int(85"Background Transparency",     0100group "Fibonacci Levels")
    lnTrans input.int(50"Line Transparency          "0100group "Fibonacci Levels")

    trndChk input.bool(true"Show Trend Line",        group "Fibonacci Levels"inline "0")
    trndCol input.color(color.new(#64b5f6, 50), " ", group = "Fibonacci Levels", inline = "0")

    shw01 input.bool(true"",        group "Fibonacci Levels"inline "Level00")
    val01 input.float(0.0"",        group "Fibonacci Levels"inline "Level00")
    col01 input.color(#787b86, "",  group = "Fibonacci Levels", inline = "Level00")

    shw02 input.bool(true"",        group "Fibonacci Levels"inline "Level00")
    val02 input.float(0.236"",      group "Fibonacci Levels"inline "Level00")
    col02 input.color(#f44336,"",   group = "Fibonacci Levels", inline = "Level00")

    shw03 input.bool(true"",        group "Fibonacci Levels"inline "Level01")
    val03 input.float(0.382"",      group "Fibonacci Levels"inline "Level01")
    col03 input.color(#81c784, "",  group = "Fibonacci Levels", inline = "Level01")

    shw04 input.bool(true"",        group "Fibonacci Levels"inline "Level01")
    val04 input.float(0.5"",        group "Fibonacci Levels"inline "Level01")
    col04 input.color(#4caf50, "",  group = "Fibonacci Levels", inline = "Level01")

    shw05 input.bool(true"",        group "Fibonacci Levels"inline "Level02")
    val05 input.float(0.618"",      group "Fibonacci Levels"inline "Level02")
    col05 input.color(#009688, "",  group = "Fibonacci Levels", inline = "Level02")

    shw06 input.bool(true"",        group "Fibonacci Levels"inline "Level02")
    val06 input.float(0.786"",      group "Fibonacci Levels"inline "Level02")
    col06 input.color(#009688, "",  group = "Fibonacci Levels", inline = "Level02")

    shw07 input.bool(true"",        group "Fibonacci Levels"inline "Level03")
    val07 input.float(1.0"",        group "Fibonacci Levels"inline "Level03")
    col07 input.color(#64b5f6, "",  group = "Fibonacci Levels", inline = "Level03")

    shw08 input.bool(true"",        group "Fibonacci Levels"inline "Level03")
    val08 input.float(1.618"",      group "Fibonacci Levels"inline "Level03")
    col08 input.color(#da7d31, "",  group = "Fibonacci Levels", inline = "Level03")

    shw09 input.bool(true"",        group "Fibonacci Levels"inline "Level04")
    val09 input.float(2.1618"",     group "Fibonacci Levels"inline "Level04")
    col09 input.color(#81c784, "",  group = "Fibonacci Levels", inline = "Level04")

    shw10 input.bool(true"",        group "Fibonacci Levels"inline "Level04")
    val10 input.float(3.618"",      group "Fibonacci Levels"inline "Level04")
    col10 input.color(#f44336, "",  group = "Fibonacci Levels", inline = "Level04")

    shw11 input.bool(true"",        group "Fibonacci Levels"inline "Level05")
    val11 input.float(4.236"",      group "Fibonacci Levels"inline "Level05")
    col11 input.color(#809ef0, "",  group = "Fibonacci Levels", inline = "Level05")

    shw12 input.bool(false"",       group "Fibonacci Levels"inline "Level05")
    val12 input.float(1.272"",      group "Fibonacci Levels"inline "Level05")
    col12 input.color(#2962ff, "",  group = "Fibonacci Levels", inline = "Level05")

    shw13 input.bool(false"",       group "Fibonacci Levels"inline "Level06")
    val13 input.float(1.414"",      group "Fibonacci Levels"inline "Level06")
    col13 input.color(#e97527, "",  group = "Fibonacci Levels", inline = "Level06")

    shw14 input.bool(false"",       group "Fibonacci Levels"inline "Level06")
    val14 input.float(2.272"",      group "Fibonacci Levels"inline "Level06")
    col14 input.color(#f44336, "",  group = "Fibonacci Levels", inline = "Level06")

    shw15 input.bool(false"",       group "Fibonacci Levels"inline "Level07")
    val15 input.float(2.414"",      group "Fibonacci Levels"inline "Level07")
    col15 input.color(#9c27b0, "",  group = "Fibonacci Levels", inline = "Level07")

    shw16 input.bool(false"",       group "Fibonacci Levels"inline "Level07")
    val16 input.float(2.0"",        group "Fibonacci Levels"inline "Level07")
    col16 input.color(#b54df1, "",  group = "Fibonacci Levels", inline = "Level07")

    shw17 input.bool(false"",       group "Fibonacci Levels"inline "Level08")
    val17 input.float(3.0"",        group "Fibonacci Levels"inline "Level08")
    col17 input.color(#e91e63, "",  group = "Fibonacci Levels", inline = "Level08")

    shw18 input.bool(false"",       group "Fibonacci Levels"inline "Level08")
    val18 input.float(3.272"",      group "Fibonacci Levels"inline "Level08")
    col18 input.color(#81c784, "",  group = "Fibonacci Levels", inline = "Level08")

    shw19 input.bool(false"",       group "Fibonacci Levels"inline "Level09")
    val19 input.float(3.414"",      group "Fibonacci Levels"inline "Level09")
    col19 input.color(#f44336, "",  group = "Fibonacci Levels", inline = "Level09")

    shw20 input.bool(false"",       group "Fibonacci Levels"inline "Level09")
    val20 input.float(4.0"",        group "Fibonacci Levels"inline "Level09")
    col20 input.color(#81c784, "",  group = "Fibonacci Levels", inline = "Level09")

    shw21 input.bool(false"",       group "Fibonacci Levels"inline "Level10")
    val21 input.float(4.272"",      group "Fibonacci Levels"inline "Level10")
    col21 input.color(#009688, "",  group = "Fibonacci Levels", inline = "Level10")

    shw22 input.bool(false"",       group "Fibonacci Levels"inline "Level10")
    val22 input.float(4.414"",      group "Fibonacci Levels"inline "Level10")
    col22 input.color(#436d87, "",  group = "Fibonacci Levels", inline = "Level10")

    shw23 input.bool(false"",       group "Fibonacci Levels"inline "Level11")
    val23 input.float(4.618"",      group "Fibonacci Levels"inline "Level11")
    col23 input.color(#002396, "",  group = "Fibonacci Levels", inline = "Level11")

    shw24 input.bool(false"",       group "Fibonacci Levels"inline "Level11")
    val24 input.float(4.764"",      group "Fibonacci Levels"inline "Level11")
    col24 input.color(#006696, "",  group = "Fibonacci Levels", inline = "Level11")

    // |++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++|
    // |                                CALCULATION                                 |
    // |++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++|
    // ++++++++++++ Supertrend Indicator
    [superdirc] = ta.supertrend(factor88supAtr)

    var 
    intlSupr float(na),   var rangSupr float(na)
    intlSupr := dirc != dirc[1] ? super                      intlSupr
    rangSupr 
    := dirc != dirc[1] ? math.abs(super super[1]) : rangSupr

    // ++++++++++++ Calculate Fib Levels Function
    fibLev(x) => intlSupr + (dirc == -rangSupr : - rangSupr) * x
    levFib
    (x) => (intlSupr)/ (dirc == -rangSupr : - rangSupr)


    // ++++++++++++ Entered Fibonacci Levels
    var usVal = array.new<float>(na)
    var 
    usCol = array.new<color>(na)
    usValFun(valcolflg) =>
        if 
    flg 
            
    array.push(usValval)
            array.
    push(usColcol)

    if 
    barstate.isfirst
        usValFun
    (val01col01shw01), usValFun(val02col02shw02), usValFun(val03col03shw03), 
        
    usValFun(val04col04shw04), usValFun(val05col05shw05), usValFun(val06col06shw06), 
        
    usValFun(val07col07shw07), usValFun(val08col08shw08), usValFun(val09col09shw09), 
        
    usValFun(val10col10shw10), usValFun(val11col11shw11), usValFun(val12col12shw12), 
        
    usValFun(val13col13shw13), usValFun(val14col14shw14), usValFun(val15col15shw15), 
        
    usValFun(val16col16shw16), usValFun(val17col17shw17), usValFun(val18col18shw18), 
        
    usValFun(val19col19shw19), usValFun(val20col20shw20), usValFun(val21col21shw21), 
        
    usValFun(val22col22shw22), usValFun(val23col23shw23), usValFun(val24col24shw24), 

    inVal = array.new<float>(na)
    for 
    0 to array.size(usVal) - 1
        
    array.push(inValfibLev(array.get(usVali)))
    array.
    sort(inValdirc order.ascending order.descending)

    // |++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++|
    // |                                  DRAWING                                   |
    // |++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++|
    // ++++++++++++ Get Line Style
    styLine(s) =>
        switch 
    s
            
    "..........."  => line.style_dotted   
            
    "-----------"  => line.style_dashed   
            
    "________"     => line.style_solid

    // ++++++++++++ Get Line Extention
    extLine(l) => 
        switch 
    l
            
    "Right Extend" => extend.right
            
    "Left Extend"  => extend.left 
            
    "Both Extend"  => extend.both  
            
    => extend.none

    // ++++++++++++ Get Text Label
    txtLab(x) =>
        
    prt1 str.contains(lblSty"Percent") ? str.tostring(levFib(x) * 100format.percent) + " "
               
    str.contains(lblSty"Value"  ) ? str.tostring(levFib(x)      , "#.###") + " "       ""
        
    prt2 str.contains(lblSty"Price")   ? "(" str.tostring(xformat.mintick) + ")"        ""
        
    (dirc "‏ \n" "") + prt1 prt2 + (dirc " \n‏" "")

    // ++++++++++++ Line Function
    linFunc(x1yx2col) =>
        
    line.new(x1yx2yxloc.bar_indexextLine(linExt), color.new(collnTrans), styLine(linSty), linSiz)

    // ++++++++++++ Label Function 
    labFun(ycol) =>
        
    label.new(bar_indexytxtLab(y), color color.new(col100), size str.lower(lblSiz), 
         
    textcolor colstyle label.style_label_lefttextalign text.align_left)

    // ++++++++++++ Drawing Levels
    var runUp  = array.new<float>(na// Collect RunUp Fib

    var linArr = array.new<line>(na)
    var 
    labArr = array.new<label>(na)

    line trnd  na
    var trndBr 0

    if array.size(inVal) > 0
        
    if dirc != dirc[1]   
            if 
    confrim barstate.isconfirmed true
                
    if lastSet
                    line
    .delete(trnd[trndBr])

                    while array.
    size(linArr) > 0
                        line
    .delete(array.shift(linArr))
                    
                    while array.
    size(labArr) > 0
                        label
    .delete(array.shift(labArr))
                else
                    if array.
    size(linArr) > 0
                        
    for 0 to array.size(linArr) - 1
                            line
    .set_extend(array.get(linArri), extend.none)
                        
                    if array.
    size(labArr) > 0
                        
    for 0 to array.size(labArr) - 1
                            label
    .set_style(array.get(labArri), label.style_label_right)
                        
                    array.
    clear(linArr)
                    array.
    clear(labArr)
                
                array.
    unshift(runUplevFib(close))
                
    trndBr := 0
                
    for 0 to array.size(inVal) - 1
                    
    if not na(array.get(inVali))
                        
    linCol = array.get(usCol, array.indexof(usVallevFib(array.get(inVali))))

                        
    // Line
                        
    if linExt != "Hide"
                            
    array.push(linArrlinFunc(bar_index, array.get(inVali), bar_indexlinCol))

                            if array.
    size(linArr) >  1
                                linefill
    .new(array.get(linArr, array.size(linArr)-2), 
                                             array.
    get(linArr, array.size(linArr)-1), 
                                             
    color.new(linColbgTrans))

                            if 
    trndChk and trndBr == 0
                                trnd 
    := line.new(bar_indexfibLev(1), bar_indexsuper
                                 
    xloc.bar_indexextend.nonetrndColline.style_dashed1)
                                
    trndBr := 1

                        
    // Label
                        
    if lblPos != "Hide"
                            
    array.push(labArrlabFun(array.get(inVali), linCol))     

        else
            if array.
    size(runUp) > 0
                runUpLast 
    = array.get(runUp0)
                
    runUpSrc  =  dirc == -high low
                
    array.set(runUp0runUpLast levFib(runUpSrc) ? runUpLast levFib(runUpSrc))

            if array.
    size(linArr) > 0
                
    for 0 to array.size(linArr) - 1
                    line
    .set_x2(array.get(linArri), bar_index)
            
            if array.
    size(labArr) > 0
                
    for 0 to array.size(labArr) - 1
                    label
    .set_x(array.get(labArri), bar_index)
            
            if 
    trndChk
                line
    .set_x2(trnd[trndBr], bar_index)
                
    trndBr += 1

    // Supertrend Plots and Signals
    //upTrend   = plot(pltChk and dirc < 0 ? super : na, "Up Trend",   upCol, 3, plot.style_linebr)
    //downTrend = plot(pltChk and dirc > 0 ? super : na, "Down Trend", dnCol, 3, plot.style_linebr)

    //plotshape(pltChk and dirc < 0 and dirc != dirc[1] ? super : na, "Long",  shape.labelup,   location.absolute, upCol, 0, "LONG",  color.white, display = display.pane, size = size.small)
    //plotshape(pltChk and dirc > 0 and dirc != dirc[1] ? super : na, "Short", shape.labeldown, location.absolute, dnCol, 0, "SHORT", color.white, display = display.pane, size = size.small)


    // |++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++|
    // |                                 STATISTICS                                 |
    // |++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++|
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[1] Table
    // Get Tbale Location & Size
    locNsze(x) => 
        
    y   str.split(str.lower(x), " ")
        
    out ""
        
    for 0 to array.size(y) - 1
            out 
    := out + array.get(yi)
            if 
    != array.size(y) - 1
                out 
    := out "_"
        
    out

    // Create Table
    var tbl table.new(tablePos != "Hide" locNsze(tablePos) : position.top_right2, array.size(usVal) + 8,
              
    frame_width 1frame_color color.new(tBgCol100), border_width 1border_color color.new(tBgCol100))

    perFib(x) => 
        
    str.contains(lblSty"Percent") ? str.tostring(100format.percent) : str.tostring(x"#.###")

    // Cell Function
    cell(colrowtxtcolor) => 
        
    table.cell(tblcolrowtext txttext_color txtColbgcolor color
         
    text_size size.small)


    // Stats Cells
    applyCell(rowdesval) =>
        
    cell(0row   des,  tBgCol), table.merge_cells(tbl0,    row1,    row)
        
    cell(0row +1val,  cBgCol), table.merge_cells(tbl0row +11row +1)


    if 
    barstate.islast and array.size(runUp) > and tablePos != "Hide"
        
    fibVal = array.copy(usVal)
        array.
    sort(fibValorder.descending)

        
    mtx matrix.new<float>(array.size(fibVal), 20)
        
    matrix.add_col(mtx0fibVal)
        
    totRunUp = array.size(runUp)
        for 
    0 to totRunUp 1
            runup 
    = array.get(runUpi)
            for 
    0 to matrix.rows(mtx) - 1
                
    if not(runup matrix.get(mtxj0))
                    
    matrix.set(mtxj1matrix.get(mtxj1) + 1)
                    
    matrix.set(mtxj2math.round(matrix.get(mtxj1)/totRunUp 1002))
                    break

        
    // Table
        
    if array.size(fibVal) > 0
            table
    .clear(tbl001, array.size(usVal)+7)

            
    0
            cell
    (0y"Historical",  tBgCol), table.merge_cells(tbl0010)
            
    += 1

            cell
    (0y"Fibonacci",   tBgCol)
            
    cell(1y"RunUP (%)",   tBgCol)
            
    += 1

            
    for 0 to matrix.rows(mtx) - 1
                fib 
    matrix.get(mtxi0)
                if 
    fib >= 1
                    Col 
    = array.get(usCol, array.indexof(usValfib))
                    
    cell(0yperFib(fib) ,                 Col)
                    
    cell(1ystr.tostring(matrix.get(mtxi2), format.percent), Col)
                    
    y+=1
            
            
    // Separator
            
    table.cell(tbl0yheight 2), table.merge_cells(tbl0y1y), 
            
    += 1
            
            applyCell
    (y"Number of Trades"str.tostring(array.size(runUp)))
            
    += 2

            applyCell
    (y"Median Fib RunUp"perFib(array.median(runUp)))
            
    += 2

            applyCell
    (y"Mean Fib RunUp"perFib(array.avg(runUp)))
            
    //////////////////////// 
    Doğum tarihim 16/07/2024 olarak güncellenmiştir.

  4. Doğum tarihim 16/07/2024 olarak güncellenmiştir.

  5. https://tr.tradingview.com/script/Ai...Target-Levels/

    fibo kırılımlar....
    https://www.tradingview.com/x/zifJFm8I/


    PHP Code:
     //@version=5
    indicator("deneme"overlay truemax_lines_count 500max_labels_count 500format=format.price)
    ////////////////////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © peacefulLizard50262

    //@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 srcfloat 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

    // Chebyshev Type II Moving Average
    chebyshevII(float srcfloat 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], src)
        
    chebyshev

    chebyshev
    (float srcfloat lengthfloat ripplebool style) =>
        
    style ?
         
    chebyshevI(srclengthripple) :
         
    chebyshevII(srclengthripple)

    source44 input.source(hl2"Source")
    up_color input.color(color.new(color.green20), "Up Color")
    down_color input.color(color.new(color.red20), "Down Color")
    text_color input.color(color.black"Text Color")
    mean_length input.float(24"Mean Length"510000.5)
    mean_ripple input.float(0.5"Mean Ripple"0.010.990.01)
    style44 input.bool(false"True Chebyshev I | False : Chebyshev II")
    atr_style input.bool(true"True: |Open-Close|  False: High-Low")
    atr_length input.float(64"ATR Length"610000.5)
    atr_ripple input.float(0.05"Mean Ripple"0.010.990.01)
    multiplier input.float(1.5"Multiplier"0.125100.125)
    alerts input.bool(false"Alerts")
    labels input.bool(true"Labels")

    atr chebyshev(atr_style high low math.abs(open close), atr_lengthatr_ripplestyle44)
    mean chebyshevI(source44mean_lengthmean_ripple)

    var 
    float offset 0.0
    var bool state na
    var float newOffset 0.0

    crossover 
    ta.crossover(source44offset)
    position source44 offset
    crossunder 
    ta.crossunder(source44offset)

    prevOffset nz(offset[1])

    if 
    crossover[2] and position[1] and position or (position and position[1] and position[2]) 
        
    newOffset := mean atr multiplier
        offset 
    := newOffset nz(prevOffset) or close[1] > nz(prevOffset) ? newOffset nz(prevOffset)
        
    state := true

    if crossunder[2] and not position[1] and not position or (not position and not position[1] and not position[2]) 
        
    newOffset := mean atr multiplier
        offset 
    := newOffset nz(prevOffset) or close[1] < nz(prevOffset) ? newOffset nz(prevOffset)
        
    state := false

    cross 
    ta.cross(closeoffset)

    down_trend not state and not state[1]
    up_trend state and state[1]

    colour up_trend up_color down_trend down_color color.new(color.white100

    if 
    up_trend and not up_trend[1] and labels
        label
    .new(bar_indexoffset"Up Trend \n" str.tostring(close), color up_colorstyle label.style_label_uptextcolor text_color)
        
    alert("Up Trend at " str.tostring(close))
    else
        
    alert("Up Trend at " str.tostring(close))

    if 
    down_trend and not down_trend[1] and labels
        label
    .new(bar_indexoffset"Down Trend \n" str.tostring(close), color down_colorstyle label.style_label_downtextcolor text_color)
        
    alert("Down Trend at " str.tostring(close))
    else
        
    alert("Down Trend at " str.tostring(close))
        
    plot(offset"Trend"colourstyle plot.style_stepline_diamond)

    plotshape(cross"Trend Is Getting Ready To Change"shape.xcrosslocation.belowbarcolor close offset up_color down_color)
    ////////////////////////////////////////////
    /// Creator: Tim Tillson (T3 Moving Average)
    // Author: @dg_factor [09.12.2021]

    // UYARI : 
    // Geliştirme amaçlıdır. Risk yönetimi olmaksızın alım-satım stratejisi yerine ikame edilemez.

    // AÇIKLAMALAR
    // Orijinal hasaplamalara sadık kalınarak farklı derecelerde (1-5) binom açılımları uygulandı. 
    // EMA dahil, toplamda yedi farklı hareketli ortalama türü üzerinde çalışabilen dinamik bir yapı inşa edildi. 
    // Derece ve ortalama türü, opsiyonel birer parametre olarak kullanıcı tercihine sunuldu. 
    // Diğer detaylar en aşağıda.

    //@version=5

    // Inputs
    src     close
    length  
    input(title='Length'defval=20)
    factor  input.float(title='Factor'defval=0.7step=0.1)
    degree  input.int(title='Degree'minval=1maxval=5defval=3tooltip='1-5'group="DEGREE & TYPE")
    ma_type input.string(title="Type"defval="EMA"options=["EMA""RMA""EVMA""GAUS""HULLT""MCGD""TSF"], group="DEGREE & TYPE")

    // MA Functions

    // EVMA [Elastic Volume Weighted Moving Average]
    f_evma(datau1) =>
        
    ta.sma(datau1)
        
    math.sum(volumeu1)
        
    0.0
        r 
    := na(r[1]) ? nz(r[1]) * (volume) / volume data a
    //

    // GAUS [Ehlers - Gaussian Filter]
    f_gaus(datau1) =>
        
    = (math.cos(math.pi u1)) / (math.sqrt(2) - 1)
        
    = -math.sqrt(math.pow(a2) + a)
        
    0.0
        r 
    := na(r[1]) ? data math.pow(b2) * data * (b) * nz(r[1]) - math.pow(b2) * nz(r[2])
    //

    // HULLT [Triple Hull Moving Average]    
    f_hullt(datau1) =>
        
    u1 u1 2
        b 
    u1 u1 3
        r 
    ta.wma(ta.wma(datab) * ta.wma(dataa) - ta.wma(datau1), u1)
    //

    // MCGD [McGinley Dynamic Moving Average]
    f_mcgd(datau1) =>
        
    ta.ema(datau1)
        
    0.0
        r 
    := na(r[1]) ? r[1] + (data r[1]) / (u1 math.pow(data r[1], 4))
    //

    // TSF [Time Series Function]
    f_tsf(datau1) => 
          
    ta.linreg(datau10) - ta.linreg(datau11)

    // MA Return
    f_ma(datau1) => 
          
    ma_type == "EMA"   ta.ema(datau1)  :
          
    ma_type == "EVMA"  f_evma(datau1)  :
          
    ma_type == "GAUS"  f_gaus(datau1)  :
          
    ma_type == "HULLT" f_hullt(datau1) :
          
    ma_type == "MCGD"  f_mcgd(datau1)  :
          
    ma_type == "RMA"   ta.rma(datau1)  :      
          
    ma_type == "TSF"   f_tsf(datau1)   :
          
    na
    //

    // Variables
    factor
    factor 1
    f_ma(srclength)
    f_ma(zlength)


    // Degreed Tillson MA Functions

    d1(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    b0 = -math.pow(x1) * math.pow(y0)
        
    b1 = +math.pow(x0) * math.pow(y1)
        
    b0 a1 b1 a0
    //

    d2(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    a2 f_ma(a1length)
        
    b0 = +math.pow(x2) * math.pow(y0)
        
    b1 = -math.pow(x1) * math.pow(y1)
        
    b2 = +math.pow(x0) * math.pow(y2)
        
    b0 a2 b1 a1 b2 a0
    //

    d3(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    a2 f_ma(a1length)
        
    a3 f_ma(a2length)
        
    b0 = -math.pow(x3) * math.pow(y0)
        
    b1 = +math.pow(x2) * math.pow(y1)
        
    b2 = -math.pow(x1) * math.pow(y2)
        
    b3 = +math.pow(x0) * math.pow(y3)
        
    b0 a3 b1 a2 b2 a1 b3 a0
    //

    d4(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    a2 f_ma(a1length)
        
    a3 f_ma(a2length)
        
    a4 f_ma(a3length)
        
    b0 = +math.pow(x4) * math.pow(y0)
        
    b1 = -math.pow(x3) * math.pow(y1)
        
    b2 = +math.pow(x2) * math.pow(y2)
        
    b3 = -math.pow(x1) * math.pow(y3)
        
    b4 = +math.pow(x0) * math.pow(y4)
        
    b0 a4 b1 a3 b2 a2 b3 a1 b4 a0
    //

    d5(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    a2 f_ma(a1length)
        
    a3 f_ma(a2length)
        
    a4 f_ma(a3length)
        
    a5 f_ma(a4length)
        
    b0 = -1  math.pow(x5) * math.pow(y0)
        
    b1 = +5  math.pow(x4) * math.pow(y1)
        
    b2 = -10 math.pow(x3) * math.pow(y2)
        
    b3 = +10 math.pow(x2) * math.pow(y3)
        
    b4 = -5  math.pow(x1) * math.pow(y4)
        
    b5 = +1  math.pow(x0) * math.pow(y5)
        
    b0 a5 b1 a4 b2 a3 b3 a2 b4 a1 b5 a0
    //

    // Out
    out 
      
    degree == 1  d1(srclength) : 
      
    degree == 2  d2(srclength) : 
      
    degree == 3  d3(srclength) : 
      
    degree == 4  d4(srclength) : 
      
    degree == 5  d5(srclength) :  
      
    na
    //

    // Print
    plot(outcolor=#3082a500, title='Tillson MA')
    barcolor(out out[1] ? #00bb00 : out < out[1] ? #bb0000 : #333333)

    // Bitti
    //plotshape(barstate.isfirst, title="@ dg_factor", color=#13172200, editable=false)

    // DETAYLAR

    // T3'teki "3" nedir?
    //      T3 Moving Average, iç içe kurgulanmış üssel hareketli ortalamaların üçüncü dereceden binom açılımı alınarak hesaplanır. 
    //      T3 şeklinde adlandırılmasının nedeni budur.
    //      Ufak bir matematiksel müdahale ile farklı dereceler kodlanabilir, netekim bu indikatör yöntem olarak çarpanlara ayırma önermektedir.

    // Ömer Hayyam'ın mevzuyla ne ilgisi var?
    //      Binom açılımı, Pascal Üçgeni olarak bilinen bir tamsayı dizisine dayanır.
    //      İsmi Pascal'la anılsa da, bu üçgensel sayı dizisinin ilk olarak Ömer Hayyam'ın hesaplamalarında tanımlandığı kabul edilir.  
    //      Pascal üçgeninin kartezyen toplamları kullanılarak Fibonacci dizisini elde etmek de mümkündür.
    //      Yayılım örüntülerini açıklamadaki gücü bakımından Pascal Üçgeni sıkça kullanılan bir argümandır. 
    //      Özetle finansal algoritmalar Hayyam'a çok şey borçludur.

    // Ne işe yarayacak?
    //      Başıma bir iş gelmeyecekse; 
    //      Trendi genellikle yakalar, ama terste bırakma ihtimali de yüksektir. Risk yönetimi bu yüzden gerekli.
    //      Farklı dereceler fiyat frekansını üretebilecek yöntemlere katkı sunabilir.
    //      Hatta ortalamaya ait önceki tepe ve diplerin yeni sinyal yönü için geçerli destek/direnç seviyeleri olarak çalıştığı da oluyor.
    //      Tabi herhangi bir işe yaramayabilir de :).
    ////////////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © Baby_whale_to_moon

    //@version=5

    // BACKTEST DATE
    Start_Time input.time(defval=timestamp('01 January 2017 13:30 +0000'), title='Start_Time'group " ################# BACKTEST DATE ################ " )
    End_Time input.time(defval=timestamp('30 April 2024 19:30 +0000'), title='End_Time'group " ################# BACKTEST DATE ################ " )

    // supertrend 
    atrPeriod input(10'ATR Length'group " #################  Supertrend  ################ ")
    factor77 input(3'Factor'group " #################  Supertrend  ################ ")

    time1 input.string(title='Short Time Period'defval='07 1h'options=['01 1m','02 3m','03 5m',  '04 15m''05 30m''06 45m''07 1h''08 2h''09 3h''10 4h''11 1D''12 1W' ], group " #################  Supertrend  ################ ",tooltip "this timeframe is the value of our short-time supertrend indicator")
    time2 input.string(title='Long Time Period'defval='10 4h'options=[ '01 1m','02 3m','03 5m''04 15m''05 30m''06 45m''07 1h''08 2h''09 3h''10 4h''11 1D''12 1W' ], group " #################  Supertrend  ################ ",tooltip "this timeframe is the value of our long-time supertrend indicator")


    res(Resolution) =>
        if 
    Resolution == '00 Current'
            
    timeframe.period
        
    else
            if 
    Resolution == '01 1m'
                '1'
            
    else
                if 
    Resolution == '02 3m'
                    '3'
                
    else
                    if 
    Resolution == '03 5m'
                        '5'
                    
    else
                        if 
    Resolution == '04 15m'
                            '15'
                        
    else
                            if 
    Resolution == '05 30m'
                                '30'
                            
    else
                                if 
    Resolution == '06 45m'
                                    '45'
                                
    else
                                    if 
    Resolution == '07 1h'
                                        '60'
                                    
    else
                                        if 
    Resolution == '08 2h'
                                            '120'
                                        
    else
                                            if 
    Resolution == '09 3h'
                                                '180'
                                            
    else
                                                if 
    Resolution == '10 4h'
                                                    '240'
                                                
    else
                                                    if 
    Resolution == '11 1D'
                                                        '1D'
                                                    
    else
                                                        if 
    Resolution == '12 1W'
                                                            '1W'
                                                        
    else
                                                            if 
    Resolution == '13 1M'
                                                                '1M'


    // supertrend Long time period 
    [supertrend2direction2] = request.security(syminfo.tickeridres(time2), ta.supertrend(factor77atrPeriod))
    bodyMiddle4 plot((open close) / 2display=display.none)
    upTrend2 plot(direction2 supertrend2 na'seans up'color=color.new(#4caf4f, 100), style=plot.style_linebr, linewidth=2)
    downTrend2 plot(direction2 na supertrend2'seans Down'color=color.new(#ff5252, 100), style=plot.style_linebr, linewidth=2)

    // supertrend short time period 
    [supertrend1direction1] = request.security(syminfo.tickeridres(time1), ta.supertrend(factor77atrPeriod))
    bodyMiddle plot((open close) / 2display=display.none)
    upTrend plot(direction1 supertrend1 na'saat Up 'color=color.new(#ffeb3b, 100), style=plot.style_linebr)
    downTrend plot(direction1 na supertrend1'saat Down 'color=color.new(#ff9900, 100), style=plot.style_linebr)


    // Stochastic RSI
    low_limit_stoch_rsi input.float(title 'Stoch Rsi Low Limit'step=0.5defval=15group " #################  Stoch RSI   ################ "tooltip "when Stock rsi value crossover Low Limit value we get Long")
    up_limit_stoch_rsi input.float(title 'Stoch Rsi Up Limit'step=0.5defval=85group " #################  Stoch RSI   ################ "tooltip "when Stock rsi value crossunder Up Limit value we get Short")
    stocrsi_back_length input.int(20'Stoch Rsi retroactive length'minval=1group " #################  Stoch RSI   ################ "tooltip "How many candles are left behind, even if there is a buy or sell signal, it will be valid now")
    smoothK input.int(3'Stochastic RSI K'minval=1group " #################  Stoch RSI   ################ ")
    lengthRSI input.int(14'RSI Length'minval=1group " #################  Stoch RSI   ################ ")
    lengthStoch input.int(14'Stochastic Length'minval=1group " #################  Stoch RSI   ################ ")
    src_rsi input(closetitle='RSI Source'group " #################  Stoch RSI   ################ ")
    rsi1 request.security(syminfo.tickerid'240'ta.rsi(src_rsilengthRSI))
    request.security(syminfo.tickerid'240'ta.sma(ta.stoch(rsi1rsi1rsi1lengthStoch), smoothK))
    ////////////////////////////////////////
    //@version=5
    //Variables//
    var int breakOutLevelWidth input.int(1,"Live Breakout Level Width: ")
    var 
    bool disableMovingLines input.bool(true"Disable Fibonnaci Extension Bands: ")
    var 
    int lookBack input.int(3,"Lookback Period")
    var 
    float firstLevel input.float(1.618"Level 1")
    var 
    float secondLevel input.float(2.277"Level 2")
    var 
    float thirdLevel input.float(3.0"Level 3")
    //var float fourthLevel = input.float(3.618, "Level 4")
    //var float fifthLevel = input.float(4.418, "Level 5")



    High(len,fibRate) =>
        
    total ta.highest(len) - ta.lowest(len)
        
    total2 total fibRate
        FIBExtension 
    total2 ta.lowest(len)
    Low(len,fibRate) =>
        
    total ta.highest(len) - ta.lowest(len)
        
    total2 total fibRate
        FIBExtension 
    ta.highest(len) - total2


    // Plot Fibonacci extension levels from the lookback period

    firstLevelPlotHigh plot(disableMovingLines == false High(lookBack,firstLevel) : nacolor=color.rgb(4516855), title="Level 1 High"linewidth=1)
    firstLevelPlotLow plot(disableMovingLines == false Low(lookBack,firstLevel) : nacolor=color.rgb(4516855), title="Level 1 Low"linewidth=1)
    secondLevelPlotHighplot(disableMovingLines == false High(lookBack,secondLevel) : nacolor=color.rgb(2312228), title="Level 2 High"linewidth=1
    secondLevelPlotLow plot(disableMovingLines == false Low(lookBack,secondLevel) : nacolor=color.rgb(2312228), title="Level 2 Low"linewidth=1)
    thirdLevelPlotHigh plot(disableMovingLines == false High(lookBack,thirdLevel) : nacolor=color.rgb(23823429), title="Level 3 High"linewidth=1
    thirdLevelPlotLow plot(disableMovingLines == false Low(lookBack,thirdLevel) : na color=color.rgb(23823429), title="Level 3 Low"linewidth=1)
    //fourthLevelPlotHigh =plot(disableMovingLines == false ? High(lookBack,fourthLevel) : na, color=color.rgb(235, 159, 19), title="Level 4 High", linewidth=1) 
    //fourthLevelPlotLow = plot(disableMovingLines == false ? Low(lookBack,fourthLevel) : na, color=color.rgb(235, 159, 19), title="Level 4 Low", linewidth=1)
    //fifthLevelPlotHigh = plot(disableMovingLines == false ? High(lookBack,fifthLevel) : na, color=color.rgb(221, 30, 30), title="Level 5 High", linewidth=1) 
    //fifthLevelPlotLow = plot(disableMovingLines == false ? Low(lookBack,fifthLevel) : na, color=color.rgb(221, 30, 30), title="Level 5 Low", linewidth=1)

    //Horizontal TP Lines
    var float hi1 na 
    var float lo1 na
    var float hi2 na 
    var float lo2 na
    var float hi3 na 
    var float lo3 na
    //var float hi4 = na 
    //var float lo4 = na
    //var float hi5 = na 
    //var float lo5 = na
    var line firstLevelHighLine na
    var line firstLevelLowLine na 
    var line secondLevelHighLine na 
    var line secondLevelLowLinena 
    var line thirdLevelHighLine na 
    var line thirdLevelLowLine na 
    //var line fourthLevelHighLine = na
    //var line fourthLevelLowLine = na
    //var line fifthLevelHighLine = na
    //var line fifthLevelLowLine = na

    if close

        
    //Cleaning up the graph from the past lines
        
    line.delete(firstLevelHighLine)
        
    line.delete(firstLevelLowLine)
        
    line.delete(secondLevelHighLine)
        
    line.delete(secondLevelLowLine)
        
    line.delete(thirdLevelHighLine)
        
    line.delete(thirdLevelLowLine)
        
    //line.delete(fourthLevelHighLine)
        //line.delete(fourthLevelLowLine)
        //line.delete(fifthLevelHighLine)
        //line.delete(fifthLevelLowLine)
        //////////////////////////
        
    hi1 := High(lookBack,firstLevel)
        
    lo1 := Low(lookBackfirstLevel)
        
    hi2 := High(lookBack,secondLevel)
        
    lo2 := Low(lookBacksecondLevel)
        
    hi3 := High(lookBack,thirdLevel)
        
    lo3 := Low(lookBackthirdLevel)
        
    //hi4 := High(lookBack,fourthLevel)
        //lo4 := Low(lookBack, fourthLevel)
        //hi5 := High(lookBack,fifthLevel)
        //lo5 := Low(lookBack, fifthLevel)
        //////////////////////////
        
    firstLevelHighLine := line.new(bar_index 10,hi1,bar_index,hi1,extend extend.left,color color.rgb(4516855),width breakOutLevelWidth)
        
    firstLevelLowLine := line.new(bar_index 10,lo1,bar_index,lo1,extend extend.left,color color.rgb(4516855),width breakOutLevelWidth)
        
    secondLevelHighLine := line.new(bar_index 10,hi2,bar_index,hi2,extend extend.left,color color.rgb(2312228),width breakOutLevelWidth)
        
    secondLevelLowLine := line.new(bar_index 10,lo2,bar_index,lo2,extend extend.left,color color.rgb(2312228),width breakOutLevelWidth)
        
    thirdLevelHighLine := line.new(bar_index 10,hi3,bar_index,hi3,extend extend.left,color color.rgb(23823429),width breakOutLevelWidth)
        
    thirdLevelLowLine := line.new(bar_index 10,lo3,bar_index,lo3,extend extend.left,color color.rgb(23823429),width breakOutLevelWidth)
        
    //fourthLevelHighLine := line.new(bar_index + 10,hi4,bar_index,hi4,extend = extend.left,color = color.rgb(235, 159, 19),width = breakOutLevelWidth)
        //fourthLevelLowLine := line.new(bar_index + 10,lo4,bar_index,lo4,extend = extend.left,color = color.rgb(235, 159, 19),width = breakOutLevelWidth)
        //fifthLevelHighLine := line.new(bar_index + 10,hi5,bar_index,hi5,extend = extend.left,color = color.rgb(221, 30, 30),width = breakOutLevelWidth)
        //fifthLevelLowLine := line.new(bar_index + 10,lo5,bar_index,lo5,extend = extend.left,color = color.rgb(221, 30, 30),width = breakOutLevelWidth)



    //////////////////// 
    ilk üç fibo hesaplanmış hali birleştirildi....
    Doğum tarihim 16/07/2024 olarak güncellenmiştir.

  6. Doğum tarihim 16/07/2024 olarak güncellenmiştir.

  7. https://tr.tradingview.com/script/o3MCXWkD/

    3 ortalamayı.....isterseniz 5-20-50 gibi belirlediğiniz değerle kessişim bakarsınız....

    isterseniz...5 uzunluğun...saat-seanas-günlük kesişim bakarsınız...
    https://www.tradingview.com/x/0E9dF6z2/

    bu da sade hali....https://www.tradingview.com/x/o9Rz4fXD/

    kodun 5 uzunluk için saat-seanas-gün mtf hali....60-240-720 diye yazdırıldı....



    PHP Code:
     //@version=5
    indicator("deneme"overlay truemax_lines_count 500max_labels_count 500format=format.price)
    ////////////////////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © peacefulLizard50262

    //@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 srcfloat 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

    // Chebyshev Type II Moving Average
    chebyshevII(float srcfloat 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], src)
        
    chebyshev

    chebyshev
    (float srcfloat lengthfloat ripplebool style) =>
        
    style ?
         
    chebyshevI(srclengthripple) :
         
    chebyshevII(srclengthripple)

    source44 input.source(hl2"Source")
    up_color input.color(color.new(color.green20), "Up Color")
    down_color input.color(color.new(color.red20), "Down Color")
    text_color input.color(color.black"Text Color")
    mean_length input.float(24"Mean Length"510000.5)
    mean_ripple input.float(0.5"Mean Ripple"0.010.990.01)
    style44 input.bool(false"True Chebyshev I | False : Chebyshev II")
    atr_style input.bool(true"True: |Open-Close|  False: High-Low")
    atr_length input.float(64"ATR Length"610000.5)
    atr_ripple input.float(0.05"Mean Ripple"0.010.990.01)
    multiplier input.float(1.5"Multiplier"0.125100.125)
    alerts input.bool(false"Alerts")
    labels input.bool(true"Labels")

    atr chebyshev(atr_style high low math.abs(open close), atr_lengthatr_ripplestyle44)
    mean chebyshevI(source44mean_lengthmean_ripple)

    var 
    float offset 0.0
    var bool state na
    var float newOffset 0.0

    crossover 
    ta.crossover(source44offset)
    position source44 offset
    crossunder 
    ta.crossunder(source44offset)

    prevOffset nz(offset[1])

    if 
    crossover[2] and position[1] and position or (position and position[1] and position[2]) 
        
    newOffset := mean atr multiplier
        offset 
    := newOffset nz(prevOffset) or close[1] > nz(prevOffset) ? newOffset nz(prevOffset)
        
    state := true

    if crossunder[2] and not position[1] and not position or (not position and not position[1] and not position[2]) 
        
    newOffset := mean atr multiplier
        offset 
    := newOffset nz(prevOffset) or close[1] < nz(prevOffset) ? newOffset nz(prevOffset)
        
    state := false

    cross 
    ta.cross(closeoffset)

    down_trend not state and not state[1]
    up_trend state and state[1]

    colour up_trend up_color down_trend down_color color.new(color.white100

    if 
    up_trend and not up_trend[1] and labels
        label
    .new(bar_indexoffset"Up Trend \n" str.tostring(close), color up_colorstyle label.style_label_uptextcolor text_color)
        
    alert("Up Trend at " str.tostring(close))
    else
        
    alert("Up Trend at " str.tostring(close))

    if 
    down_trend and not down_trend[1] and labels
        label
    .new(bar_indexoffset"Down Trend \n" str.tostring(close), color down_colorstyle label.style_label_downtextcolor text_color)
        
    alert("Down Trend at " str.tostring(close))
    else
        
    alert("Down Trend at " str.tostring(close))
        
    plot(offset"Trend"colourstyle plot.style_stepline_diamond)

    plotshape(cross"Trend Is Getting Ready To Change"shape.xcrosslocation.belowbarcolor close offset up_color down_color)
    ////////////////////////////////////////////
    /// Creator: Tim Tillson (T3 Moving Average)
    // Author: @dg_factor [09.12.2021]

    // UYARI : 
    // Geliştirme amaçlıdır. Risk yönetimi olmaksızın alım-satım stratejisi yerine ikame edilemez.

    // AÇIKLAMALAR
    // Orijinal hasaplamalara sadık kalınarak farklı derecelerde (1-5) binom açılımları uygulandı. 
    // EMA dahil, toplamda yedi farklı hareketli ortalama türü üzerinde çalışabilen dinamik bir yapı inşa edildi. 
    // Derece ve ortalama türü, opsiyonel birer parametre olarak kullanıcı tercihine sunuldu. 
    // Diğer detaylar en aşağıda.

    //@version=5

    // Inputs
    src     close
    length  
    input(title='Length'defval=20)
    factor  input.float(title='Factor'defval=0.7step=0.1)
    degree  input.int(title='Degree'minval=1maxval=5defval=3tooltip='1-5'group="DEGREE & TYPE")
    ma_type input.string(title="Type"defval="EMA"options=["EMA""RMA""EVMA""GAUS""HULLT""MCGD""TSF"], group="DEGREE & TYPE")

    // MA Functions

    // EVMA [Elastic Volume Weighted Moving Average]
    f_evma(datau1) =>
        
    ta.sma(datau1)
        
    math.sum(volumeu1)
        
    0.0
        r 
    := na(r[1]) ? nz(r[1]) * (volume) / volume data a
    //

    // GAUS [Ehlers - Gaussian Filter]
    f_gaus(datau1) =>
        
    = (math.cos(math.pi u1)) / (math.sqrt(2) - 1)
        
    = -math.sqrt(math.pow(a2) + a)
        
    0.0
        r 
    := na(r[1]) ? data math.pow(b2) * data * (b) * nz(r[1]) - math.pow(b2) * nz(r[2])
    //

    // HULLT [Triple Hull Moving Average]    
    f_hullt(datau1) =>
        
    u1 u1 2
        b 
    u1 u1 3
        r 
    ta.wma(ta.wma(datab) * ta.wma(dataa) - ta.wma(datau1), u1)
    //

    // MCGD [McGinley Dynamic Moving Average]
    f_mcgd(datau1) =>
        
    ta.ema(datau1)
        
    0.0
        r 
    := na(r[1]) ? r[1] + (data r[1]) / (u1 math.pow(data r[1], 4))
    //

    // TSF [Time Series Function]
    f_tsf(datau1) => 
          
    ta.linreg(datau10) - ta.linreg(datau11)

    // MA Return
    f_ma(datau1) => 
          
    ma_type == "EMA"   ta.ema(datau1)  :
          
    ma_type == "EVMA"  f_evma(datau1)  :
          
    ma_type == "GAUS"  f_gaus(datau1)  :
          
    ma_type == "HULLT" f_hullt(datau1) :
          
    ma_type == "MCGD"  f_mcgd(datau1)  :
          
    ma_type == "RMA"   ta.rma(datau1)  :      
          
    ma_type == "TSF"   f_tsf(datau1)   :
          
    na
    //

    // Variables
    factor
    factor 1
    f_ma(srclength)
    f_ma(zlength)


    // Degreed Tillson MA Functions

    d1(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    b0 = -math.pow(x1) * math.pow(y0)
        
    b1 = +math.pow(x0) * math.pow(y1)
        
    b0 a1 b1 a0
    //

    d2(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    a2 f_ma(a1length)
        
    b0 = +math.pow(x2) * math.pow(y0)
        
    b1 = -math.pow(x1) * math.pow(y1)
        
    b2 = +math.pow(x0) * math.pow(y2)
        
    b0 a2 b1 a1 b2 a0
    //

    d3(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    a2 f_ma(a1length)
        
    a3 f_ma(a2length)
        
    b0 = -math.pow(x3) * math.pow(y0)
        
    b1 = +math.pow(x2) * math.pow(y1)
        
    b2 = -math.pow(x1) * math.pow(y2)
        
    b3 = +math.pow(x0) * math.pow(y3)
        
    b0 a3 b1 a2 b2 a1 b3 a0
    //

    d4(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    a2 f_ma(a1length)
        
    a3 f_ma(a2length)
        
    a4 f_ma(a3length)
        
    b0 = +math.pow(x4) * math.pow(y0)
        
    b1 = -math.pow(x3) * math.pow(y1)
        
    b2 = +math.pow(x2) * math.pow(y2)
        
    b3 = -math.pow(x1) * math.pow(y3)
        
    b4 = +math.pow(x0) * math.pow(y4)
        
    b0 a4 b1 a3 b2 a2 b3 a1 b4 a0
    //

    d5(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    a2 f_ma(a1length)
        
    a3 f_ma(a2length)
        
    a4 f_ma(a3length)
        
    a5 f_ma(a4length)
        
    b0 = -1  math.pow(x5) * math.pow(y0)
        
    b1 = +5  math.pow(x4) * math.pow(y1)
        
    b2 = -10 math.pow(x3) * math.pow(y2)
        
    b3 = +10 math.pow(x2) * math.pow(y3)
        
    b4 = -5  math.pow(x1) * math.pow(y4)
        
    b5 = +1  math.pow(x0) * math.pow(y5)
        
    b0 a5 b1 a4 b2 a3 b3 a2 b4 a1 b5 a0
    //

    // Out
    out 
      
    degree == 1  d1(srclength) : 
      
    degree == 2  d2(srclength) : 
      
    degree == 3  d3(srclength) : 
      
    degree == 4  d4(srclength) : 
      
    degree == 5  d5(srclength) :  
      
    na
    //

    // Print
    plot(outcolor=#3082a500, title='Tillson MA')
    barcolor(out out[1] ? #00bb00 : out < out[1] ? #bb0000 : #333333)

    // Bitti
    //plotshape(barstate.isfirst, title="@ dg_factor", color=#13172200, editable=false)

    // DETAYLAR

    // T3'teki "3" nedir?
    //      T3 Moving Average, iç içe kurgulanmış üssel hareketli ortalamaların üçüncü dereceden binom açılımı alınarak hesaplanır. 
    //      T3 şeklinde adlandırılmasının nedeni budur.
    //      Ufak bir matematiksel müdahale ile farklı dereceler kodlanabilir, netekim bu indikatör yöntem olarak çarpanlara ayırma önermektedir.

    // Ömer Hayyam'ın mevzuyla ne ilgisi var?
    //      Binom açılımı, Pascal Üçgeni olarak bilinen bir tamsayı dizisine dayanır.
    //      İsmi Pascal'la anılsa da, bu üçgensel sayı dizisinin ilk olarak Ömer Hayyam'ın hesaplamalarında tanımlandığı kabul edilir.  
    //      Pascal üçgeninin kartezyen toplamları kullanılarak Fibonacci dizisini elde etmek de mümkündür.
    //      Yayılım örüntülerini açıklamadaki gücü bakımından Pascal Üçgeni sıkça kullanılan bir argümandır. 
    //      Özetle finansal algoritmalar Hayyam'a çok şey borçludur.

    // Ne işe yarayacak?
    //      Başıma bir iş gelmeyecekse; 
    //      Trendi genellikle yakalar, ama terste bırakma ihtimali de yüksektir. Risk yönetimi bu yüzden gerekli.
    //      Farklı dereceler fiyat frekansını üretebilecek yöntemlere katkı sunabilir.
    //      Hatta ortalamaya ait önceki tepe ve diplerin yeni sinyal yönü için geçerli destek/direnç seviyeleri olarak çalıştığı da oluyor.
    //      Tabi herhangi bir işe yaramayabilir de :).
    ////////////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © Baby_whale_to_moon

    //@version=5

    // BACKTEST DATE
    Start_Time input.time(defval=timestamp('01 January 2017 13:30 +0000'), title='Start_Time'group " ################# BACKTEST DATE ################ " )
    End_Time input.time(defval=timestamp('30 April 2024 19:30 +0000'), title='End_Time'group " ################# BACKTEST DATE ################ " )

    // supertrend 
    atrPeriod input(10'ATR Length'group " #################  Supertrend  ################ ")
    factor77 input(3'Factor'group " #################  Supertrend  ################ ")

    time1 input.string(title='Short Time Period'defval='07 1h'options=['01 1m','02 3m','03 5m',  '04 15m''05 30m''06 45m''07 1h''08 2h''09 3h''10 4h''11 1D''12 1W' ], group " #################  Supertrend  ################ ",tooltip "this timeframe is the value of our short-time supertrend indicator")
    time2 input.string(title='Long Time Period'defval='10 4h'options=[ '01 1m','02 3m','03 5m''04 15m''05 30m''06 45m''07 1h''08 2h''09 3h''10 4h''11 1D''12 1W' ], group " #################  Supertrend  ################ ",tooltip "this timeframe is the value of our long-time supertrend indicator")


    res(Resolution) =>
        if 
    Resolution == '00 Current'
            
    timeframe.period
        
    else
            if 
    Resolution == '01 1m'
                '1'
            
    else
                if 
    Resolution == '02 3m'
                    '3'
                
    else
                    if 
    Resolution == '03 5m'
                        '5'
                    
    else
                        if 
    Resolution == '04 15m'
                            '15'
                        
    else
                            if 
    Resolution == '05 30m'
                                '30'
                            
    else
                                if 
    Resolution == '06 45m'
                                    '45'
                                
    else
                                    if 
    Resolution == '07 1h'
                                        '60'
                                    
    else
                                        if 
    Resolution == '08 2h'
                                            '120'
                                        
    else
                                            if 
    Resolution == '09 3h'
                                                '180'
                                            
    else
                                                if 
    Resolution == '10 4h'
                                                    '240'
                                                
    else
                                                    if 
    Resolution == '11 1D'
                                                        '1D'
                                                    
    else
                                                        if 
    Resolution == '12 1W'
                                                            '1W'
                                                        
    else
                                                            if 
    Resolution == '13 1M'
                                                                '1M'


    // supertrend Long time period 
    [supertrend2direction2] = request.security(syminfo.tickeridres(time2), ta.supertrend(factor77atrPeriod))
    bodyMiddle4 plot((open close) / 2display=display.none)
    upTrend2 plot(direction2 supertrend2 na'seans up'color=color.new(#4caf4f, 100), style=plot.style_linebr, linewidth=2)
    downTrend2 plot(direction2 na supertrend2'seans Down'color=color.new(#ff5252, 100), style=plot.style_linebr, linewidth=2)

    // supertrend short time period 
    [supertrend1direction1] = request.security(syminfo.tickeridres(time1), ta.supertrend(factor77atrPeriod))
    bodyMiddle plot((open close) / 2display=display.none)
    upTrend plot(direction1 supertrend1 na'saat Up 'color=color.new(#ffeb3b, 100), style=plot.style_linebr)
    downTrend plot(direction1 na supertrend1'saat Down 'color=color.new(#ff9900, 100), style=plot.style_linebr)


    // Stochastic RSI
    low_limit_stoch_rsi input.float(title 'Stoch Rsi Low Limit'step=0.5defval=15group " #################  Stoch RSI   ################ "tooltip "when Stock rsi value crossover Low Limit value we get Long")
    up_limit_stoch_rsi input.float(title 'Stoch Rsi Up Limit'step=0.5defval=85group " #################  Stoch RSI   ################ "tooltip "when Stock rsi value crossunder Up Limit value we get Short")
    stocrsi_back_length input.int(20'Stoch Rsi retroactive length'minval=1group " #################  Stoch RSI   ################ "tooltip "How many candles are left behind, even if there is a buy or sell signal, it will be valid now")
    smoothK input.int(3'Stochastic RSI K'minval=1group " #################  Stoch RSI   ################ ")
    lengthRSI input.int(14'RSI Length'minval=1group " #################  Stoch RSI   ################ ")
    lengthStoch input.int(14'Stochastic Length'minval=1group " #################  Stoch RSI   ################ ")
    src_rsi input(closetitle='RSI Source'group " #################  Stoch RSI   ################ ")
    rsi1 request.security(syminfo.tickerid'240'ta.rsi(src_rsilengthRSI))
    request.security(syminfo.tickerid'240'ta.sma(ta.stoch(rsi1rsi1rsi1lengthStoch), smoothK))
    ////////////////////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © Moller1_
    //@version=5
    //// --------------------------------------------------------------------------
    //// Triple Moving Averages and Timeframes ------------------------------------
    ma_group_1 'Triple MA and TF 1'
    ma_plot_1 input.bool(true'Plot MA 1'group=ma_group_1)
    ma_chart_type_1 input.string('Standard''Tipo de gráfico'groupma_group_1
         
    options =['Standard''Heikin Ashi''Kagi''Line Break''Point & Figure''Renko'])
    ma_timeframe_1 input.timeframe('60''MA 1 TF'group=ma_group_1)
    ma_source_1 input.source(high'MA 1 Source'group=ma_group_1)
    ma_variable_1 input.string('EMA'title='MA 1 Type',
         
    options=['EMA''SMA''WMA''VWMA''SWMA''SMMA''DEMA''RMA' ,'HMA''TEMA''THMA''EHMA''Donchian''TMA''LSMA''McGinley''COVWMA''FRAMA''VIDYA''KAMA''ZEMA'], group=ma_group_1)
    ma_len_1 input.int(5title='MA 1 Len'step=5group=ma_group_1)

    ma_group_2 'Triple MA and TF 2'
    ma_plot_2 input.bool(true'Plot MA 2'group=ma_group_2)
    ma_chart_type_2 input.string('Standard''Tipo de gráfico'groupma_group_2
         
    options =['Standard''Heikin Ashi''Kagi''Line Break''Point & Figure''Renko'])
    ma_timeframe_2 input.timeframe('240''MA 2 TF'group=ma_group_2)
    ma_source_2 input.source(high'MA 2 Source'group=ma_group_2)
    ma_variable_2 input.string('EMA'title='MA 2 Type',
         
    options=['EMA''SMA''WMA''VWMA''SWMA''SMMA''DEMA''RMA' ,'HMA''TEMA''THMA''EHMA''Donchian''TMA''LSMA''McGinley''COVWMA''FRAMA''VIDYA''KAMA''ZEMA'], group=ma_group_2)
    ma_len_2 input.int(5title='MA 2 Len'step=5group=ma_group_2)

    ma_group_3 'Triple MA and TF 3'
    ma_plot_3 input.bool(true'Plot MA 3'group=ma_group_3)
    ma_chart_type_3 input.string('Standard''Tipo de gráfico'groupma_group_3
         
    options =['Standard''Heikin Ashi''Kagi''Line Break''Point & Figure''Renko'])
    ma_timeframe_3 input.timeframe('720''MA 3 TF'group=ma_group_3)
    ma_source_3 input.source(high'MA 3 Source'group=ma_group_3)
    ma_variable_3 input.string('EMA'title='MA 3 Type',
         
    options=['EMA''SMA''WMA''VWMA''SWMA''SMMA''DEMA''RMA' ,'HMA''TEMA''THMA''EHMA''Donchian''TMA''LSMA''McGinley''COVWMA''FRAMA''VIDYA''KAMA''ZEMA'], group=ma_group_3)
    ma_len_3 input.int(5title='MA 3 Len'step=5group=ma_group_3)
    //// ------------------------------------------------------------------

    //// Functions 
    //// Non-Standard Charts
    chart(chart)=>
        switch 
    chart
            
    'Heikin Ashi'   => ticker.heikinashi(syminfo.tickerid)
            
    'Standard'      => ticker.standard(syminfo.tickerid)
            
    'Kagi'          => ticker.kagi(syminfo.tickerid3)
            
    'Line Break'    => ticker.linebreak(syminfo.tickerid3)
            
    'Point & Figure'=> ticker.pointfigure(syminfo.tickerid"hl""Traditional"13)
            
    'Renko'         => ticker.renko(syminfo.tickerid"ATR"10)
    // Chande Momentum Oscillator
    FuncCMO(_src_period) =>
        
    tmpMomentum ta.change(_src)
        
    tmpSummaryUp math.sum(math.max(tmpMomentum0), _period)
        
    tmpSummaryDown math.sum(-math.min(tmpMomentum0), _period)
        
    math.abs((tmpSummaryUp tmpSummaryDown) / (tmpSummaryUp tmpSummaryDown))
    // Fractal Adaptive Moving Average (FRAMA)
    FuncFRAMA(_src_period) =>
        
    _coefficient = -4.6
        _n3 
    = (ta.highest(high_period) - ta.lowest(low_period)) / _period
        _hd2 
    ta.highest(high_period 2)
        
    _ld2 ta.lowest(low_period 2)
        
    _n2 = (_hd2 _ld2) / (_period 2)
        
    _n1 = (_hd2[_period 2] - _ld2[_period 2]) / (_period 2)
        
    _dim _n1 and _n2 and _n3 ? (math.log(_n1 _n2) - math.log(_n3)) / math.log(2) : 0
        _alpha 
    math.exp(_coefficient * (_dim 1))
        
    _sc _alpha 0.01 0.01 _alpha _alpha
        ta
    .cum(1) <= _period _src _src _sc nz(_src[1]) * (_sc)

    // Variable Index Dynamic Average (VIDYA)
    FuncVIDYA(_src_period) =>
        
    cmo FuncCMO(_src_period)
        
    alpha / (_period 1)
        
    vidya 0.0
        vidya 
    := _src alpha cmo nz(vidya[1]) * (alpha cmo)
        
    vidya

    // Kaufman's Adaptive Moving Average (KAMA)
    FuncKAMA(_src_period) =>
        
    tmpVal 0.0
        sum_1 
    math.sum(math.abs(_src _src[1]), _period)
        
    sum_2 math.sum(math.abs(_src _src[1]), _period)
        
    tmpVal := nz(tmpVal[1]) + math.pow((sum_1 != math.abs(_src _src[_period]) / sum_2 0) * (0.666 0.0645) + 0.06452) * (_src nz(tmpVal[1]))
        
    tmpVal
    // ZEMA
    FuncZEMA(srclen) =>
        
    lag = (len 1) / 2
        emaSrc 
    src src src[lag]
        
    v10 ta.ema(emaSrclen)
        
    v10

    // export ma_calculate(string variable_ma = 'EMA', float source, simple int len)=>
    ma_calculate(variable_ma 'EMA'sourcelen)=>
        
    float smma na
        float mg 
    na
        
    switch variable_ma
            
    'EMA'     => ta.ema(sourcelen)
            
    'SMA'     => ta.sma(sourcelen)
            
    'WMA'     => ta.wma(sourcelen)
            
    'VWMA'    => ta.vwma(sourcelen)
            
    'SWMA'    => ta.swma(source)
            
    'SMMA'    => na(smma[1]) ? ta.sma(sourcelen) : (smma[1] * (len 1) + source) / len
            
    'DEMA'    => ta.ema(sourcelen) - ta.ema(ta.ema(sourcelen), len)
            
    'RMA '    => ta.rma(sourcelen)
            
    'HMA'     => ta.hma(sourcelen)
            
    'TEMA'    => * (ta.ema(sourcelen) - ta.ema(ta.ema(sourcelen), len)) + ta.ema(ta.ema(ta.ema(sourcelen), len), len)
            
    'THMA'    => (ta.wma(ta.wma(source,(len/2) / 3) * ta.wma(source, (len/2) / 2) - ta.wma(source, (len/2)), (len/2)))
            
    'EHMA'    => (ta.ema(ta.ema(sourcelen 2) - ta.ema(sourcelen), math.round(math.sqrt(len))))
            
    'Donchian'=> ((math.avg(ta.lowest(len), ta.highest(len))) + (math.avg(ta.lowest(len/2), ta.highest(len/2))))/2
            
    'TMA'     => ta.sma(ta.sma(sourcemath.ceil(len 2)), math.floor(len 2) + 1)
            
    'LSMA'    => ta.linreg(sourcelen0)
            
    'McGinley'=> na(mg[1]) ? ta.ema(sourcelen) : mg[1] + (source mg[1]) / (len math.pow(source mg[1], 4))
            
    // Coefficient of Variation Weighted Moving Average (COVWMA)
            
    'COVWMA'  => math.sum((source * (ta.stdev(sourcelen) / ta.sma(sourcelen))), len) / math.sum((ta.stdev(sourcelen) / ta.sma(sourcelen)), len)
            
    'FRAMA'  => FuncFRAMA(sourcelen)
            
    'VIDYA'  => FuncVIDYA(sourcelen)
            
    'KAMA'   => FuncKAMA(sourcelen)
            
    'ZEMA'   => FuncZEMA(sourcelen)
            =>
                
    runtime.error("No matching MA type found.")
                
    float(na)

    ma_1 request.security(chart(ma_chart_type_1), ma_timeframe_1ma_calculate(ma_variable_1ma_source_1ma_len_1))
    ma_2 request.security(chart(ma_chart_type_2), ma_timeframe_2ma_calculate(ma_variable_2ma_source_2ma_len_2))
    ma_3 request.security(chart(ma_chart_type_3), ma_timeframe_3ma_calculate(ma_variable_3ma_source_3ma_len_3))

    plot(ma_plot_1ma_1na'60'color color.rgb(33149243100))
    plot(ma_plot_2ma_2na'240'color color.rgb(25523559100))
    plot(ma_plot_3ma_3na'720'color color.rgb(255255255100)) 
    Doğum tarihim 16/07/2024 olarak güncellenmiştir.

  8. https://tr.tradingview.com/script/FT...versal-picker/

    çok güzelmiş...
    14-200 smayı rsi ile ilişkilendirmiş...
    önce rsiyi...50 üstü ve altı ayırmış...

    sonra 19-21 smayı...14 rside 65-35 ile ilişkilendirmiş....
    böylece destek ve direnç çizdirmiş....
    https://www.tradingview.com/x/HAYhfHdk/

    hayal edin....
    bunu mom-sar-v.b ile ilişkilendirilse....

    çizgiler...mom direnci....rsi direnci...sar direnci gibi oluşacak...desteklerde öyle...

    üzerinde çalışmak lazım......

    PHP Code:
     //@version=5
    indicator("deneme"overlay truemax_lines_count 500max_labels_count 500format=format.price)
    ////////////////////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © peacefulLizard50262

    //@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 srcfloat 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

    // Chebyshev Type II Moving Average
    chebyshevII(float srcfloat 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], src)
        
    chebyshev

    chebyshev
    (float srcfloat lengthfloat ripplebool style) =>
        
    style ?
         
    chebyshevI(srclengthripple) :
         
    chebyshevII(srclengthripple)

    source44 input.source(hl2"Source")
    up_color input.color(color.new(color.green20), "Up Color")
    down_color input.color(color.new(color.red20), "Down Color")
    text_color input.color(color.black"Text Color")
    mean_length input.float(24"Mean Length"510000.5)
    mean_ripple input.float(0.5"Mean Ripple"0.010.990.01)
    style44 input.bool(false"True Chebyshev I | False : Chebyshev II")
    atr_style input.bool(true"True: |Open-Close|  False: High-Low")
    atr_length input.float(64"ATR Length"610000.5)
    atr_ripple input.float(0.05"Mean Ripple"0.010.990.01)
    multiplier input.float(1.5"Multiplier"0.125100.125)
    alerts input.bool(false"Alerts")
    labels input.bool(true"Labels")

    atr chebyshev(atr_style high low math.abs(open close), atr_lengthatr_ripplestyle44)
    mean chebyshevI(source44mean_lengthmean_ripple)

    var 
    float offset 0.0
    var bool state na
    var float newOffset 0.0

    crossover 
    ta.crossover(source44offset)
    position source44 offset
    crossunder 
    ta.crossunder(source44offset)

    prevOffset nz(offset[1])

    if 
    crossover[2] and position[1] and position or (position and position[1] and position[2]) 
        
    newOffset := mean atr multiplier
        offset 
    := newOffset nz(prevOffset) or close[1] > nz(prevOffset) ? newOffset nz(prevOffset)
        
    state := true

    if crossunder[2] and not position[1] and not position or (not position and not position[1] and not position[2]) 
        
    newOffset := mean atr multiplier
        offset 
    := newOffset nz(prevOffset) or close[1] < nz(prevOffset) ? newOffset nz(prevOffset)
        
    state := false

    cross 
    ta.cross(closeoffset)

    down_trend not state and not state[1]
    up_trend state and state[1]

    colour up_trend up_color down_trend down_color color.new(color.white100

    if 
    up_trend and not up_trend[1] and labels
        label
    .new(bar_indexoffset"Up Trend \n" str.tostring(close), color up_colorstyle label.style_label_uptextcolor text_color)
        
    alert("Up Trend at " str.tostring(close))
    else
        
    alert("Up Trend at " str.tostring(close))

    if 
    down_trend and not down_trend[1] and labels
        label
    .new(bar_indexoffset"Down Trend \n" str.tostring(close), color down_colorstyle label.style_label_downtextcolor text_color)
        
    alert("Down Trend at " str.tostring(close))
    else
        
    alert("Down Trend at " str.tostring(close))
        
    plot(offset"Trend"colourstyle plot.style_stepline_diamond)

    plotshape(cross"Trend Is Getting Ready To Change"shape.xcrosslocation.belowbarcolor close offset up_color down_color)
    ////////////////////////////////////////////
    /// Creator: Tim Tillson (T3 Moving Average)
    // Author: @dg_factor [09.12.2021]

    // UYARI : 
    // Geliştirme amaçlıdır. Risk yönetimi olmaksızın alım-satım stratejisi yerine ikame edilemez.

    // AÇIKLAMALAR
    // Orijinal hasaplamalara sadık kalınarak farklı derecelerde (1-5) binom açılımları uygulandı. 
    // EMA dahil, toplamda yedi farklı hareketli ortalama türü üzerinde çalışabilen dinamik bir yapı inşa edildi. 
    // Derece ve ortalama türü, opsiyonel birer parametre olarak kullanıcı tercihine sunuldu. 
    // Diğer detaylar en aşağıda.

    //@version=5

    // Inputs
    src     close
    length  
    input(title='Length'defval=20)
    factor  input.float(title='Factor'defval=0.7step=0.1)
    degree  input.int(title='Degree'minval=1maxval=5defval=3tooltip='1-5'group="DEGREE & TYPE")
    ma_type input.string(title="Type"defval="EMA"options=["EMA""RMA""EVMA""GAUS""HULLT""MCGD""TSF"], group="DEGREE & TYPE")

    // MA Functions

    // EVMA [Elastic Volume Weighted Moving Average]
    f_evma(datau1) =>
        
    ta.sma(datau1)
        
    math.sum(volumeu1)
        
    0.0
        r 
    := na(r[1]) ? nz(r[1]) * (volume) / volume data a
    //

    // GAUS [Ehlers - Gaussian Filter]
    f_gaus(datau1) =>
        
    = (math.cos(math.pi u1)) / (math.sqrt(2) - 1)
        
    = -math.sqrt(math.pow(a2) + a)
        
    0.0
        r 
    := na(r[1]) ? data math.pow(b2) * data * (b) * nz(r[1]) - math.pow(b2) * nz(r[2])
    //

    // HULLT [Triple Hull Moving Average]    
    f_hullt(datau1) =>
        
    u1 u1 2
        b 
    u1 u1 3
        r 
    ta.wma(ta.wma(datab) * ta.wma(dataa) - ta.wma(datau1), u1)
    //

    // MCGD [McGinley Dynamic Moving Average]
    f_mcgd(datau1) =>
        
    ta.ema(datau1)
        
    0.0
        r 
    := na(r[1]) ? r[1] + (data r[1]) / (u1 math.pow(data r[1], 4))
    //

    // TSF [Time Series Function]
    f_tsf(datau1) => 
          
    ta.linreg(datau10) - ta.linreg(datau11)

    // MA Return
    f_ma(datau1) => 
          
    ma_type == "EMA"   ta.ema(datau1)  :
          
    ma_type == "EVMA"  f_evma(datau1)  :
          
    ma_type == "GAUS"  f_gaus(datau1)  :
          
    ma_type == "HULLT" f_hullt(datau1) :
          
    ma_type == "MCGD"  f_mcgd(datau1)  :
          
    ma_type == "RMA"   ta.rma(datau1)  :      
          
    ma_type == "TSF"   f_tsf(datau1)   :
          
    na
    //

    // Variables
    factor
    factor 1
    f_ma(srclength)
    f_ma(zlength)


    // Degreed Tillson MA Functions

    d1(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    b0 = -math.pow(x1) * math.pow(y0)
        
    b1 = +math.pow(x0) * math.pow(y1)
        
    b0 a1 b1 a0
    //

    d2(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    a2 f_ma(a1length)
        
    b0 = +math.pow(x2) * math.pow(y0)
        
    b1 = -math.pow(x1) * math.pow(y1)
        
    b2 = +math.pow(x0) * math.pow(y2)
        
    b0 a2 b1 a1 b2 a0
    //

    d3(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    a2 f_ma(a1length)
        
    a3 f_ma(a2length)
        
    b0 = -math.pow(x3) * math.pow(y0)
        
    b1 = +math.pow(x2) * math.pow(y1)
        
    b2 = -math.pow(x1) * math.pow(y2)
        
    b3 = +math.pow(x0) * math.pow(y3)
        
    b0 a3 b1 a2 b2 a1 b3 a0
    //

    d4(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    a2 f_ma(a1length)
        
    a3 f_ma(a2length)
        
    a4 f_ma(a3length)
        
    b0 = +math.pow(x4) * math.pow(y0)
        
    b1 = -math.pow(x3) * math.pow(y1)
        
    b2 = +math.pow(x2) * math.pow(y2)
        
    b3 = -math.pow(x1) * math.pow(y3)
        
    b4 = +math.pow(x0) * math.pow(y4)
        
    b0 a4 b1 a3 b2 a2 b3 a1 b4 a0
    //

    d5(srclength) =>
        
    a0 f_ma(nlength)
        
    a1 f_ma(a0length)
        
    a2 f_ma(a1length)
        
    a3 f_ma(a2length)
        
    a4 f_ma(a3length)
        
    a5 f_ma(a4length)
        
    b0 = -1  math.pow(x5) * math.pow(y0)
        
    b1 = +5  math.pow(x4) * math.pow(y1)
        
    b2 = -10 math.pow(x3) * math.pow(y2)
        
    b3 = +10 math.pow(x2) * math.pow(y3)
        
    b4 = -5  math.pow(x1) * math.pow(y4)
        
    b5 = +1  math.pow(x0) * math.pow(y5)
        
    b0 a5 b1 a4 b2 a3 b3 a2 b4 a1 b5 a0
    //

    // Out
    out 
      
    degree == 1  d1(srclength) : 
      
    degree == 2  d2(srclength) : 
      
    degree == 3  d3(srclength) : 
      
    degree == 4  d4(srclength) : 
      
    degree == 5  d5(srclength) :  
      
    na
    //

    // Print
    plot(outcolor=#3082a500, title='Tillson MA')
    barcolor(out out[1] ? #00bb00 : out < out[1] ? #bb0000 : #333333)

    // Bitti
    //plotshape(barstate.isfirst, title="@ dg_factor", color=#13172200, editable=false)

    // DETAYLAR

    // T3'teki "3" nedir?
    //      T3 Moving Average, iç içe kurgulanmış üssel hareketli ortalamaların üçüncü dereceden binom açılımı alınarak hesaplanır. 
    //      T3 şeklinde adlandırılmasının nedeni budur.
    //      Ufak bir matematiksel müdahale ile farklı dereceler kodlanabilir, netekim bu indikatör yöntem olarak çarpanlara ayırma önermektedir.

    // Ömer Hayyam'ın mevzuyla ne ilgisi var?
    //      Binom açılımı, Pascal Üçgeni olarak bilinen bir tamsayı dizisine dayanır.
    //      İsmi Pascal'la anılsa da, bu üçgensel sayı dizisinin ilk olarak Ömer Hayyam'ın hesaplamalarında tanımlandığı kabul edilir.  
    //      Pascal üçgeninin kartezyen toplamları kullanılarak Fibonacci dizisini elde etmek de mümkündür.
    //      Yayılım örüntülerini açıklamadaki gücü bakımından Pascal Üçgeni sıkça kullanılan bir argümandır. 
    //      Özetle finansal algoritmalar Hayyam'a çok şey borçludur.

    // Ne işe yarayacak?
    //      Başıma bir iş gelmeyecekse; 
    //      Trendi genellikle yakalar, ama terste bırakma ihtimali de yüksektir. Risk yönetimi bu yüzden gerekli.
    //      Farklı dereceler fiyat frekansını üretebilecek yöntemlere katkı sunabilir.
    //      Hatta ortalamaya ait önceki tepe ve diplerin yeni sinyal yönü için geçerli destek/direnç seviyeleri olarak çalıştığı da oluyor.
    //      Tabi herhangi bir işe yaramayabilir de :).
    ////////////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © Baby_whale_to_moon

    //@version=5

    // BACKTEST DATE
    Start_Time input.time(defval=timestamp('01 January 2017 13:30 +0000'), title='Start_Time'group " ################# BACKTEST DATE ################ " )
    End_Time input.time(defval=timestamp('30 April 2024 19:30 +0000'), title='End_Time'group " ################# BACKTEST DATE ################ " )

    // supertrend 
    atrPeriod input(10'ATR Length'group " #################  Supertrend  ################ ")
    factor77 input(3'Factor'group " #################  Supertrend  ################ ")

    time1 input.string(title='Short Time Period'defval='07 1h'options=['01 1m','02 3m','03 5m',  '04 15m''05 30m''06 45m''07 1h''08 2h''09 3h''10 4h''11 1D''12 1W' ], group " #################  Supertrend  ################ ",tooltip "this timeframe is the value of our short-time supertrend indicator")
    time2 input.string(title='Long Time Period'defval='10 4h'options=[ '01 1m','02 3m','03 5m''04 15m''05 30m''06 45m''07 1h''08 2h''09 3h''10 4h''11 1D''12 1W' ], group " #################  Supertrend  ################ ",tooltip "this timeframe is the value of our long-time supertrend indicator")


    res(Resolution) =>
        if 
    Resolution == '00 Current'
            
    timeframe.period
        
    else
            if 
    Resolution == '01 1m'
                '1'
            
    else
                if 
    Resolution == '02 3m'
                    '3'
                
    else
                    if 
    Resolution == '03 5m'
                        '5'
                    
    else
                        if 
    Resolution == '04 15m'
                            '15'
                        
    else
                            if 
    Resolution == '05 30m'
                                '30'
                            
    else
                                if 
    Resolution == '06 45m'
                                    '45'
                                
    else
                                    if 
    Resolution == '07 1h'
                                        '60'
                                    
    else
                                        if 
    Resolution == '08 2h'
                                            '120'
                                        
    else
                                            if 
    Resolution == '09 3h'
                                                '180'
                                            
    else
                                                if 
    Resolution == '10 4h'
                                                    '240'
                                                
    else
                                                    if 
    Resolution == '11 1D'
                                                        '1D'
                                                    
    else
                                                        if 
    Resolution == '12 1W'
                                                            '1W'
                                                        
    else
                                                            if 
    Resolution == '13 1M'
                                                                '1M'


    // supertrend Long time period 
    [supertrend2direction2] = request.security(syminfo.tickeridres(time2), ta.supertrend(factor77atrPeriod))
    bodyMiddle4 plot((open close) / 2display=display.none)
    upTrend2 plot(direction2 supertrend2 na'seans up'color=color.new(#4caf4f, 100), style=plot.style_linebr, linewidth=2)
    downTrend2 plot(direction2 na supertrend2'seans Down'color=color.new(#ff5252, 100), style=plot.style_linebr, linewidth=2)

    // supertrend short time period 
    [supertrend1direction1] = request.security(syminfo.tickeridres(time1), ta.supertrend(factor77atrPeriod))
    bodyMiddle plot((open close) / 2display=display.none)
    upTrend plot(direction1 supertrend1 na'saat Up 'color=color.new(#ffeb3b, 100), style=plot.style_linebr)
    downTrend plot(direction1 na supertrend1'saat Down 'color=color.new(#ff9900, 100), style=plot.style_linebr)


    // Stochastic RSI
    low_limit_stoch_rsi input.float(title 'Stoch Rsi Low Limit'step=0.5defval=15group " #################  Stoch RSI   ################ "tooltip "when Stock rsi value crossover Low Limit value we get Long")
    up_limit_stoch_rsi input.float(title 'Stoch Rsi Up Limit'step=0.5defval=85group " #################  Stoch RSI   ################ "tooltip "when Stock rsi value crossunder Up Limit value we get Short")
    stocrsi_back_length input.int(20'Stoch Rsi retroactive length'minval=1group " #################  Stoch RSI   ################ "tooltip "How many candles are left behind, even if there is a buy or sell signal, it will be valid now")
    smoothK input.int(3'Stochastic RSI K'minval=1group " #################  Stoch RSI   ################ ")
    lengthRSI input.int(14'RSI Length'minval=1group " #################  Stoch RSI   ################ ")
    lengthStoch input.int(14'Stochastic Length'minval=1group " #################  Stoch RSI   ################ ")
    src_rsi input(closetitle='RSI Source'group " #################  Stoch RSI   ################ ")
    rsi1 request.security(syminfo.tickerid'240'ta.rsi(src_rsilengthRSI))
    request.security(syminfo.tickerid'240'ta.sma(ta.stoch(rsi1rsi1rsi1lengthStoch), smoothK))
    ////////////////////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © Moller1_
    //@version=5
    //// --------------------------------------------------------------------------
    //// Triple Moving Averages and Timeframes ------------------------------------
    ma_group_1 'Triple MA and TF 1'
    ma_plot_1 input.bool(true'Plot MA 1'group=ma_group_1)
    ma_chart_type_1 input.string('Standard''Tipo de gráfico'groupma_group_1
         
    options =['Standard''Heikin Ashi''Kagi''Line Break''Point & Figure''Renko'])
    ma_timeframe_1 input.timeframe('60''MA 1 TF'group=ma_group_1)
    ma_source_1 input.source(high'MA 1 Source'group=ma_group_1)
    ma_variable_1 input.string('EMA'title='MA 1 Type',
         
    options=['EMA''SMA''WMA''VWMA''SWMA''SMMA''DEMA''RMA' ,'HMA''TEMA''THMA''EHMA''Donchian''TMA''LSMA''McGinley''COVWMA''FRAMA''VIDYA''KAMA''ZEMA'], group=ma_group_1)
    ma_len_1 input.int(5title='MA 1 Len'step=5group=ma_group_1)

    ma_group_2 'Triple MA and TF 2'
    ma_plot_2 input.bool(true'Plot MA 2'group=ma_group_2)
    ma_chart_type_2 input.string('Standard''Tipo de gráfico'groupma_group_2
         
    options =['Standard''Heikin Ashi''Kagi''Line Break''Point & Figure''Renko'])
    ma_timeframe_2 input.timeframe('240''MA 2 TF'group=ma_group_2)
    ma_source_2 input.source(high'MA 2 Source'group=ma_group_2)
    ma_variable_2 input.string('EMA'title='MA 2 Type',
         
    options=['EMA''SMA''WMA''VWMA''SWMA''SMMA''DEMA''RMA' ,'HMA''TEMA''THMA''EHMA''Donchian''TMA''LSMA''McGinley''COVWMA''FRAMA''VIDYA''KAMA''ZEMA'], group=ma_group_2)
    ma_len_2 input.int(5title='MA 2 Len'step=5group=ma_group_2)

    ma_group_3 'Triple MA and TF 3'
    ma_plot_3 input.bool(true'Plot MA 3'group=ma_group_3)
    ma_chart_type_3 input.string('Standard''Tipo de gráfico'groupma_group_3
         
    options =['Standard''Heikin Ashi''Kagi''Line Break''Point & Figure''Renko'])
    ma_timeframe_3 input.timeframe('720''MA 3 TF'group=ma_group_3)
    ma_source_3 input.source(high'MA 3 Source'group=ma_group_3)
    ma_variable_3 input.string('EMA'title='MA 3 Type',
         
    options=['EMA''SMA''WMA''VWMA''SWMA''SMMA''DEMA''RMA' ,'HMA''TEMA''THMA''EHMA''Donchian''TMA''LSMA''McGinley''COVWMA''FRAMA''VIDYA''KAMA''ZEMA'], group=ma_group_3)
    ma_len_3 input.int(5title='MA 3 Len'step=5group=ma_group_3)
    //// ------------------------------------------------------------------

    //// Functions 
    //// Non-Standard Charts
    chart(chart)=>
        switch 
    chart
            
    'Heikin Ashi'   => ticker.heikinashi(syminfo.tickerid)
            
    'Standard'      => ticker.standard(syminfo.tickerid)
            
    'Kagi'          => ticker.kagi(syminfo.tickerid3)
            
    'Line Break'    => ticker.linebreak(syminfo.tickerid3)
            
    'Point & Figure'=> ticker.pointfigure(syminfo.tickerid"hl""Traditional"13)
            
    'Renko'         => ticker.renko(syminfo.tickerid"ATR"10)
    // Chande Momentum Oscillator
    FuncCMO(_src_period) =>
        
    tmpMomentum ta.change(_src)
        
    tmpSummaryUp math.sum(math.max(tmpMomentum0), _period)
        
    tmpSummaryDown math.sum(-math.min(tmpMomentum0), _period)
        
    math.abs((tmpSummaryUp tmpSummaryDown) / (tmpSummaryUp tmpSummaryDown))
    // Fractal Adaptive Moving Average (FRAMA)
    FuncFRAMA(_src_period) =>
        
    _coefficient = -4.6
        _n3 
    = (ta.highest(high_period) - ta.lowest(low_period)) / _period
        _hd2 
    ta.highest(high_period 2)
        
    _ld2 ta.lowest(low_period 2)
        
    _n2 = (_hd2 _ld2) / (_period 2)
        
    _n1 = (_hd2[_period 2] - _ld2[_period 2]) / (_period 2)
        
    _dim _n1 and _n2 and _n3 ? (math.log(_n1 _n2) - math.log(_n3)) / math.log(2) : 0
        _alpha 
    math.exp(_coefficient * (_dim 1))
        
    _sc _alpha 0.01 0.01 _alpha _alpha
        ta
    .cum(1) <= _period _src _src _sc nz(_src[1]) * (_sc)

    // Variable Index Dynamic Average (VIDYA)
    FuncVIDYA(_src_period) =>
        
    cmo FuncCMO(_src_period)
        
    alpha / (_period 1)
        
    vidya 0.0
        vidya 
    := _src alpha cmo nz(vidya[1]) * (alpha cmo)
        
    vidya

    // Kaufman's Adaptive Moving Average (KAMA)
    FuncKAMA(_src_period) =>
        
    tmpVal 0.0
        sum_1 
    math.sum(math.abs(_src _src[1]), _period)
        
    sum_2 math.sum(math.abs(_src _src[1]), _period)
        
    tmpVal := nz(tmpVal[1]) + math.pow((sum_1 != math.abs(_src _src[_period]) / sum_2 0) * (0.666 0.0645) + 0.06452) * (_src nz(tmpVal[1]))
        
    tmpVal
    // ZEMA
    FuncZEMA(srclen) =>
        
    lag = (len 1) / 2
        emaSrc 
    src src src[lag]
        
    v10 ta.ema(emaSrclen)
        
    v10

    // export ma_calculate(string variable_ma = 'EMA', float source, simple int len)=>
    ma_calculate(variable_ma 'EMA'sourcelen)=>
        
    float smma na
        float mg 
    na
        
    switch variable_ma
            
    'EMA'     => ta.ema(sourcelen)
            
    'SMA'     => ta.sma(sourcelen)
            
    'WMA'     => ta.wma(sourcelen)
            
    'VWMA'    => ta.vwma(sourcelen)
            
    'SWMA'    => ta.swma(source)
            
    'SMMA'    => na(smma[1]) ? ta.sma(sourcelen) : (smma[1] * (len 1) + source) / len
            
    'DEMA'    => ta.ema(sourcelen) - ta.ema(ta.ema(sourcelen), len)
            
    'RMA '    => ta.rma(sourcelen)
            
    'HMA'     => ta.hma(sourcelen)
            
    'TEMA'    => * (ta.ema(sourcelen) - ta.ema(ta.ema(sourcelen), len)) + ta.ema(ta.ema(ta.ema(sourcelen), len), len)
            
    'THMA'    => (ta.wma(ta.wma(source,(len/2) / 3) * ta.wma(source, (len/2) / 2) - ta.wma(source, (len/2)), (len/2)))
            
    'EHMA'    => (ta.ema(ta.ema(sourcelen 2) - ta.ema(sourcelen), math.round(math.sqrt(len))))
            
    'Donchian'=> ((math.avg(ta.lowest(len), ta.highest(len))) + (math.avg(ta.lowest(len/2), ta.highest(len/2))))/2
            
    'TMA'     => ta.sma(ta.sma(sourcemath.ceil(len 2)), math.floor(len 2) + 1)
            
    'LSMA'    => ta.linreg(sourcelen0)
            
    'McGinley'=> na(mg[1]) ? ta.ema(sourcelen) : mg[1] + (source mg[1]) / (len math.pow(source mg[1], 4))
            
    // Coefficient of Variation Weighted Moving Average (COVWMA)
            
    'COVWMA'  => math.sum((source * (ta.stdev(sourcelen) / ta.sma(sourcelen))), len) / math.sum((ta.stdev(sourcelen) / ta.sma(sourcelen)), len)
            
    'FRAMA'  => FuncFRAMA(sourcelen)
            
    'VIDYA'  => FuncVIDYA(sourcelen)
            
    'KAMA'   => FuncKAMA(sourcelen)
            
    'ZEMA'   => FuncZEMA(sourcelen)
            =>
                
    runtime.error("No matching MA type found.")
                
    float(na)

    ma_1 request.security(chart(ma_chart_type_1), ma_timeframe_1ma_calculate(ma_variable_1ma_source_1ma_len_1))
    ma_2 request.security(chart(ma_chart_type_2), ma_timeframe_2ma_calculate(ma_variable_2ma_source_2ma_len_2))
    ma_3 request.security(chart(ma_chart_type_3), ma_timeframe_3ma_calculate(ma_variable_3ma_source_3ma_len_3))

    plot(ma_plot_1ma_1na'60'color color.rgb(33149243100))
    plot(ma_plot_2ma_2na'240'color color.rgb(25523559100))
    plot(ma_plot_3ma_3na'720'color color.rgb(255255255100))
    //////////////////////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © Gudanin

    //@version=5


    //line variables

    line1 ta.sma(close14)
    line2 ta.sma(close200)
    highrsi ta.rsi(close,14) > 50
    lowrsi 
    ta.rsi(close,14) < 50


    line11 
    ta.sma(close19)
    line22 ta.sma(close21)

    highrsi1 ta.rsi(close,14) >= 65
    lowrsi1 
    ta.rsi(close,14) <= 35


    //Reversal logic

    BuyPline11 line22 and highrsi1 and line1 line2 and highrsi

    var label up na
    var label down na
    var line l na
    var float first_close na
    var bool can_draw false

    var line l1 na
    var float first_close1 na
    var bool can_draw1 false

    //support and resistance line colors
    color supportlinecolor input.color(color.green"Support line color")
    color resistancelinecolor input.color(color.red"Resistance line color")

    //label colors
    color buylabelcolor input.color(color.green"Buy label color")
    color selllabelcolor input.color(color.red"Sell label color")

    //text colors
    color buylabeltextcolor input.color(color.white"Buy label text color")
    color selllabeltextcolor input.color(color.white"Sell label text color")



    if(
    line11 line22 and highrsi1 and line1 line2 and highrsi)
        
    first_close := close  // Reset session high
        
    can_draw := true    // We are allowed to draw a line
        
    := line.new(bar_index-1first_closebar_indexfirst_closecolor=resistancelinecolorxloc xloc.bar_indexextend extend.both,width=2
        
    line.delete(l[1])
       
        if(
    na(up)) //Does not exist, create one
            
    up := label.new(bar_indexclose"fiyat dönüş \n direnç"color=selllabelcoloryloc=yloc.abovebartextcolor selllabeltextcolor)
            
                    
                
                
           
        else
            
    label.set_x(upbar_index)


    if(
    line11 line22 and lowrsi and line1 line2 and lowrsi )
        
    first_close1 := open  // Reset session high
        
    can_draw1 := true    // We are allowed to draw a line
        
    l1 := line.new(bar_index-1first_close1bar_indexfirst_close1color=supportlinecolorxloc xloc.bar_indexextend extend.both,width=2
        
    line.delete(l1[1])
        if(
    na(down)) //Does not exist, create one
            
    down := label.new(bar_indexclose"fiyat dönüş \n destek"color=buylabelcoloryloc=yloc.belowbarstyle label.style_label_uptextcolor buylabeltextcolor)
        else
            
    label.set_x(downbar_index)  

        


    ////////////////////////////////////////////////// 
    bu arada kod birleştikçe....
    karmaşık olabilir.......

    istemediğiniz yeri silin.....versiyon yazan yerler bölüm halinde......

    kodu yayınlayacaksanız.....
    kesinlikle yazarına atıfta bulunun.....
    emeğe saygı.....
    Doğum tarihim 16/07/2024 olarak güncellenmiştir.

Sayfa 180/272 İlkİlk ... 80130170178179180181182190230 ... 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
  •