Sayfa 226/272 İlkİlk ... 126176216224225226227228236 ... SonSon
Arama sonucu : 2172 madde; 1,801 - 1,808 arası.

Konu: Tradingview

  1. https://tr.tradingview.com/v/NIuGTgAO/
    pivota göre trend çekiyor...rakamlar küçültülebilir....
    Doğum tarihim 16/07/2024 olarak güncellenmiştir.

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

  3. 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/v/zvy7J87b/ bunu ana trend ve ileri projeksiyon olarak düşünün...

    https://tr.tradingview.com/v/ZXIm3q7G/ bunu rsı ccı gibi....hazır strateji olarak düşünün....

    https://tr.tradingview.com/v/Bcufg8oX/ bunu dip tepeler için kanal düşünün.....

    https://tr.tradingview.com/v/zLGM4F2M/ bunu destek ve direnç olarak düşünün....
    Doğum tarihim 16/07/2024 olarak güncellenmiştir.

  6.  Alıntı Originally Posted by @yörük@ Yazıyı Oku
    https://tr.tradingview.com/v/zvy7J87b/ bunu ana trend ve ileri projeksiyon olarak düşünün...

    https://tr.tradingview.com/v/ZXIm3q7G/ bunu rsı ccı gibi....hazır strateji olarak düşünün....

    https://tr.tradingview.com/v/Bcufg8oX/ bunu dip tepeler için kanal düşünün.....

    https://tr.tradingview.com/v/zLGM4F2M/ bunu destek ve direnç olarak düşünün....
    bu dördünü bir sistem olarak düşünün...
    kodların birleşmiş hali....


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

    //@version=5
    indicator("HyperTrend [LuxAlgo]""LuxAlgo - HyperTrend"overlay true)
    //------------------------------------------------------------------------------
    //Settings
    //-----------------------------------------------------------------------------{
    mult input.float(5'Multiplicative Factor'minval 0)

    slope input.float(14'Slope'minval 0)

    width input.float(80'Width %'minval 0maxval 100) / 100

    //Style
    bullCss input.color(color.teal'Average Color'inline 'avg'group 'Style')
    bearCss input.color(color.red''              inline 'avg'group 'Style')

    area input.string('Gradient''Area'options = ['Gradient''Solid'], group 'Style')
    upperCss input.color(color.new(color.red70), 'Upper Area'group 'Style')
    lowerCss input.color(color.new(color.teal70)   , 'Lower Area'group 'Style')

    //-----------------------------------------------------------------------------}
    //Calculation
    //-----------------------------------------------------------------------------{
    var float upper na
    var float lower na
    var float avg   close

    var hold 0.
    var os 1.
        
    atr 
    nz(ta.atr(200)) * mult

    avg 
    := math.abs(close avg) > atr 
      
    math.avg(closeavg)
      : 
    avg os * (hold mult slope)

    os := math.sign(avg avg[1])
    hold := os != os[1] ? atr hold

    upper 
    := avg width hold
    lower 
    := avg width hold

    //-----------------------------------------------------------------------------}
    //Plots
    //-----------------------------------------------------------------------------{
    css os == bullCss bearCss

    plot_upper 
    plot(upper'Upper'na)
    plot_avg plot(avg'Average'os != os[1] ? na css)
    plot_lower plot(lower'Lower'na)

    var 
    color upper_topcol na
    var color upper_btmcol na
    var color lower_topcol na
    var color lower_btmcol na

    //Fill
    if area == 'Gradient'
        
    upper_topcol := upperCss
        upper_btmcol 
    := color.new(chart.bg_color100)
        
    lower_topcol := color.new(chart.bg_color100)
        
    lower_btmcol := lowerCss
    else
        
    upper_topcol := upperCss
        upper_btmcol 
    := upperCss
        lower_topcol 
    := lowerCss
        lower_btmcol 
    := lowerCss

    //Upper Area
    fill(plot_upperplot_avg
      
    top_color os != os[1] ? na upper_topcol
      
    bottom_color os != os[1] ? na upper_btmcol
      
    top_value upper
      
    bottom_value avg)

    //Lower Area
    fill(plot_avgplot_lower
      
    top_color os != os[1] ? na lower_topcol
      
    bottom_color os != os[1] ? na lower_btmcol
      
    top_value avg
      
    bottom_value lower)

    //-----------------------------------------------------------------------------}
    //
    //rodavlas12
    //@version=5


    // Input settings
    ccimomCross input.string('CCI''Entry Signal Source'options=['CCI''Momentum'], tooltip='CCI or Momentum will be the final source of the Entry signal if selected.')
    ccimomLength input.int(10minval=1title='CCI/Momentum Length')
    useDivergence input.bool(truetitle='Find Regular Bullish/Bearish Divergence'tooltip='If checked, it will only consider an overbought or oversold condition that has a regular bullish or bearish divergence formed inside that level.')
    rsiOverbought input.int(65minval=1title='RSI Overbought Level'tooltip='Adjusting the level to extremely high may filter out some signals especially when the option to find divergence is checked.')
    rsiOversold input.int(35minval=1title='RSI Oversold Level'tooltip='Adjusting this level extremely low may filter out some signals especially when the option to find divergence is checked.')
    rsiLength input.int(14minval=1title='RSI Length')
    plotMeanReversion input.bool(false'Plot Mean Reversion Bands on the chart'tooltip='This function doesn\'t affect the entry of signal but it suggests buying when the price is at the lower band, and then sell it on the next bounce at the higher bands.')
    emaPeriod input(200title='Lookback Period (EMA)')
    bandMultiplier input.float(1.8title='Outer Bands Multiplier'tooltip='Multiplier for both upper and lower bands')


    // CCI and Momentum calculation
    momLength ccimomCross == 'Momentum' ccimomLength 10
    mom 
    close close[momLength]
    cci ta.cci(closeccimomLength)
    ccimomCrossUp ccimomCross == 'Momentum' ta.cross(mom0) : ta.cross(cci0)
    ccimomCrossDown ccimomCross == 'Momentum' ta.cross(0mom) : ta.cross(0cci)

    // RSI calculation
    src close
    up 
    ta.rma(math.max(ta.change(src), 0), rsiLength)
    down ta.rma(-math.min(ta.change(src), 0), rsiLength)
    rsi down == 100 up == 100 100 / (up down)
    oversoldAgo rsi[0] <= rsiOversold or rsi[1] <= rsiOversold or rsi[2] <= rsiOversold or rsi[3] <= rsiOversold
    overboughtAgo 
    rsi[0] >= rsiOverbought or rsi[1] >= rsiOverbought or rsi[2] >= rsiOverbought or rsi[3] >= rsiOverbought

    // Regular Divergence Conditions
    bullishDivergenceCondition rsi[0] > rsi[1] and rsi[1] < rsi[2]
    bearishDivergenceCondition rsi[0] < rsi[1] and rsi[1] > rsi[2]

    // Entry Conditions
    longEntryCondition ccimomCrossUp and oversoldAgo and (not useDivergence or bullishDivergenceCondition)
    shortEntryCondition ccimomCrossDown and overboughtAgo and (not useDivergence or bearishDivergenceCondition)


    // Mean Reversion Indicator
    meanReversion plotMeanReversion ta.ema(closeemaPeriod) : na
    stdDev 
    plotMeanReversion ta.stdev(closeemaPeriod) : na
    upperBand 
    plotMeanReversion meanReversion stdDev bandMultiplier na
    lowerBand 
    plotMeanReversion meanReversion stdDev bandMultiplier na


    // Plotting
    plotshape(longEntryConditiontitle='BUY'style=shape.triangleuptext='B'location=location.belowbarcolor=color.new(color.lime0), textcolor=color.new(color.white0), size=size.tiny)
    plotshape(shortEntryConditiontitle='SELL'style=shape.triangledowntext='S'location=location.abovebarcolor=color.new(color.red0), textcolor=color.new(color.white0), size=size.tiny)

    plot(upperBandtitle='Upper Band'color=color.new(color.fuchsia0), linewidth=1)
    plot(meanReversiontitle='Mean'color=color.new(color.gray0), linewidth=1)
    plot(lowerBandtitle='Lower Band'color=color.new(color.blue0), linewidth=1)

    // Entry signal alerts
    alertcondition(longEntryConditiontitle='BUY Signal'message='Buy Entry Signal')
    alertcondition(shortEntryConditiontitle='SELL Signal'message='Sell Entry Signal')
    alertcondition(longEntryCondition or shortEntryConditiontitle='BUY or SELL Signal'message='Entry Signal')
    ////////////////////////////////////////////
    // © TommasoRossini
    //@version=5


    lnt input(200"Lenght")
    lnt2 input.int(10"Smooth"minval 1)
    lnt3 input.float(1.00"Zone Width"minval 0.5maxval 3step 0.25)
    downcol input.color(#e91e63, "Premium color")
    upcol input.color(#2962ff, "Discount color")
    atrs ta.sma(ta.atr(lnt), lnt) * lnt3
    max 
    ta.highest(highlnt)
    min ta.lowest(lowlnt)
    [
    middleupper11lower11] = ta.bb(closelnt2)
    upfirst ta.sma(math.avg(maxupper11), lnt2)
    downfirst ta.sma(math.avg(minlower11), lnt2)
    upsecond upfirst atrs
    downsecond 
    downfirst atrs
    average 
    math.avg(upfirstdownfirstmath.avg(maxmin))
    upavg math.avg(averageupfirst)
    downavg math.avg(averagedownfirst)

    p1 plot(upfirstcolor color.new(downcol100), editable false)
    p2 plot(upsecondcolor color.new(downcol0), title "Roof")
    p3 plot(downfirstcolor color.new(upcol100), editable false)
    p4 plot(downsecondcolor color.new(upcol0), title "Floor")
    fill(p1p2color color.new(downcol85), title "Roof fill")
    fill(p3p4color color.new(upcol85), title "Floor fill")
    plot(close middle upavg nacolor color.new(downcol25), style plot.style_linebrtitle "Second Roof")
    plot(close middle downavg nacolor color.new(upcol25), style plot.style_linebrtitle "Second Floor")
    ///////////////////////////////////////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © RicardoSantos, midtownsk8rguy


    //  Cycle functions by: midtownsk8rguy
    //  https://www.tradingview.com/script/wyyXKHDn-Correlation-Cycle-CorrelationAngle-Market-State-John-Ehlers/
    rad2deg(Rad) =>  // Radians To Degrees
        
    var DEGREES_IN_1_RADIAN 90.0 math.asin(1.0)  // 57.29577951308 Constant
        
    Rad DEGREES_IN_1_RADIAN

    cc
    (SeriesPeriod) =>  // Correlation Cycle Function
        
    var PIx2 4.0 math.asin(1.0)  // 6.28318530718 Constant
        
    period math.max(2Period)
        
    Rx 0.0
        Rxx 
    0.0
        Rxy 
    0.0
        Ryy 
    0.0
        Ry 
    0.0
        Ix 
    0.0
        Ixx 
    0.0
        Ixy 
    0.0
        Iyy 
    0.0
        Iy 
    0.0
        
    for 1 to period by 1
            iMinusOne 
    1
            X 
    nz(Series[iMinusOne])
            
    temp PIx2 iMinusOne period
            Yc 
    math.cos(temp)
            
    Ys = -math.sin(temp)
            
    Rx += X
            Ix 
    += X
            Rxx 
    += X
            Ixx 
    += X
            Rxy 
    += Yc
            Ixy 
    += Ys
            Ryy 
    += Yc Yc
            Iyy 
    += Ys Ys
            Ry 
    += Yc
            Iy 
    += Ys
            Iy
        realPart 
    0.0
        temp_1 
    period Rxx Rx Rx
        temp_2 
    period Ryy Ry Ry
        
    if temp_1 0.0 and temp_2 0.0
            realPart 
    := (period Rxy Rx Ry) / math.sqrt(temp_1 temp_2)
            
    realPart
        imagPart 
    0.0
        temp_1 
    := period Ixx Ix Ix
        temp_2 
    := period Iyy Iy Iy
        
    if temp_1 0.0 and temp_2 0.0
            imagPart 
    := (period Ixy Ix Iy) / math.sqrt(temp_1 temp_2)
            
    imagPart
        
    [realPartimagPart]

    cap(RealPartImaginaryPart) =>  // Correlation Angle Phasor Function
        
    var HALF_OF_PI math.asin(1.0)  // 1.57079632679 Constant
        
    angle ImaginaryPart == 0.0 0.0 rad2deg(math.atan(RealPart ImaginaryPart) + HALF_OF_PI)
        if 
    ImaginaryPart 0.0
            angle 
    -= 180.0
            angle
        priorAngle 
    nz(angle[1])
        if 
    priorAngle angle and priorAngle angle 270.0
            angle 
    := priorAngle
            angle
        angle
    //------------------------------------------------------------------------------

    int length input(20)
    bool use_automatic_selection input(false)
    float cycle_length length

    if use_automatic_selection
        
    [_real_imag] = cc(closelength)
        
    cycle_length := math.round(cap(_real_imag))
        
    cycle_length

    bool is_new_cycle 
    false
    if bar_index cycle_length == cycle_length 1
        is_new_cycle 
    := true
        is_new_cycle

    var float avg11 open
    var color pl_color color.new(color.gray0)
    var 
    bool is_up na


    var line li_slope line.new(x1=bar_indexy1=openx2=bar_indexy2=openxloc=xloc.bar_indexextend=extend.rightcolor=color.navystyle=line.style_dottedwidth=1)
    var 
    line li_trend line.new(x1=bar_indexy1=openx2=bar_indexy2=openxloc=xloc.bar_indexextend=extend.rightcolor=color.navystyle=line.style_dashedwidth=1)

    var 
    float max11 high
    var float min11 low
    if high max11
        max11 
    := math.max(highavg11)
        
    max11
    if low min
        min11 
    := math.min(lowavg11)
        
    min11


    if is_new_cycle
        avg11 
    := (nz(avg11) * (cycle_length) + close * (cycle_length)) / 2
        max11 
    := high
        min11 
    := low
        
    if avg11 avg11[1]
            
    is_up := true
            pl_color 
    := color.new(color.lime0)
            if 
    not is_up[1]
                
    line.set_xy1(id=li_trendx=line.get_x1(id=li_slope), y=avg11[1])
                
    line.set_xy2(id=li_trendx=bar_index[0], y=avg11)
            else
                
    line.set_xy2(id=li_trendx=bar_index[0], y=avg11)
        if 
    avg11 avg11[1]
            
    is_up := false
            pl_color 
    := color.new(color.red0)
            if 
    is_up[1]
                
    line.set_xy1(id=li_trendx=line.get_x1(id=li_slope), y=avg11[1])
                
    line.set_xy2(id=li_trendx=bar_index[0], y=avg11)
            else
                
    line.set_xy2(id=li_trendx=bar_index[0], y=avg11)
        
    line.set_x1(id=li_slopex=bar_index[1])
        
    line.set_xy2(id=li_slopex=bar_index[0], y=avg)

        
    // line.new(x1=bar_index[cycle_length], y1=avg[cycle_length], x2=bar_index[0], y2=avg[0], xloc=xloc.bar_index, extend=extend.right, color=color.blue, style=line.style_dotted, width=1)
    if is_up
        line
    .set_y1(id=li_slopey=avg - (max11 min11) / cycle_length)
    else
        
    line.set_y1(id=li_slopey=avg + (max11 min11) / cycle_length)

    plot(series=avgtitle='avg'color=pl_colorlinewidth=2style=plot.style_stepline
    istediğiniz değişiklilrei ve ayarlamaları yapın.....

    görüntü....
    Doğum tarihim 16/07/2024 olarak güncellenmiştir.

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

    //@version=5
    indicator("*"overlay true)
    //------------------------------------------------------------------------------
    //Settings
    //-----------------------------------------------------------------------------{
    mult input.float(5'Multiplicative Factor'minval 0)

    slope input.float(14'Slope'minval 0)

    width input.float(80'Width %'minval 0maxval 100) / 100

    //Style
    bullCss input.color(color.yellow'Average Color'inline 'avg'group 'Style')
    bearCss input.color(color.aqua''              inline 'avg'group 'Style')

    area input.string('Gradient''Area'options = ['Gradient''Solid'], group 'Style')
    upperCss input.color(color.new(color.aqua70), 'Upper Area'group 'Style')
    lowerCss input.color(color.new(color.yellow70)   , 'Lower Area'group 'Style')

    //-----------------------------------------------------------------------------}
    //Calculation
    //-----------------------------------------------------------------------------{
    var float upper na
    var float lower na
    var float avg   close

    var hold 0.
    var os 1.
        
    atr 
    nz(ta.atr(200)) * mult

    avg 
    := math.abs(close avg) > atr 
      
    math.avg(closeavg)
      : 
    avg os * (hold mult slope)

    os := math.sign(avg avg[1])
    hold := os != os[1] ? atr hold

    upper 
    := avg width hold
    lower 
    := avg width hold

    //-----------------------------------------------------------------------------}
    //Plots
    //-----------------------------------------------------------------------------{
    css os == bullCss bearCss

    plot_upper 
    plot(upper'Yüksek'na)
    plot_avg plot(avg'Ortalama'os != os[1] ? na css)
    plot_lower plot(lower'Düşük'na)

    var 
    color upper_topcol na
    var color upper_btmcol na
    var color lower_topcol na
    var color lower_btmcol na

    //Fill
    if area == 'Gradient'
        
    upper_topcol := upperCss
        upper_btmcol 
    := color.new(chart.bg_color100)
        
    lower_topcol := color.new(chart.bg_color100)
        
    lower_btmcol := lowerCss
    else
        
    upper_topcol := upperCss
        upper_btmcol 
    := upperCss
        lower_topcol 
    := lowerCss
        lower_btmcol 
    := lowerCss

    //Upper Area
    fill(plot_upperplot_avg
      
    top_color os != os[1] ? na upper_topcol
      
    bottom_color os != os[1] ? na upper_btmcol
      
    top_value upper
      
    bottom_value avg)

    //Lower Area
    fill(plot_avgplot_lower
      
    top_color os != os[1] ? na lower_topcol
      
    bottom_color os != os[1] ? na lower_btmcol
      
    top_value avg
      
    bottom_value lower)

    //-----------------------------------------------------------------------------}
    //
    //rodavlas12
    //@version=5


    // Input settings
    ccimomCross input.string('CCI''Entry Signal Source'options=['CCI''Momentum'], tooltip='CCI or Momentum will be the final source of the Entry signal if selected.')
    ccimomLength input.int(10minval=1title='CCI/Momentum Length')
    useDivergence input.bool(truetitle='Find Regular Bullish/Bearish Divergence'tooltip='If checked, it will only consider an overbought or oversold condition that has a regular bullish or bearish divergence formed inside that level.')
    rsiOverbought input.int(65minval=1title='RSI Overbought Level'tooltip='Adjusting the level to extremely high may filter out some signals especially when the option to find divergence is checked.')
    rsiOversold input.int(35minval=1title='RSI Oversold Level'tooltip='Adjusting this level extremely low may filter out some signals especially when the option to find divergence is checked.')
    rsiLength input.int(14minval=1title='RSI Length')
    plotMeanReversion input.bool(false'Plot Mean Reversion Bands on the chart'tooltip='This function doesn\'t affect the entry of signal but it suggests buying when the price is at the lower band, and then sell it on the next bounce at the higher bands.')
    emaPeriod input(200title='Lookback Period (EMA)')
    bandMultiplier input.float(1.8title='Outer Bands Multiplier'tooltip='Multiplier for both upper and lower bands')


    // CCI and Momentum calculation
    momLength ccimomCross == 'Momentum' ccimomLength 10
    mom 
    close close[momLength]
    cci ta.cci(closeccimomLength)
    ccimomCrossUp ccimomCross == 'Momentum' ta.cross(mom0) : ta.cross(cci0)
    ccimomCrossDown ccimomCross == 'Momentum' ta.cross(0mom) : ta.cross(0cci)

    // RSI calculation
    src close
    up 
    ta.rma(math.max(ta.change(src), 0), rsiLength)
    down ta.rma(-math.min(ta.change(src), 0), rsiLength)
    rsi down == 100 up == 100 100 / (up down)
    oversoldAgo rsi[0] <= rsiOversold or rsi[1] <= rsiOversold or rsi[2] <= rsiOversold or rsi[3] <= rsiOversold
    overboughtAgo 
    rsi[0] >= rsiOverbought or rsi[1] >= rsiOverbought or rsi[2] >= rsiOverbought or rsi[3] >= rsiOverbought

    // Regular Divergence Conditions
    bullishDivergenceCondition rsi[0] > rsi[1] and rsi[1] < rsi[2]
    bearishDivergenceCondition rsi[0] < rsi[1] and rsi[1] > rsi[2]

    // Entry Conditions
    longEntryCondition ccimomCrossUp and oversoldAgo and (not useDivergence or bullishDivergenceCondition)
    shortEntryCondition ccimomCrossDown and overboughtAgo and (not useDivergence or bearishDivergenceCondition)


    // Mean Reversion Indicator
    meanReversion plotMeanReversion ta.ema(closeemaPeriod) : na
    stdDev 
    plotMeanReversion ta.stdev(closeemaPeriod) : na
    upperBand 
    plotMeanReversion meanReversion stdDev bandMultiplier na
    lowerBand 
    plotMeanReversion meanReversion stdDev bandMultiplier na


    // Plotting
    plotshape(longEntryConditiontitle='BUY'style=shape.triangleuptext='B'location=location.belowbarcolor=color.new(color.lime0), textcolor=color.new(color.white0), size=size.tiny)
    plotshape(shortEntryConditiontitle='SELL'style=shape.triangledowntext='S'location=location.abovebarcolor=color.new(color.red0), textcolor=color.new(color.white0), size=size.tiny)

    //plot(upperBand, title='Upper Band', color=color.new(color.fuchsia, 0), linewidth=1)
    //plot(meanReversion, title='Mean', color=color.new(color.gray, 0), linewidth=1)
    //plot(lowerBand, title='Lower Band', color=color.new(color.blue, 0), linewidth=1)

    // Entry signal alerts
    //alertcondition(longEntryCondition, title='BUY Signal', message='Buy Entry Signal')
    //alertcondition(shortEntryCondition, title='SELL Signal', message='Sell Entry Signal')
    //alertcondition(longEntryCondition or shortEntryCondition, title='BUY or SELL Signal', message='Entry Signal')
    ////////////////////////////////////////////
    // © TommasoRossini
    //@version=5


    lnt input(200"Lenght")
    lnt2 input.int(10"Smooth"minval 1)
    lnt3 input.float(1.00"Zone Width"minval 0.5maxval 3step 0.25)
    downcol input.color(#e91e6200, "Premium color")
    upcol input.color(#2962ff00, "Discount color")
    atrs ta.sma(ta.atr(lnt), lnt) * lnt3
    max 
    ta.highest(highlnt)
    min ta.lowest(lowlnt)
    [
    middleupper11lower11] = ta.bb(closelnt2)
    upfirst ta.sma(math.avg(maxupper11), lnt2)
    downfirst ta.sma(math.avg(minlower11), lnt2)
    upsecond upfirst atrs
    downsecond 
    downfirst atrs
    average 
    math.avg(upfirstdownfirstmath.avg(maxmin))
    upavg math.avg(averageupfirst)
    downavg math.avg(averagedownfirst)

    p1 plot(upfirstcolor color.new(downcol100), editable false)
    p2 plot(upsecondcolor color.new(downcol0), title "Direnç")
    p3 plot(downfirstcolor color.new(upcol100), editable false)
    p4 plot(downsecondcolor color.new(upcol0), title "Destek")
    //fill(p1, p2, color = color.new(downcol, 85), title = "Roof fill")
    //fill(p3, p4, color = color.new(upcol, 85), title = "Floor fill")
    plot(close middle upavg nacolor color.new(downcol100), style plot.style_linebrtitle "Yukarı Kırılım")
    plot(close middle downavg nacolor color.new(upcol100), style plot.style_linebrtitle "Aşağı Kırılım")
    ///////////////////////////////////////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © RicardoSantos, midtownsk8rguy


    //  Cycle functions by: midtownsk8rguy
    //  https://www.tradingview.com/script/wyyXKHDn-Correlation-Cycle-CorrelationAngle-Market-State-John-Ehlers/
    rad2deg(Rad) =>  // Radians To Degrees
        
    var DEGREES_IN_1_RADIAN 90.0 math.asin(1.0)  // 57.29577951308 Constant
        
    Rad DEGREES_IN_1_RADIAN

    cc
    (SeriesPeriod) =>  // Correlation Cycle Function
        
    var PIx2 4.0 math.asin(1.0)  // 6.28318530718 Constant
        
    period math.max(2Period)
        
    Rx 0.0
        Rxx 
    0.0
        Rxy 
    0.0
        Ryy 
    0.0
        Ry 
    0.0
        Ix 
    0.0
        Ixx 
    0.0
        Ixy 
    0.0
        Iyy 
    0.0
        Iy 
    0.0
        
    for 1 to period by 1
            iMinusOne 
    1
            X 
    nz(Series[iMinusOne])
            
    temp PIx2 iMinusOne period
            Yc 
    math.cos(temp)
            
    Ys = -math.sin(temp)
            
    Rx += X
            Ix 
    += X
            Rxx 
    += X
            Ixx 
    += X
            Rxy 
    += Yc
            Ixy 
    += Ys
            Ryy 
    += Yc Yc
            Iyy 
    += Ys Ys
            Ry 
    += Yc
            Iy 
    += Ys
            Iy
        realPart 
    0.0
        temp_1 
    period Rxx Rx Rx
        temp_2 
    period Ryy Ry Ry
        
    if temp_1 0.0 and temp_2 0.0
            realPart 
    := (period Rxy Rx Ry) / math.sqrt(temp_1 temp_2)
            
    realPart
        imagPart 
    0.0
        temp_1 
    := period Ixx Ix Ix
        temp_2 
    := period Iyy Iy Iy
        
    if temp_1 0.0 and temp_2 0.0
            imagPart 
    := (period Ixy Ix Iy) / math.sqrt(temp_1 temp_2)
            
    imagPart
        
    [realPartimagPart]

    cap(RealPartImaginaryPart) =>  // Correlation Angle Phasor Function
        
    var HALF_OF_PI math.asin(1.0)  // 1.57079632679 Constant
        
    angle ImaginaryPart == 0.0 0.0 rad2deg(math.atan(RealPart ImaginaryPart) + HALF_OF_PI)
        if 
    ImaginaryPart 0.0
            angle 
    -= 180.0
            angle
        priorAngle 
    nz(angle[1])
        if 
    priorAngle angle and priorAngle angle 270.0
            angle 
    := priorAngle
            angle
        angle
    //------------------------------------------------------------------------------

    int length input(23)
    bool use_automatic_selection input(false)
    float cycle_length length

    if use_automatic_selection
        
    [_real_imag] = cc(closelength)
        
    cycle_length := math.round(cap(_real_imag))
        
    cycle_length

    bool is_new_cycle 
    false
    if bar_index cycle_length == cycle_length 1
        is_new_cycle 
    := true
        is_new_cycle

    var float avg11 open
    var color pl_color color.new(color.gray0)
    var 
    bool is_up na


    var line li_slope line.new(x1=bar_indexy1=openx2=bar_indexy2=openxloc=xloc.bar_indexextend=extend.rightcolor=color.yellowstyle=line.style_dottedwidth=2)
    var 
    line li_trend line.new(x1=bar_indexy1=openx2=bar_indexy2=openxloc=xloc.bar_indexextend=extend.rightcolor=color.yellowstyle=line.style_dashedwidth=2)

    var 
    float max11 high
    var float min11 low
    if high max11
        max11 
    := math.max(highavg11)
        
    max11
    if low min
        min11 
    := math.min(lowavg11)
        
    min11


    if is_new_cycle
        avg11 
    := (nz(avg11) * (cycle_length) + close * (cycle_length)) / 2
        max11 
    := high
        min11 
    := low
        
    if avg11 avg11[1]
            
    is_up := true
            pl_color 
    := color.new(color.lime0)
            if 
    not is_up[1]
                
    line.set_xy1(id=li_trendx=line.get_x1(id=li_slope), y=avg11[1])
                
    line.set_xy2(id=li_trendx=bar_index[0], y=avg11)
            else
                
    line.set_xy2(id=li_trendx=bar_index[0], y=avg11)
        if 
    avg11 avg11[1]
            
    is_up := false
            pl_color 
    := color.new(color.red0)
            if 
    is_up[1]
                
    line.set_xy1(id=li_trendx=line.get_x1(id=li_slope), y=avg11[1])
                
    line.set_xy2(id=li_trendx=bar_index[0], y=avg11)
            else
                
    line.set_xy2(id=li_trendx=bar_index[0], y=avg11)
        
    line.set_x1(id=li_slopex=bar_index[1])
        
    line.set_xy2(id=li_slopex=bar_index[0], y=avg)

        
    // line.new(x1=bar_index[cycle_length], y1=avg[cycle_length], x2=bar_index[0], y2=avg[0], xloc=xloc.bar_index, extend=extend.right, color=color.blue, style=line.style_dotted, width=1)
    if is_up
        line
    .set_y1(id=li_slopey=avg - (max11 min11) / cycle_length)
    else
        
    line.set_y1(id=li_slopey=avg + (max11 min11) / cycle_length)

    plot(series=avgtitle='Trend'color=pl_colorlinewidth=2style=plot.style_stepline
    https://www.tradingview.com/x/KV6UoDk1/
    Doğum tarihim 16/07/2024 olarak güncellenmiştir.

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

Sayfa 226/272 İlkİlk ... 126176216224225226227228236 ... 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
  •