Sayfa 228/272 İlkİlk ... 128178218226227228229230238 ... SonSon
Arama sonucu : 2172 madde; 1,817 - 1,824 arası.

Konu: Tradingview

  1. PHP Code:

    //@version=5
    indicator("."overlay truemax_boxes_count 500)
    //------------------------------------------------------------------------------

    ////////////////////////////////
    start1 input(0)
    increment1 input(0.1)
    maximum1 input(1"Max Value")
    out1 ta.sar(start1increment1maximum1)
    plot(out1"HSAR"style=plot.style_linecolor=#f0ce0e)
    /////////////////////////////////
    start2 input(0)
    increment2 input(0.1)
    maximum2 input(0.1"Max Value")
    out2 ta.sar(start2increment2maximum2)
    plot(out2"YSAR"style=plot.style_linecolor=#0af1de)
    ///////////////////////////////////
    start21 input(0)
    increment21 input(0.01)
    maximum21 input(0.1"Max Value")
    out21 ta.sar(start21increment21maximum21)
    plot(out21"SAR"style=plot.style_linecolor=#f2f3f7)
    /////////////////////////////////
    //@version=5
    plot input.bool(falsetitle="Display past dots")
    OverSold input(0)
    OverBought input(100)
    length1 input.int(2title "Length")
    tr input.int(1title "Trigger Length")

    // Define the function
    func(sourceint lenint tr) =>
        
    HP 0.00a1 0.00b1 0.00c1 0.00c2 0.00c3 0.00ag 0.00Sp 0.000.00Quotient1 0.00Quotient2 0.00math.sqrt(.5)
        
    HP := 2500 * (source nz(source[1]) + nz(source[2])) + 1.92 nz(HP[1]) - .9216 nz(HP[2])
        
    a1 := math.exp(-math.sqrt(2) * math.pi len)
        
    b1 := a1 math.cos(math.sqrt(2) * math.pi len)
        
    c2 := b1
        c3 
    := -a1 a1
        c1 
    := c2 c3
        ag 
    := c1 * (HP nz(HP[1])) / c2 nz(ag[1]) + c3 nz(ag[2])
        
    Sp := .991 nz(Sp[1])
        if 
    math.abs(ag) > Sp
            Sp 
    := math.abs(ag)
            
    Sp
        
    if Sp != 0
            X 
    := ag Sp
            X
        q1 
    60 50
        out
    ta.sma(q1tr)
        [
    out]

    [
    k] = func(closelength1,tr)
    OverboughtCond OverBought
    OversoldCond 
    OverSold

    plotshape
    (plotOverboughtCond:nastyle=shape.circlelocation=location.abovebarcolor=color.new(color.lime0), size=size.tiny)
    plotshape(plotOversoldCond:nastyle=shape.circlelocation=location.belowbarcolor=color.new(color.red0), size=size.tiny)
    var 
    label myLabel_Overbought na
    if OverboughtCond
        
    // Delete the previous label if there is one
        
    if not na(myLabel_Overbought)
            
    label.delete(myLabel_Overbought[1])
        
    // Create a new label
        
    myLabel_Overbought := label.new(bar_indexhigh'Aşırı Alış',yloc=yloc.abovebar,style=label.style_circlesize=size.normalcolor=color.redtextcolor=color.white)
        
    myLabel_Overbought
    var label myLabel_Oversold na
    if OversoldCond
        
    // Delete the previous label if there is one
        
    if not na(myLabel_Oversold)
            
    label.delete(myLabel_Oversold[1])
        
    // Create a new label
        
    myLabel_Oversold := label.new(bar_indexlow'Aşırı Satış',yloc=yloc.belowbar,style=label.style_circlesize=size.normalcolor=color.limetextcolor=color.white)
        
    myLabel_Oversold

    alertcondition
    (OverboughtCondtitle="Overbought"message="DOTS [CHE]: Overbought\nSymbol: {{ticker}}\nPrice: {{close}}")
    alertcondition(OversoldCondtitle="Oversold"message="DOTS [CHE]: DOTS\nSymbol: {{ticker}}\nPrice: {{close}}")
    ////////////////////////////////////////// 
    üzerinde çalışılacak örnek...
    Doğum tarihim 16/07/2024 olarak güncellenmiştir.

  2. PHP Code:
     //@version=5
    indicator("."overlay truemax_boxes_count 100)

    ////////////////////////////////
    start1 input(0)
    increment1 input(0.1)
    maximum1 input(1"Max Value")
    out1 ta.sar(start1increment1maximum1)
    plot(out1"KısaDöngü"style=plot.style_linecolor=#f0ce0e)
    /////////////////////////////////
    start2 input(0)
    increment2 input(0.1)
    maximum2 input(0.1"Max Value")
    out2 ta.sar(start2increment2maximum2)
    plot(out2"OrtaDöngü"style=plot.style_linecolor=#06deee)
    ///////////////////////////////////
    start21 input(0)
    increment21 input(0.01)
    maximum21 input(0.1"Max Value")
    out21 ta.sar(start21increment21maximum21)
    plot(out21"UzunDöngü"style=plot.style_linecolor=#f2f3f7)
    /////////////////////////////////
    start213 input(0.1)
    increment213 input(0.1)
    maximum213 input(1"Max Value")
    out213 ta.sar(start213increment213maximum213)
    plot(out213"KıyasDöngü"style=plot.style_linecolor=#c20bf0)
    ////////////////////////////////////////
    //@version=5
    // User inputs
    prd22 input.int(defval=5title=' Period for Pivot Points'minval=1maxval=50)
    max_num_of_pivots input.int(defval=5title=' Maximum Number of Pivots'minval=5maxval=10)
    max_lines input.int(defval=1title=' Maximum number of trend lines'minval=1maxval=10)
    show_lines input.bool(defval=truetitle=' Show trend lines')
    show_pivots input.bool(defval=truetitle=' Show Pivot Points')

    float ph ta.pivothigh(highprd22prd22)
    float pl ta.pivotlow(lowprd22prd22)

    //plotshape(ph and show_pivots, style=shape.triangledown, location=location.abovebar, offset=-prd22, size=size.small)
    //plotshape(pl and show_pivots, style=shape.triangleup, location=location.belowbar, offset=-prd22, size=size.small)

    // Creating array of pivots
    var pivots_high = array.new_float(0)
    var 
    pivots_low = array.new_float(0)

    var 
    high_ind = array.new_int(0)
    var 
    low_ind = array.new_int(0)

    if 
    ph 
        
    array.push(pivots_highph)
        array.
    push(high_indbar_index prd22)
        if array.
    size(pivots_high) > max_num_of_pivots  // limit the array size
            
    array.shift(pivots_high)
            array.
    shift(high_ind)

    if 
    pl
        
    array.push(pivots_lowpl)
        array.
    push(low_indbar_index prd22)
        if array.
    size(pivots_low) > max_num_of_pivots  // limit the array size
            
    array.shift(pivots_low)
            array.
    shift(low_ind)

    // Create arrays to store slopes and lines
    var res_lines = array.new_line()
    var 
    res_slopes = array.new_float()

    len_lines = array.size(res_lines)

    if (
    len_lines >= 1)
        for 
    ind 0 to len_lines 
            to_delete 
    = array.pop(res_lines)
            array.
    pop(res_slopes)
            
    line.delete(to_delete)
            
    // line.set_extend(to_delete, extend=extend.none)



    count_slope(ph1ph2pos1pos2) => (ph2 ph1) / (pos2 pos1)


    if array.
    size(pivots_high) == max_num_of_pivots
        index_of_biggest_slope 
    0
        
    for ind1 0 to max_num_of_pivots 2
            
    for ind2 ind1 1 to max_num_of_pivots 1
                p1 
    = array.get(pivots_highind1)
                
    p2 = array.get(pivots_highind2)
                
    pos1 = array.get(high_indind1)
                
    pos2 = array.get(high_indind2)
                
    count_slope(p1p2pos1pos2)
                
    p1 pos1

                
    // ok = k * bar_index + b > high
                
    ok true
                
    // label.new(pos1, p1, str.tostring(ok))
                
    for ind3 ind2 to max_num_of_pivots 1
                    p3 
    = array.get(pivots_highind3)
                    
    pos3 = array.get(high_indind3)
                    if 
    p3 pos3 
                        ok 
    := false
                        
    // label.new(pos3, p3, 'cross')
                        
    break

                if 
    ind2 ind1 >= 1
                    
    for ind3 ind1 1 to ind2 1
                        p3 
    = array.get(pivots_highind3)
                        
    pos3 = array.get(high_indind3)
                        if 
    p3 pos3 
                            ok 
    := false
                            
    // label.new(pos3, p3, 'cross')
                            
    break

                for 
    ind 0 to prd22 1
                    
    if high[ind] * 0.996 bar_index[ind] + b
                        ok 
    := false
                        
    break
                
                
                if 
    ok //and not (high > k * bar_index + b) // 'and not' for the last line to check if the crosses the price action
                    
    if array.size(res_slopes) < max_lines // max_lines // for now only 1 lines is to be shown
                        
    line line.new(pos1p1pos2p2extend=extend.right)
                        array.
    push(res_linesline)
                        array.
    push(res_slopesk)  
                    else
                        
    max_slope = array.max(res_slopes)
                        
    max_slope_ind = array.indexof(res_slopesmax_slope)
                        if 
    max_lines == 1
                            max_slope_ind 
    := 0
                        
    if max_slope
                            line_to_delete 
    = array.get(res_linesmax_slope_ind)
                            
    line.delete(line_to_delete
                            
    new_line line.new(pos1p1pos2p2extend=extend.right)
                            array.
    insert(res_linesmax_slope_indnew_line)
                            array.
    insert(res_slopesmax_slope_indk)
                            array.
    remove(res_linesmax_slope_ind 1)
                            array.
    remove(res_slopesmax_slope_ind 1)
                            
    // label.new(pos1, p1, str.tostring(res_slopes))

    // if barstate.islast
    //     label.new(bar_index, high, str.tostring(array.size(res_lines)))

    if array.size(res_lines) >= and barstate.islast
        
    for ind=0 to array.size(res_lines) - 
            l 
    = array.get(res_linesind)
            
    = array.get(res_slopesind)
            
    x1 line.get_x1(l)
            
    x2 line.get_x2(l
            
    prev_lable_ind 0//x2 + prd - 5
            
    for ind1=x2 to bar_index
                p 
    line.get_price(lind1
                if (
    math.abs(high[bar_index ind1]) < 0.005
                    if 
    ind1 prev_lable_ind 10 and ind1 x2 >= prd22
                        label
    .new(ind1high[bar_index ind1], text='S'style=label.style_label_downcolor=color.red)
                        
    prev_lable_ind := ind1

    if not show_lines
        len_l 
    = array.size(res_lines)
        if (
    len_l >= 1)
            for 
    ind 0 to len_l 
                to_delete 
    = array.pop(res_lines)
                array.
    pop(res_slopes)
                
    line.delete(to_delete)

    var 
    sup_lines = array.new_line()
    var 
    sup_slopes = array.new_float()

    len_lines1 = array.size(sup_lines)

    if (
    len_lines1 >= 1)
        for 
    ind 0 to len_lines1 
            to_delete 
    = array.pop(sup_lines)
            array.
    pop(sup_slopes)
            
    line.delete(to_delete)

    if array.
    size(pivots_low) == max_num_of_pivots
        
    for ind1 0 to max_num_of_pivots 2
            
    for ind2 ind1 1 to max_num_of_pivots 1
                p1 
    = array.get(pivots_lowind1)
                
    p2 = array.get(pivots_lowind2)
                
    pos1 = array.get(low_indind1)
                
    pos2 = array.get(low_indind2)
                
    count_slope(p1p2pos1pos2)
                
    p1 pos1

                
    // check if pivot points in the future are lower than the line between two points 
                
    ok true
                
    for ind3 ind2 to max_num_of_pivots 1
                    p3 
    = array.get(pivots_lowind3)
                    
    pos3 = array.get(low_indind3)
                    if 
    p3 pos3 b
                        ok 
    := false
                        
    // label.new(pos3, p3, 'cross')
                        
    break

                
    // check if pivot points in the middle of two points is lower
                
    if ind2 ind1 >= 1
                    
    for ind3 ind1 1 to ind2 1
                        p3 
    = array.get(pivots_lowind3)
                        
    pos3 = array.get(low_indind3)
                        if 
    p3 pos3 b
                            ok 
    := false
                            
    // label.new(pos3, p3, 'cross')
                            
    break
                
                for 
    ind 0 to prd22 2
                    
    if low[ind] * 1.008 bar_index[ind] + b
                        ok 
    := false
                        
    break
                
                if 
    ok //and not (low < k * bar_index + b) // 'and not' for the last line to check if the it crosses the price action
                    
    if array.size(sup_slopes) < max_lines // max_lines // for now only 1 lines is to be shown
                        
    line line.new(pos1p1pos2p2extend=extend.right)
                        
    // label.new(pos1, p1, 'ok to print')
                        
    array.push(sup_linesline)
                        array.
    push(sup_slopesk)  
                    else
                        
    max_slope = array.min(sup_slopes)
                        
    max_slope_ind = array.indexof(sup_slopesmax_slope)
                        if 
    max_lines == 1
                            max_slope_ind 
    := 0
                        
    if max_slope
                            line_to_delete 
    = array.get(sup_linesmax_slope_ind)
                            
    line.delete(line_to_delete
                            
    new_line line.new(pos1p1pos2p2extend=extend.right)
                            array.
    insert(sup_linesmax_slope_indnew_line)
                            array.
    insert(sup_slopesmax_slope_indk)
                            array.
    remove(sup_linesmax_slope_ind 1)
                            array.
    remove(sup_slopesmax_slope_ind 1)
                            
    // label.new(pos1, p1, str.tostring(sup_slopes))


    if array.size(sup_lines) >= and barstate.islast
        
    for ind=0 to array.size(sup_lines) - 
            l 
    = array.get(sup_linesind)
            
    = array.get(sup_slopesind)
            
    x1 line.get_x1(l)
            
    x2 line.get_x2(l
            
    prev_lable_ind 0//x2 + prd - 5
            
    for ind1=x2 to bar_index
                p 
    line.get_price(lind1
                if (
    math.abs(low[bar_index ind1]) < 0.005
                    if 
    ind1 prev_lable_ind 10 and ind1 x2 >= prd22
                        label
    .new(ind1low[bar_index ind1], text='A'style=label.style_label_upcolor=color.green)
                        
    prev_lable_ind := ind1

    if not show_lines
        len_l 
    = array.size(sup_lines)
        if (
    len_l >= 1)
            for 
    ind 0 to len_l 
                to_delete 
    = array.pop(sup_lines)
                array.
    pop(sup_slopes)
                
    line.delete(to_delete)
    //////////////////////////////////////////////////// 
    üzerinde çalışılacak örnek...
    Doğum tarihim 16/07/2024 olarak güncellenmiştir.

  3. pivotla .... otomatik trend çizdirme ..... 3-5-2 değerleriyle....
    PHP Code:
      //@version=5
    indicator("."overlay truemax_boxes_count 100)


    ////////////////////////////////////////
    //@version=5
    // User inputs
    prd22 input.int(defval=3title=' Period for Pivot Points'minval=1maxval=50)
    max_num_of_pivots input.int(defval=5title=' Maximum Number of Pivots'minval=5maxval=10)
    max_lines input.int(defval=3title=' Maximum number of trend lines'minval=1maxval=10)
    show_lines input.bool(defval=truetitle=' Show trend lines')
    show_pivots input.bool(defval=truetitle=' Show Pivot Points')

    float ph ta.pivothigh(highprd22prd22)
    float pl ta.pivotlow(lowprd22prd22)


    // Creating array of pivots
    var pivots_high = array.new_float(0)
    var 
    pivots_low = array.new_float(0)

    var 
    high_ind = array.new_int(0)
    var 
    low_ind = array.new_int(0)

    if 
    ph 
        
    array.push(pivots_highph)
        array.
    push(high_indbar_index prd22)
        if array.
    size(pivots_high) > max_num_of_pivots  // limit the array size
            
    array.shift(pivots_high)
            array.
    shift(high_ind)

    if 
    pl
        
    array.push(pivots_lowpl)
        array.
    push(low_indbar_index prd22)
        if array.
    size(pivots_low) > max_num_of_pivots  // limit the array size
            
    array.shift(pivots_low)
            array.
    shift(low_ind)

    // Create arrays to store slopes and lines
    var res_lines = array.new_line()
    var 
    res_slopes = array.new_float()

    len_lines = array.size(res_lines)

    if (
    len_lines >= 1)
        for 
    ind 0 to len_lines 
            to_delete 
    = array.pop(res_lines)
            array.
    pop(res_slopes)
            
    line.delete(to_delete)
            
    // line.set_extend(to_delete, extend=extend.none)



    count_slope(ph1ph2pos1pos2) => (ph2 ph1) / (pos2 pos1)


    if array.
    size(pivots_high) == max_num_of_pivots
        index_of_biggest_slope 
    0
        
    for ind1 0 to max_num_of_pivots 2
            
    for ind2 ind1 1 to max_num_of_pivots 1
                p1 
    = array.get(pivots_highind1)
                
    p2 = array.get(pivots_highind2)
                
    pos1 = array.get(high_indind1)
                
    pos2 = array.get(high_indind2)
                
    count_slope(p1p2pos1pos2)
                
    p1 pos1

                
    // ok = k * bar_index + b > high
                
    ok true
                
    // label.new(pos1, p1, str.tostring(ok))
                
    for ind3 ind2 to max_num_of_pivots 1
                    p3 
    = array.get(pivots_highind3)
                    
    pos3 = array.get(high_indind3)
                    if 
    p3 pos3 
                        ok 
    := false
                        
    // label.new(pos3, p3, 'cross')
                        
    break

                if 
    ind2 ind1 >= 1
                    
    for ind3 ind1 1 to ind2 1
                        p3 
    = array.get(pivots_highind3)
                        
    pos3 = array.get(high_indind3)
                        if 
    p3 pos3 
                            ok 
    := false
                            
    // label.new(pos3, p3, 'cross')
                            
    break

                for 
    ind 0 to prd22 1
                    
    if high[ind] * 0.996 bar_index[ind] + b
                        ok 
    := false
                        
    break
                
                
                if 
    ok //and not (high > k * bar_index + b) // 'and not' for the last line to check if the crosses the price action
                    
    if array.size(res_slopes) < max_lines // max_lines // for now only 1 lines is to be shown
                        
    line line.new(pos1p1pos2p2extend=extend.right)
                        array.
    push(res_linesline)
                        array.
    push(res_slopesk)  
                    else
                        
    max_slope = array.max(res_slopes)
                        
    max_slope_ind = array.indexof(res_slopesmax_slope)
                        if 
    max_lines == 1
                            max_slope_ind 
    := 0
                        
    if max_slope
                            line_to_delete 
    = array.get(res_linesmax_slope_ind)
                            
    line.delete(line_to_delete
                            
    new_line line.new(pos1p1pos2p2extend=extend.right)
                            array.
    insert(res_linesmax_slope_indnew_line)
                            array.
    insert(res_slopesmax_slope_indk)
                            array.
    remove(res_linesmax_slope_ind 1)
                            array.
    remove(res_slopesmax_slope_ind 1)
                            
    // label.new(pos1, p1, str.tostring(res_slopes))

    // if barstate.islast
    //     label.new(bar_index, high, str.tostring(array.size(res_lines)))

    if array.size(res_lines) >= and barstate.islast
        
    for ind=0 to array.size(res_lines) - 
            l 
    = array.get(res_linesind)
            
    = array.get(res_slopesind)
            
    x1 line.get_x1(l)
            
    x2 line.get_x2(l
            
    prev_lable_ind 0//x2 + prd - 5
            
    for ind1=x2 to bar_index
                p 
    line.get_price(lind1
                if (
    math.abs(high[bar_index ind1]) < 0.005
                    if 
    ind1 prev_lable_ind 10 and ind1 x2 >= prd22
                        label
    .new(ind1high[bar_index ind1])
                        
    prev_lable_ind := ind1

    if not show_lines
        len_l 
    = array.size(res_lines)
        if (
    len_l >= 1)
            for 
    ind 0 to len_l 
                to_delete 
    = array.pop(res_lines)
                array.
    pop(res_slopes)
                
    line.delete(to_delete)

    var 
    sup_lines = array.new_line()
    var 
    sup_slopes = array.new_float()

    len_lines1 = array.size(sup_lines)

    if (
    len_lines1 >= 1)
        for 
    ind 0 to len_lines1 
            to_delete 
    = array.pop(sup_lines)
            array.
    pop(sup_slopes)
            
    line.delete(to_delete)

    if array.
    size(pivots_low) == max_num_of_pivots
        
    for ind1 0 to max_num_of_pivots 2
            
    for ind2 ind1 1 to max_num_of_pivots 1
                p1 
    = array.get(pivots_lowind1)
                
    p2 = array.get(pivots_lowind2)
                
    pos1 = array.get(low_indind1)
                
    pos2 = array.get(low_indind2)
                
    count_slope(p1p2pos1pos2)
                
    p1 pos1

                
    // check if pivot points in the future are lower than the line between two points 
                
    ok true
                
    for ind3 ind2 to max_num_of_pivots 1
                    p3 
    = array.get(pivots_lowind3)
                    
    pos3 = array.get(low_indind3)
                    if 
    p3 pos3 b
                        ok 
    := false
                        
    // label.new(pos3, p3, 'cross')
                        
    break

                
    // check if pivot points in the middle of two points is lower
                
    if ind2 ind1 >= 1
                    
    for ind3 ind1 1 to ind2 1
                        p3 
    = array.get(pivots_lowind3)
                        
    pos3 = array.get(low_indind3)
                        if 
    p3 pos3 b
                            ok 
    := false
                            
    // label.new(pos3, p3, 'cross')
                            
    break
                
                for 
    ind 0 to prd22 2
                    
    if low[ind] * 1.008 bar_index[ind] + b
                        ok 
    := false
                        
    break
                
                if 
    ok //and not (low < k * bar_index + b) // 'and not' for the last line to check if the it crosses the price action
                    
    if array.size(sup_slopes) < max_lines // max_lines // for now only 1 lines is to be shown
                        
    line line.new(pos1p1pos2p2extend=extend.right)
                        
    // label.new(pos1, p1, 'ok to print')
                        
    array.push(sup_linesline)
                        array.
    push(sup_slopesk)  
                    else
                        
    max_slope = array.min(sup_slopes)
                        
    max_slope_ind = array.indexof(sup_slopesmax_slope)
                        if 
    max_lines == 1
                            max_slope_ind 
    := 0
                        
    if max_slope
                            line_to_delete 
    = array.get(sup_linesmax_slope_ind)
                            
    line.delete(line_to_delete
                            
    new_line line.new(pos1p1pos2p2extend=extend.right)
                            array.
    insert(sup_linesmax_slope_indnew_line)
                            array.
    insert(sup_slopesmax_slope_indk)
                            array.
    remove(sup_linesmax_slope_ind 1)
                            array.
    remove(sup_slopesmax_slope_ind 1)
                            
    // label.new(pos1, p1, str.tostring(sup_slopes))


    if array.size(sup_lines) >= and barstate.islast
        
    for ind=0 to array.size(sup_lines) - 
            l 
    = array.get(sup_linesind)
            
    = array.get(sup_slopesind)
            
    x1 line.get_x1(l)
            
    x2 line.get_x2(l
            
    prev_lable_ind 0//x2 + prd - 5
            
    for ind1=x2 to bar_index
                p 
    line.get_price(lind1
                if (
    math.abs(low[bar_index ind1]) < 0.005
                    if 
    ind1 prev_lable_ind 10 and ind1 x2 >= prd22
                        label
    .new(ind1low[bar_index ind1])
                        
    prev_lable_ind := ind1

    if not show_lines
        len_l 
    = array.size(sup_lines)
        if (
    len_l >= 1)
            for 
    ind 0 to len_l 
                to_delete 
    = array.pop(sup_lines)
                array.
    pop(sup_slopes)
                
    line.delete(to_delete)
    //////////////////////////////////////////////////// 
    Doğum tarihim 16/07/2024 olarak güncellenmiştir.

  4. https://tr.tradingview.com/script/LSmk7DkW/

    üstel hareketli ortalamaları kullanan bir kod....

    yazan için başlangıç sayılır.....

    emeğine saygı gösterip.....

    eğer burayı okuma şansı olursa....

    tavsiye....

    grafiğe çok plot çizdirme yerine.... ortalamasını alsın....

    yazdığı bu....https://www.tradingview.com/x/8RHhs4RP/

    ortalama alınırsa böyle olur...https://www.tradingview.com/x/kAjzYeT2/

    PHP Code:
     //@version=5
    // author Deniz

    indicator(title="Hareketli Ortalama FIBO COMBO"overlay=trueshorttitle="ADOCOMBOEMA")
    src input(title="Source"defval=close)

    length1 input(5"MOV Length1")


    length2 input(8"MOV Length2")


    length3 input(13"MOV Length3")


    length4 input(21"MOV Length4")


    length5 input(34"MOV Length5")


    length6 input(55"MOV Length6")


    length7 input(89"MOV Length7")


    length8 input(144"MOV Length8")


    length9 input(17"HAHO lenght")


    xyz=(length1+length2+length3+length4+length5+length6+length7+length8+length9 )/9
    plot
    (ta.sma(srcxyz),color=color.rgb(255253255),linewidth=2,title="Ort"
    Doğum tarihim 16/07/2024 olarak güncellenmiştir.

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

    kodu yazan kişi.... bence uzunluğa dikkat etmeli.....

    normal görüntü bu.....https://www.tradingview.com/x/dBhQSvDr/

    uzunluğu 20 olsa.....
    trend kırılımlarını daha rahat görür.....
    https://www.tradingview.com/x/YCCjVNXh/

    hatta bunu 20-50 kesişimden sinya ürettirmesi daha mantıklı.....

    kodun 20 uzunlukta....
    v5 versiyon halini de ben eklemiş olayım.....

    kullanmak isteyenlere....

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

    //@version=5
    indicator('ابو فليحه'overlay=truemax_bars_back=1000max_lines_count=300)
    src input(defval=closetitle='لا تلعب بيها')
    len input.int(defval=20title='الشمعات'minval=10)
    devlen input.float(defval=2.title='الانحراف'minval=0.1step=0.1)
    extendit input(defval=truetitle='خط انفنتي')
    showfibo input(defval=falsetitle='مستويات فيبو')
    showbroken input.bool(defval=truetitle='القنوات المكسورة'inline='brk')
    brokencol input.color(defval=color.rgb(2074248), title=''inline='brk')
    upcol input.color(defval=color.limetitle='لون الترندات الصاعده والنازله'inline='trcols')
    dncol input.color(defval=color.redtitle=''inline='trcols')
    widt input(defval=1title='عرض الخط')

    var 
    fibo_ratios = array.new_float(0)
    var 
    colors = array.new_color(2)
    if 
    barstate.isfirst
        
    array.unshift(colorsupcol)
        array.
    unshift(colorsdncol)
        array.
    push(fibo_ratios0.236)
        array.
    push(fibo_ratios0.382)
        array.
    push(fibo_ratios0.618)
        array.
    push(fibo_ratios0.786)


    get_channel(srclen) =>
        
    mid math.sum(srclen) / len
        slope 
    ta.linreg(srclen0) - ta.linreg(srclen1)
        
    intercept mid slope math.floor(len 2) + (len 2) / slope
        endy 
    intercept slope * (len 1)
        
    dev 0.0
        
    for 0 to len 1 by 1
            dev 
    += math.pow(src[x] - (slope * (len x) + intercept), 2)
            
    dev
        dev 
    := math.sqrt(dev len)
        [
    interceptendydevslope]

    [
    y1_y2_devslope] = get_channel(srclen)

    outofchannel slope and close y2_ dev devlen slope and close y2_ dev devlen : -1

    var reglines = array.new_line(3)
    var 
    fibolines = array.new_line(4)
    for 
    0 to 2 by 1
        
    if not showbroken or outofchannel != or nz(outofchannel[1], -1) != -1
            line
    .delete(array.get(reglinesx))
        else
            
    line.set_color(array.get(reglinesx), color=brokencol)
            
    line.set_width(array.get(reglinesx), width=2)
            
    line.set_style(array.get(reglinesx), style=line.style_dotted)
            
    line.set_extend(array.get(reglinesx), extend=extend.none)

        array.
    set(reglinesxline.new(x1=bar_index - (len 1), y1=y1_ dev devlen * (1), x2=bar_indexy2=y2_ dev devlen * (1), color=array.get(colorsmath.round(math.max(math.sign(slope), 0))), style=== line.style_solid line.style_dashedwidth=widtextend=extendit extend.right extend.none))
    if 
    showfibo
        
    for 0 to 3 by 1
            line
    .delete(array.get(fibolinesx))
            array.
    set(fibolinesxline.new(x1=bar_index - (len 1), y1=y1_ dev devlen dev devlen * array.get(fibo_ratiosx), x2=bar_indexy2=y2_ dev devlen dev devlen * array.get(fibo_ratiosx), color=array.get(colorsmath.round(math.max(math.sign(slope), 0))), style=line.style_dottedwidth=widtextend=extendit extend.right extend.none))

    var 
    label sidelab label.new(x=bar_index - (len 1), y=y1_text='S'size=size.large)
    txt slope slope slope[1] ? '⇑' '⇗' slope slope slope[1] ? '⇓' '⇘' '⇒'
    stl slope slope slope[1] ? label.style_label_up label.style_label_upper_right slope slope slope[1] ? label.style_label_down label.style_label_lower_right label.style_label_right
    label
    .set_style(sidelabstl)
    label.set_text(sidelabtxt)
    label.set_x(sidelabbar_index - (len 1))
    label.set_y(sidelabslope y1_ dev devlen slope y1_ dev devlen y1_)
    label.set_color(sidelabslope upcol slope dncol color.blue)

    alertcondition(outofchanneltitle='انكسرت القناة'message='انكسرت القناة')

    // direction
    trendisup math.sign(slope) != math.sign(slope[1]) and slope 0
    trendisdown 
    math.sign(slope) != math.sign(slope[1]) and slope 0
    alertcondition
    (trendisuptitle='ترند صاعد'message='ترند صاعد')
    alertcondition(trendisdowntitle='ترند هابط'message='ترند هابط'
    Doğum tarihim 16/07/2024 olarak güncellenmiştir.

  6. https://tr.tradingview.com/v/vOLgkYa8/

    uzunluğu 20 yapsak... forecast ....sonrası için kanal belirleme....
    Doğum tarihim 16/07/2024 olarak güncellenmiştir.

  7. https://tr.tradingview.com/v/fSkHm23m/

    güzel bir strateji trend kodu....

    neden derseniz...hesaplamada...fama ve mama kullanmış.... ortalamaların anası yani...
    https://www.tradingview.com/x/vrNpmQL8/


    plotlar kapatılıp...sade bar renkli kullanılmalı diğer birleşmeler buna uygulanabilir.....
    https://www.tradingview.com/x/AjQUsLeg/

    kullanmak isteyenler kodun versiyon 5 hali.....

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


    //@version=5

    src close

    strategy
    ('Get your trend'overlay=truepyramiding=1initial_capital=10000default_qty_type=strategy.percent_of_equitydefault_qty_value=100calc_on_order_fills=falseslippage=0commission_type=strategy.commission.percentcommission_value=0.04)

    //Inputs  -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Length1 input.int(5title='  1-SMA Lenght'minval=1)
    Length2 input.int(15title='  2-SMA Lenght'minval=1)
    Length3 input.int(25title='  3-SMA Lenght'minval=1)
    prd input.int(15title='  PP period'group='Average True Range')
    Factor input.int(1title='  ATR Factor'group='Average True Range')
    Pd input.int(1title='  ATR Period'group='Average True Range')
    ADX_options input.string('CLASSIC'title='  Adx Type'options=['CLASSIC''MASANAKAMURA'], group='ADX')
    ADX_len input.int(20title='  Adx lenght'minval=1group='ADX')
    th input.float(15title='  Adx Treshold'minval=0step=0.5group='ADX')
    len input.int(30title='  Cloud Length'group='Cloud')
    volume_f input.float(1.8title='  Volume mult.'minval=0step=0.1group='Volume')
    sma_length input.int(30title='  Volume lenght'minval=1group='Volume')

    //Indicators -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    calcADX(_len) =>
        
    up ta.change(high)
        
    down = -ta.change(low)
        
    plusDM na(up) ? na up down and up up 0
        minusDM 
    na(down) ? na down up and down down 0
        truerange 
    ta.rma(ta.tr_len)
        
    _plus fixnan(100 ta.rma(plusDM_len) / truerange)
        
    _minus fixnan(100 ta.rma(minusDM_len) / truerange)
        
    sum _plus _minus
        _adx 
    100 ta.rma(math.abs(_plus _minus) / (sum == sum), _len)
        [
    _plus_minus_adx]
    calcADX_Masanakamura(_len) =>
        
    SmoothedTrueRange 0.0
        SmoothedDirectionalMovementPlus 
    0.0
        SmoothedDirectionalMovementMinus 
    0.0
        TrueRange 
    math.max(math.max(high lowmath.abs(high nz(close[1]))), math.abs(low nz(close[1])))
        
    DirectionalMovementPlus high nz(high[1]) > nz(low[1]) - low math.max(high nz(high[1]), 0) : 0
        DirectionalMovementMinus 
    nz(low[1]) - low high nz(high[1]) ? math.max(nz(low[1]) - low0) : 0
        SmoothedTrueRange 
    := nz(SmoothedTrueRange[1]) - nz(SmoothedTrueRange[1]) / _len TrueRange
        SmoothedDirectionalMovementPlus 
    := nz(SmoothedDirectionalMovementPlus[1]) - nz(SmoothedDirectionalMovementPlus[1]) / _len DirectionalMovementPlus
        SmoothedDirectionalMovementMinus 
    := nz(SmoothedDirectionalMovementMinus[1]) - nz(SmoothedDirectionalMovementMinus[1]) / _len DirectionalMovementMinus
        DIP 
    SmoothedDirectionalMovementPlus SmoothedTrueRange 100
        DIM 
    SmoothedDirectionalMovementMinus SmoothedTrueRange 100
        DX 
    math.abs(DIP DIM) / (DIP DIM) * 100
        adx 
    ta.sma(DX_len)
        [
    DIPDIMadx]
    [
    DIPlusCDIMinusCADXC] = calcADX(ADX_len)
    [
    DIPlusMDIMinusMADXM] = calcADX_Masanakamura(ADX_len)
    DIPlus ADX_options == 'CLASSIC' DIPlusC DIPlusM
    DIMinus 
    ADX_options == 'CLASSIC' DIMinusC DIMinusM
    ADX 
    ADX_options == 'CLASSIC' ADXC ADXM
    L_adx 
    DIPlus DIMinus and ADX th
    S_adx 
    DIPlus DIMinus and ADX th
    float ph 
    ta.pivothigh(prdprd)
    float pl ta.pivotlow(prdprd)
    var 
    float center na
    float lastpp 
    ph ph pl pl na
    if lastpp
        
    if na(center)
            
    center := lastpp
            center
        
    else

            
    center := (center lastpp) / 3
            center
    Up 
    center Factor ta.atr(Pd)
    Dn center Factor ta.atr(Pd)
    float TUp na
    float TDown 
    na
    Trend 
    0
    TUp 
    := close[1] > TUp[1] ? math.max(UpTUp[1]) : Up
    TDown 
    := close[1] < TDown[1] ? math.min(DnTDown[1]) : Dn
    Trend 
    := close TDown[1] ? close TUp[1] ? -nz(Trend[1], 1)
    Trailingsl Trend == TUp TDown
    bsignal 
    Trend == and Trend[1] == -1
    ssignal 
    Trend == -and Trend[1] == 1
    L_ATR 
    Trend == 1
    S_ATR 
    Trend == -1
    SMA1 
    ta.sma(srcLength1)
    SMA2 ta.sma(srcLength2)
    SMA3 ta.sma(srcLength3)
    Volume_condt volume ta.sma(volumesma_length) * volume_f
    Long_MA 
    SMA1 close and SMA2 close and SMA3 close
    Short_MA 
    SMA1 close and SMA2 close and SMA3 close
    PI 
    math.asin(1)
    hilbertTransform(src) =>
        
    0.0962 src 0.5769 nz(src[2]) - 0.5769 nz(src[4]) - 0.0962 nz(src[6])
    computeComponent(srcmesaPeriodMult) =>
        
    hilbertTransform(src) * mesaPeriodMult
    computeAlpha
    (srcfastLimitslowLimit) =>
        
    mesaPeriod 0.0
        mesaPeriodMult 
    0.075 nz(mesaPeriod[1]) + 0.54
        smooth 
    0.0
        smooth 
    := (src nz(src[1]) + nz(src[2]) + nz(src[3])) / 10
        detrender 
    0.0
        detrender 
    := computeComponent(smoothmesaPeriodMult)
        
    I1 nz(detrender[3])
        
    Q1 computeComponent(detrendermesaPeriodMult)
        
    jI computeComponent(I1mesaPeriodMult)
        
    jQ computeComponent(Q1mesaPeriodMult)
        
    I2 0.0
        Q2 
    0.0
        I2 
    := I1 jQ
        Q2 
    := Q1 jI
        I2 
    := 0.2 I2 0.8 nz(I2[1])
        
    Q2 := 0.2 Q2 0.8 nz(Q2[1])
        
    Re I2 nz(I2[1]) + Q2 nz(Q2[1])
        
    Im I2 nz(Q2[1]) - Q2 nz(I2[1])
        
    Re := 0.2 Re 0.8 nz(Re[1])
        
    Im := 0.2 Im 0.8 nz(Im[1])
        if 
    Re != and Im != 0
            mesaPeriod 
    := PI math.atan(Im Re)
            
    mesaPeriod
        
    if mesaPeriod 1.5 nz(mesaPeriod[1])
            
    mesaPeriod := 1.5 nz(mesaPeriod[1])
            
    mesaPeriod
        
    if mesaPeriod 0.67 nz(mesaPeriod[1])
            
    mesaPeriod := 0.67 nz(mesaPeriod[1])
            
    mesaPeriod
        
    if mesaPeriod 6
            mesaPeriod 
    := 6
            mesaPeriod
        
    if mesaPeriod 50
            mesaPeriod 
    := 50
            mesaPeriod
        mesaPeriod 
    := 0.2 mesaPeriod 0.8 nz(mesaPeriod[1])
        
    phase 0.0
        
    if I1 != 0
            phase 
    := 180 PI math.atan(Q1 I1)
            
    phase
        deltaPhase 
    nz(phase[1]) - phase
        
    if deltaPhase 1
            deltaPhase 
    := 1
            deltaPhase
        alpha 
    fastLimit deltaPhase
        
    if alpha slowLimit
            alpha 
    := slowLimit
            alpha
        
    [alphaalpha 2.0]
    er math.abs(ta.change(srclen)) / math.sum(math.abs(ta.change(src)), len)
    [
    ab] = computeAlpha(srcerer 0.1)
    mama 0.0
    mama 
    := src + (a) * nz(mama[1])
    fama 0.0
    fama 
    := mama + (b) * nz(fama[1])
    alpha math.pow(er * (a) + a2)
    kama 0.0
    kama 
    := alpha src + (alpha) * nz(kama[1])
    L_cloud kama kama[1]
    S_cloud kama kama[1]

    // STRATEGY LOGIC -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    var bool longCond na
    var bool shortCond na
    longCond 
    := nz(longCond[1])
    shortCond := nz(shortCond[1])
    var 
    int CondIni_long 0
    var int CondIni_short 0
    CondIni_long 
    := nz(CondIni_long[1])
    CondIni_short := nz(CondIni_short[1])
    var 
    bool Final_longCondition na
    var bool Final_shortCondition na
    Final_longCondition 
    := nz(Final_longCondition[1])
    Final_shortCondition := nz(Final_shortCondition[1])
    var 
    bool BT_Final_longCondition na
    var bool BT_Final_shortCondition na
    BT_Final_longCondition 
    := nz(BT_Final_longCondition[1])
    BT_Final_shortCondition := nz(BT_Final_shortCondition[1])
    var 
    float last_open_longCondition na
    var float last_open_shortCondition na
    var int last_longCondition na
    var int last_shortCondition na
    var int nLongs na
    var int nShorts na
    nLongs 
    := nz(nLongs[1])
    nShorts := nz(nShorts[1])
    Bulls_on_the_control Long_MA and Volume_condt and L_adx and not S_cloud
    close_condt 
    S_cloud and S_ATR
    longCond 
    := Bulls_on_the_control
    shortCond 
    := close_condt
    CondIni_long 
    := longCond[1] ? shortCond[1] ? -nz(CondIni_long[1])
    CondIni_short := longCond[1] ? shortCond[1] ? -nz(CondIni_short[1])
    longCondition longCond[1] and nz(CondIni_long[1]) == -1
    shortCondition 
    shortCond[1] and nz(CondIni_short[1]) == 1
    var int last_long_sl na
    var int last_short_sl na
    last_open_longCondition 
    := longCondition close[1] : nz(last_open_longCondition[1])
    last_open_shortCondition := shortCondition close[1] : nz(last_open_shortCondition[1])
    last_longCondition := longCondition time nz(last_longCondition[1])
    last_shortCondition := shortCondition time nz(last_shortCondition[1])
    in_longCondition last_longCondition last_shortCondition
    in_shortCondition 
    last_shortCondition last_longCondition
    if longCondition
        nLongs 
    += 1
        nShorts 
    := na
        nShorts
    if shortCondition
        nLongs 
    := na
        nShorts 
    += 1
        nShorts
    var int sectionLongs 0
    sectionLongs 
    := nz(sectionLongs[1])
    var 
    int sectionShorts 0
    sectionShorts 
    := nz(sectionShorts[1])
    if 
    longCondition
        sectionLongs 
    += 1
        sectionShorts 
    := 0
        sectionShorts
    if shortCondition
        sectionLongs 
    := 0
        sectionShorts 
    += 1
        sectionShorts
    var float PositionPrice 0.0
    PositionPrice 
    := nz(PositionPrice[1])
    var 
    float sum_long 0.0
    var float sum_short 0.0
    if longCondition
        sum_long 
    := nz(last_open_longCondition) + nz(sum_long[1])
        
    sum_short := 0.0
        sum_short
    if shortCondition
        sum_short 
    := nz(last_open_shortCondition) + nz(sum_short[1])
        
    sum_long := 0.0
        sum_long
    PositionPrice 
    := longCondition sum_long sectionLongs shortCondition sum_short sectionShorts na

    // Colors ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    ADX_COLOR L_adx color.lime S_adx color.red color.orange
    barcolor
    (color=ADX_COLOR)

    //PLOTSPAHES =======================================================================================================================================================================================================================================================================================================

    mama_p plot(mamatitle='Cloud A'color=ADX_COLOR)
    fama_p plot(famatitle='Cloud B'color=ADX_COLOR)
    fill(mama_pfama_pcolor=ADX_COLORtransp=90)
    plot(SMA1color=color.new(color.gray0), style=plot.style_steplinetitle='5'linewidth=1)
    plot(SMA2color=color.new(color.gray0), style=plot.style_steplinetitle='15'linewidth=2)
    plot(SMA3color=color.new(color.black0), style=plot.style_steplinetitle='55'linewidth=3)
    plotshape(longConditiontitle='Long'style=shape.triangleuplocation=location.belowbartext='Long'textcolor=color.new(color.blue0), color=color.new(color.blue0), size=size.small)
    plotshape(shortConditiontitle='Close'style=shape.xcrosslocation=location.abovebartext='Close'textcolor=color.new(color.fuchsia0), color=color.new(color.fuchsia0), size=size.small)
    plot(PositionPricetitle='Average Price'color=color.new(color.white0), linewidth=7style=plot.style_circleseditable=false)


    if 
    Long_MA and Volume_condt and L_adx and not S_cloud
        strategy
    .entry('L'strategy.long)


    strategy.close_all(when=close_condt)



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

  8. https://tr.tradingview.com/v/ed8Sv4PQ/

    plotların çoğu kapatılmış görüntü... https://www.tradingview.com/x/ewhTUocn/

    not data 5-20 kullanılmıştır....
    Doğum tarihim 16/07/2024 olarak güncellenmiştir.

Sayfa 228/272 İlkİlk ... 128178218226227228229230238 ... 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
  •