Sayfa 192/331 İlkİlk ... 92142182190191192193194202242292 ... SonSon
Arama sonucu : 2647 madde; 1,529 - 1,536 arası.

Konu: Tradingview

  1. Göstergeye yorum TREND çizgiyi otomatik çekiyor anladığım kadarıyla

    https://tr.tradingview.com/script/ObBduzr0/


    BİST ve NASDAQ borsalarının durumunu "RSİ MOMENTUM TREND" indikatörü ile takip edebilirsiniz.

    İndikatör linki
    https://tr.tradingview.com/script/g6...omentum-Trend/


    Pullback, trend ve trend dönüşümleri ile işlem alanlar için belki de YORUMCULARA GÖRE tradingview'in en iyi indikatörü;

    https://tr.tradingview.com/script/Xe...s-and-Retests/

    Lux Algo'nun ÜCRETLİ satılan indikatörünün benzeri free

    https://tr.tradingview.com/script/34...ks-ChartPrime/

  2. Alım satım stratejisi;
    1 saatlik grafikte supertrend indikatörünün ayarları 3, 3 yapılır. ikinci verdiğim indikatörde çıkan mavi çizgiye stop loss konur ve fiyat yükseldikçe çıkan mavi çizginin 1 altındaki çizgiye kâr seviyesi alınır.


    https://tr.tradingview.com/v/r6dAP7yi/
    https://tr.tradingview.com/script/96...h-1-line-plot/

  3. ellerine sağlık rosense hocam....
    örnekler çok güzel....

    son yazdığın örneğin birleştirilmesi çok güzel....

    zaten amaç....
    birbirine uygun kodlarla... sistem kurgulamak.....

    hayırlı bayramlar.....

  4.  Alıntı Originally Posted by @yörük@ Yazıyı Oku
    ellerine sağlık rosense hocam....
    örnekler çok güzel....

    son yazdığın örneğin birleştirilmesi çok güzel....

    zaten amaç....
    birbirine uygun kodlarla... sistem kurgulamak.....

    hayırlı bayramlar.....
    Sanada hayırlı bayramlar kardeş

    amaç paylaştıkça daha yeniyi doğruyu güzeli bulmak bulabilirsek haz duyarım inşaallah .
    bazen sosyal medyaya da ling atıyorum daha çok kişi yararlanılsın diye

  5. sistem kurgulama örneği....


    üç bölüm tasarlandı....


    ana kısmı bu....
    sadeleştirildi....hesaplamalardaki çizgilerin çoğu gizlendi.... agresif tasarlandı...değerler değiştirildi...
    testleri tamamlanmadı henüz.....
    kodu....

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

    //@version=5

    indicator('*'overlay=truemax_bars_back=201)

    // input
    start 20
    lookback 
    input(1"Sensitivity"tooltip="Low (High Sensitivity), High (Low Sensitivity).\n\nAdjust according to timeframe and asset.")
    resp 1
    smoothing 
    input(3"Smoothing")
    source input(close"Source")


    // global
    var ix = -1
    var mal = array.new_int(0)


    // functions
    avg(sourcelen) =>
        
    sum 0.0
        
    for 0 to len-1
            sum 
    += source[i]
        
    sum/len

    bull 
    close open

    wick_touch
    (x) =>
        
    bull ? ((close <= and <= high) or (low <= and <= open)) : ((open <= and <= high) or (low <= and <= close))

    body_touch(x) =>
        
    bull ? (open and close) : (close and open)

    touches(t) =>
        
    touches 0
        
    for 0 to lookback-1
            touches 
    += t[i] ? 0
        touches


    // local
    ix := ix+1
    prev_mal 
    ix >= ? array.get(malix-1) : start

    cma 
    avg(sourceprev_mal)
    cma_p1 avg(sourceprev_mal+1)
    cma_m1 avg(sourceprev_mal-1)

    touches(wick_touch(cma))
    d_p1 touches(wick_touch(cma_p1))
    d_m1 touches(wick_touch(cma_m1))

    d_b touches(body_touch(cma))
    d_p1_b touches(body_touch(cma_p1))
    d_m1_b touches(body_touch(cma_m1))

    any_body_touch d_b or d_p1_b or d_m1_b 0
    no_wick_touch 
    <= and d_p1 <= and d_m1 <= 0
    wick_maximized 
    >= d_p1 and >= d_m1 prev_mal : (d_p1 >= and d_p1 >= d_m1 prev_mal+resp : (d_m1 >= and d_m1 >= d_p1 prev_mal-resp na))

    uptrend cma cma[1]
    downtrend cma cma[1]
    against_trend = (uptrend and close cma) or (downtrend and close cma)

    new_mal no_wick_touch or against_trend prev_mal-resp : (any_body_touch prev_mal+resp wick_maximized)
    next_mal na(new_mal) ? prev_mal new_mal

    array.push(malnext_mal : (next_mal 200 200 next_mal))


    // graph
    scma ta.ema(cmasmoothing)
    plot(scma"Automatic MA"style=plot.style_linecolor=#ffeb3b00)
    ////////////////////////////////////////
    start213 input(0.1)
    increment213 input(0.1)
    maximum213 input(1"Max Value")
    out213 ta.sar(start213increment213maximum213)
    plot(out213"Döngü"style=plot.style_linecolor=#ffeb3b00)
    ////////////////////////////////////////////////////////////////////


    //@version=5

    start22 input.float(title='Start'defval=0.05step=0.1)
    increment input.float(title='Increment'defval=0.075step=0.1)
    maximum input.float(title='Max Value'defval=0.35step=0.1)
    putlabel input(title='Put Labels'defval=true)
    colup input.color(title='Colors'defval=color.rgb(0230119100), inline='col')
    coldn input.color(title=''defval=color.rgb(2558282100), inline='col')

    int trend 0
    float sar 
    0.0
    float ep 
    0.0
    float af 
    0.0

    trend 
    := nz(trend[1])
    ep := nz(ep[1])
    af := nz(af[1])
    sar := sar[1]

    if 
    trend == and not na(high[1])
        
    trend := high >= high[1] or low >= low[1] ? : -1
        sar 
    := trend low[1] : high[1]
        
    ep := trend high[1] : low[1]
        
    af := start22
        af
    else
        
    nextsar sar
        
    if trend 0
            
    if high[1] > ep
                ep 
    := high[1]
                
    af := math.min(maximumaf increment)
                
    af

            nextsar 
    := sar af * (ep sar)
            
    nextsar := math.min(math.min(low[1], low[2]), nextsar)

            
    //Reversal
            
    if nextsar low
                trend 
    := -1
                nextsar 
    := ep
                ep 
    := low
                af 
    := start22
                af
        
    else
            if 
    low[1] < ep
                ep 
    := low[1]
                
    af := math.min(maximumaf increment)
                
    af

            nextsar 
    := sar af * (ep sar)
            
    nextsar := math.max(math.max(high[1], high[2]), nextsar)

            
    //Reversal
            
    if nextsar high
                trend 
    := 1
                nextsar 
    := ep
                ep 
    := high
                af 
    := start22
                af
        sar 
    := nextsar
        sar

    plot
    (sartitle='@@'color=trend colup coldnlinewidth=1style=plot.style_line)

    alertcondition(ta.change(trend) > 0title='PSAR Trend UP'message='PSAR Trend UP')
    alertcondition(ta.change(trend) < 0title='PSAR Trend DOWN'message='PSAR Trend DOWN')

    if 
    ta.change(trend) > and putlabel
        label
    .new(bar_indexsartext=str.tostring(math.round_to_mintick(sar)), color=colupstyle=label.style_label_upsize=size.huge)
    if 
    ta.change(trend) < and putlabel
        label
    .new(bar_indexsartext=str.tostring(math.round_to_mintick(sar)), color=coldnstyle=label.style_label_downsize=size.huge)

    ////////////////////////////////////////////////////////
    length=(1)
    src=close
    start1 
    input(0.1)
    increment1 input(0.1)
    maximum1 input(1"Max Value")
    out1 ta.sar(start1increment1maximum1)

    momo1 src src[length]

    smdo1 out1 momo1

    plot
    (smdo1"1.Döngü"style=plot.style_linecolor=#f0ce0e00)
    /////////////////////////////////////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © fondDealer96636

    //@version=5



    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © starbolt
    //@version=5

    len44 input.int(10'Length'step=1minval=1)
    displace input.int(0'Displace'step=1minval=0)
    ma_type input.string('HMA''MA Type'options=['SMA',  'HMA'])

    //Hilo Activator
    float hilo na
    hi 
    ta.sma(highlen44)
    lo ta.sma(lowlen44)


    // Hull Moving Average (HMA)
    if ma_type == 'HMA'
        
    hi := ta.wma(ta.wma(highlen44 2) - ta.wma(highlen44), math.round(math.sqrt(len44)))
        
    lo := ta.wma(ta.wma(lowlen44 2) - ta.wma(lowlen44), math.round(math.sqrt(len44)))

    hilo := close hi[displace] ? close lo[displace] ? -hilo[1]
    ghla hilo == -hi[displace] : lo[displace]
    color44 hilo == -color.red color.green

    //Alerts
    buyCondition hilo == and hilo[1] == -1
    sellCondition 
    hilo == -and hilo[1] == 1

    if buyCondition
        alert
    ('Long'alert.freq_once_per_bar)

    if 
    sellCondition
        alert
    ('Short'alert.freq_once_per_bar)

    //Plots 
    plot(ghlacolor=color44style=plot.style_crosslinewidth 3)  

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

    //@version=5
    import jdehorty/KernelFunctions/as kernel

    DFT
    (xyNx_dir) =>
        
    float _arg 0.0
        float _cos 
    0.0
        float _sin 
    0.0
        float xArr_i 
    0.0
        float yArr_i 
    0.0
        xArr 
    = array.new_float(array.size(x))
        
    yArr = array.new_float(array.size(y))

        for 
    0 to Nx 1 by 1
            xArr_i 
    := 0.0
            yArr_i 
    := 0.0
            kx 
    float(i) / float(Nx)
            
    _arg := -_dir math.pi kx
            
    for 0 to Nx 1 by 1
                _cos 
    := math.cos(_arg)
                
    _sin := math.sin(_arg)
                
    xArr_i += array.get(xk) * _cos - array.get(yk) * _sin
                yArr_i 
    += array.get(xk) * _sin + array.get(yk) * _cos
                yArr_i
            
    array.set(xArrixArr_i)
            array.
    set(yArriyArr_i)

        if 
    _dir == 1
            
    for 0 to Nx 1 by 1
                
    array.set(xi, array.get(xArri) / float(Nx))
                array.
    set(yi, array.get(yArri) / float(Nx))
        else
            for 
    0 to Nx 1 by 1
                
    array.set(xi, array.get(xArri))
                array.
    set(yi, array.get(yArri))

    //======================================================================================================================
    //                                                  INPUTS
    //======================================================================================================================

    input.int(5,"Fourier Period")
    xval input.source(close,"Fourier X Series",tooltip "i.e. the source of the discrete Fourier"+
     
    " transform (with the Y Series being the bars through time.)")
    highlighting input.bool(true,"Highlighting")
    smoothing66 input.int(10,"Kernel Smoothing")


    //======================================================================================================================
    //                                                  CALCULATIONS
    //======================================================================================================================

    // Fourier transform
    = array.new_float(N0.0)
    = array.new_float(N0.0)
    for 
    0 to N 1
        
    array.set(xixval[i])
        array.
    set(yi0.0)

    DFT(xyN1)

    mag = array.new_float(N0.0)
    for 
    0 to N 1
        mag_i 
    math.sqrt(math.pow(array.get(xi), 2) + math.pow(array.get(yi), 2))
        array.
    set(magimag_i)

    dft = array.get(mag,0)
    dfts kernel.rationalQuadratic(dft,25,1,smoothing66)

    //======================================================================================================================
    //                                                  DISPLAY
    //======================================================================================================================

    plot(dfts"Stop"color=color.rgb(0187212100) )

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

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

    //~~ Tooltips {
    string t1 "The candle lookback length refers to the number of bars, starting from the current one, that will be examined in order to find a similar event in the past."
    string t2 "The amount of Forecast candles that should be displayed in the future."
    string t3 "Background color divider between price and forecast."
    string t4 "Displays the current events found"
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    //~~ Inputs {
    Series   input.int(1,"Candle Series",1,20,tooltip=t1)
    Forecast input.int(166,"Forecast Candles",1,166,tooltip=t2)
    Divider  input.bool(true,"Forecast Divider",t3)
    Display  input.bool(true,"Display Event",t4)
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    //~~ Types {
    type Event
        box currentEvent
        box pastEvent
        box prediction
        
    array<box>  candle
        
    array<linewick
    type Data
        
    array<int>   
        
    array<int>   d
        
    array<floato
        
    array<floath
        
    array<floatl
        
    array<floatc
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    //~~ Variables & Arrays {
    bar_index
    var data  Data.new(array.new<int>(),
                         array.new<
    int>(),
                         array.new<
    float>(),
                         array.new<
    float>(),
                         array.new<
    float>(),
                         array.new<
    float>())
    var 
    event Event.new(box.new(na,na,na,na,chart.fg_color,border_style=line.style_dashed,bgcolor=color(na)),
                         
    box.new(na,na,na,na,chart.fg_color,border_style=line.style_dashed,bgcolor=color(na)),
                         
    box.new(na,na,na,na,chart.fg_color,border_style=line.style_dotted,
                          
    bgcolor=color.new(color.teal,75)),
                         array.new<
    box>(Forecast),
                         array.new<
    line>(Forecast))
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    //~~ Methods {
    //Store Data
    method Store(Data x)=>
        
    int   B b
        int bin 
    close>open?1:close<open?-1:0
        float O 
    open
        float H 
    high
        float L 
    low
        float C 
    close
        x
    .b.unshift(B)
        
    x.d.unshift(bin)
        
    x.o.unshift(O)
        
    x.h.unshift(H)
        
    x.l.unshift(L)
        
    x.c.unshift(C)

    //Candle Plots
    method Candle(Event e,x,i)=>
        
    int dist   1
        float prev 
    x.c.get(i)
        
    float diff = ((close-prev)/prev)+1
        
    for j=i-1 to i-Forecast
            idx 
    j-i+Forecast
            
    if j<0
                
    break
            else
                
    pos x.d.get(j)
                
    top = (pos>0?x.c.get(j):x.o.get(j))*diff
                bot 
    = (pos>0?x.o.get(j):x.c.get(j))*diff
                hi  
    = (x.h.get(j))*diff
                lo  
    = (x.l.get(j))*diff
                col 
    pos==1?#26a69a:pos==-1?#ef5350:chart.fg_color
                
    candle e.candle.get(idx)
                if 
    na(candle)
                    
    e.candle.set(idx,box.new(b+dist,top,b+dist+2,bot,na,bgcolor=col))
                    
    e.wick.set(idx,line.new(b+dist+1,hi,b+dist+1,lo,color=col))
                else
                    
    box.set_lefttop(e.candle.get(idx),b+dist,top)
                    
    box.set_rightbottom(e.candle.get(idx),b+dist+2,bot)
                    
    box.set_bgcolor(e.candle.get(idx),col)
                    
    line.set_xy1(e.wick.get(idx),b+dist+1,hi)
                    
    line.set_xy2(e.wick.get(idx),b+dist+1,lo)
                    
    line.set_color(e.wick.get(idx),col)
            
    dist += 3

    //Events Display
    method Events(Event e,idx,h1,l1,h2,l2,fh,fl)=>
        
    int start idx.get(Series-1)
        
    int end   idx.get(0)
        
    e.currentEvent.set_lefttop(b-Series+1,h1.max())
        
    e.currentEvent.set_rightbottom(b,l1.min())
        
    e.pastEvent.set_lefttop(start,h2.max())
        
    e.pastEvent.set_rightbottom(end,l2.min())
        
    e.prediction.set_lefttop(end+1,fh.max())
        
    e.prediction.set_rightbottom(math.min(b,end+Forecast),fl.min())

    //Current Event
    method Series(Data x)=>
        
    data.Store()
        
    bool found false
        
    if barstate.islast
            events 
    x.d.slice(0,Series)
            for 
    i=Series to x.d.size()-Series
                elements 
    x.d.slice(i,i+Series)
                
    equal 0
                
    for [k,thisin elements
                    
    if this==events.get(k)
                        
    equal += 1
                
    if equal==Series
                    found 
    := true
                    event
    .Candle(data,i)
                    if 
    Display
                        bar 
    x.b.slice(i,i+Series)
                        
    h1  x.h.slice(0,Series)
                        
    l1  x.l.slice(0,Series)
                        
    h2  x.h.slice(i,i+Series)
                        
    l2  x.l.slice(i,i+Series)
                        
    fh  i-Forecast<0?x.h.slice(0,i-1):x.h.slice(i-Forecast,i-1)
                        
    fl  i-Forecast<0?x.l.slice(0,i-1):x.l.slice(i-Forecast,i-1)
                        
    event.Events(bar,h1,l1,h2,l2,fh,fl)
                    break
        if 
    barstate.islast and not found
            runtime
    .error("Couldn't find similar candle series event. \nFix: Decrease Candle Series length")
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    //~~ Divider {
    bgcolor(Divider and barstate.islast?color.new(chart.fg_color,80):na,1)
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

    //~~ Run Code {
    data.Series()
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
    //@version=5
    start21 input(0.1)
    increment21 input(0.001)
    maximum21 input(1"Max Value")
    out21 ta.sar(start21increment21maximum21)
    //plot(out21, "Döngü", style=plot.style_line, color=#f0ce0e)
    plot(out21color=color.aqualinewidth=3title="1",style=plot.style_cross)
    //////////////////////////////////////////////////////////////////////////////////////
    //@version=5

    BackStep input.int(27,"Analysis Period")
    lowerValue input.float(0.382,"Lower Fibonacci Level",options=[0.2360.3820.500.6180.786])
    upperValue input.float(0.618,"Upper Fibonacci Level",options=[0.2360.3820.500.6180.786])
    showFill input.bool(true,"Show Filling")
    changeCandle input.bool(true,"Change Candle Color")
    atr77 ta.atr(200)
    max ta.highest(close,BackStep)
    min ta.lowest(close,BackStep)


    lowerFib min + (max-min)*lowerValue
    upperFib 
    min + (max-min)*upperValue
    ma 
    ta.wma(close,6)

    float closeVal ma
    float openVal 
    ma
    color clrToUse 
    closeVal>upperFib and openVal>upperFib?color.green:closeVal<lowerFib and openVal<lowerFib?color.red:color.yellow

    LowerFibLine 
    plot(lowerFib,title="0.382",color=color.rgb(18975255100))
    UpperFibLine plot(upperFib,title="0.618",color=color.rgb(18975255100))

    float LowerRetracement = (max-min)*0.318
    float UpperRetracement 
    = (max-min)*0.618
    ///////////////////////////////////////////////////////////////////////////////////////
    // 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(false"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"colourlinewidth=3style plot.style_cross)

    plotshape(cross"Trend Is Getting Ready To Change"shape.xcrosslocation.belowbarcolor close offset up_color down_color)
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 

    ikinci kısım bu.....olasılık hesaplaması rakamsal olarak.....
    ana sistemdeki olasılık ise oluşabilecek bar mantığı...ileriye yönelik...
    bu kısım ise o an olabilecekler için...periyotlar küçüldükçe...
    kullanımı daha iyi....

    kodu...

    PHP Code:
     //@version=5
    indicator('Risk-Adjusted Return Oscillator'shorttitle='*'scale=scale.left,  overlay=true)
    //@version=5

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ///                                                            Tooltips                                                                                 ///
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    t1 "Determines the Length of Z-Score Assessment. Defaults to a 75 lookback period" 
    t2 "Determines the length of the SMA if the user selects Show SMA. Default is 75, but for a more responsive SMA you can reduce it to 14. Optional."
    t3 "Shows the probability zones in colour." 
    t4 "Will Display a summarized Z-Table." 
    t5 "Display's the SMA."  

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ///                                                            User Inputs                                                                              ///
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    len input.int(20"Lookback Length"tooltip=t1)
    smalen input.int(1"SMA Length"tooltip=t2
    //probfill = input.bool(true, "Distribution Probaiblity Fills", tooltip=t3) 
    //showztable = input.bool(true, "Show Z-Table", tooltip=t4) 
    showsma input.bool(true"Show SMA"tooltip=t5

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ///                                                            Z-Score/SMA Calculations                                                                  ///
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    = (close ta.sma(closelen)) / ta.stdev(closelen

    cl_sma ta.sma(closelen
    cl_sd ta.stdev(closelen

    // SMA 
    var float z_sma 0.0 

    if showsma 
        z_sma 
    := ta.sma(zsmalen

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ///                                                           Colours                                                                                  ///
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    color labelcolor color.new(color.white100



    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ///                                                            Logical Assessments                                                                      ///
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    bool zero_one >= and 
    bool one_two 
    >= and 2.01 
    bool two_three 
    >= and 3.01 
    bool three 
    >= 
    bool zero 
    >= 0.99 and <= -0.99 
    bool neg_zero_one 
    and > -
    bool neg_one_two 
    <= -and > -
    bool neg_two_three 
    <= -and > -
    bool neg_three 
    <= -
    falling 
    ta.falling(z_sma3
    rising ta.rising(z_sma3


    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ///                                                         Plots                                                                                        ///
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    neutral 
    onesd 

    twosd 

    threesd 

    neg_onesd 
    = -
    neg_twosd 
    = -
    neg_threesd 
    = -


    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ///                                                           Price Level Calculations                                                                  ///
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    neutral_price = (cl_sma) + (cl_sd
    onesd_price = (cl_sma) + (cl_sd
    twosd_price = (cl_sma) + (cl_sd
    threesd_price = (cl_sma) + (cl_sd
    neg_onesd_price = (cl_sma) + (-cl_sd
    neg_twosd_price = (cl_sma) + (-cl_sd
    neg_threesd_price = (cl_sma) + (-cl_sd

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ///                                                            Line Plots                                                                              ///
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


    var label neutral_price_line na 
    var label onesd_price_line na
    var label twosd_price_line na 
    var label threesd_price_line na 
    var label neg_onesd_price_line na 
    var label neg_twosd_price_line na 
    var label neg_threesd_price_line na


    if bar_index >= 75 
        label
    .delete(neutral_price_line
        
    label.delete(onesd_price_line
        
    label.delete(twosd_price_line)
        
    label.delete(threesd_price_line
        
    label.delete(neg_onesd_price_line
        
    label.delete(neg_twosd_price_line)
        
    label.delete(neg_threesd_price_line
        
    neutral_price_line := label.new(bar_indexy=neutraltext=str.tostring(math.round(neutral_price,2)), color=labelcolorstyle=label.style_label_lefttextcolor color.whitesize=size.normaltextalign text.align_right)
        
    onesd_price_line := label.new(bar_index 5onesdstr.tostring(math.round(onesd_price,2)), color=labelcolorstyle=label.style_label_lefttextcolor color.whitesize=size.normaltextalign text.align_right
        
    twosd_price_line := label.new(bar_index 5twosdstr.tostring(math.round(twosd_price,2)), color=labelcolorstyle=label.style_label_lefttextcolor color.whitesize=size.normaltextalign text.align_right
        
    threesd_price_line := label.new(bar_index 5threesdstr.tostring(math.round(threesd_price,2)), color=labelcolorstyle=label.style_label_lefttextcolor color.whitesize=size.normaltextalign text.align_right
        
    neg_onesd_price_line := label.new(bar_index 5neg_onesdstr.tostring(math.round(neg_onesd_price,2)), color=labelcolorstyle=label.style_label_lefttextcolor color.whitesize=size.normaltextalign text.align_right
        
    neg_twosd_price_line := label.new(bar_index 5neg_twosdstr.tostring(math.round(neg_twosd_price,2)), color=labelcolorstyle=label.style_label_lefttextcolor color.whitesize=size.normaltextalign text.align_right
        
    neg_threesd_price_line := label.new(bar_index 5neg_threesdstr.tostring(math.round(neg_threesd_price,2)), color=labelcolorstyle=label.style_label_lefttextcolor color.whitesize=size.normaltextalign text.align_right


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

    son kısım ise alan belirleme.....


    ana kısım trend yönü ve gücünü bulurken...
    ikinci kısım olasılık bakarken....
    son kısım ise olasılıklara uygun alan belirlemiş oluyor....
    belirlenen alan olasılığa tam uymaz....
    bu alan pullback alanı....destek direnç alanı gibi düşünülebilir....
    kodu...
    PHP Code:
     // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © BobRivera990

    //@version=5

    indicator(title='*'overlay=truescale=scale.leftformat=format.priceprecision=2max_bars_back=200)
    //==========================================================================[Inputs]==========================================================================
    useAtr input(truetitle='Use ATR to detect Sideways Movements')  // Use Average True Range (ATR) to detect Sideways Movements

    atrLen input.int(14minval=1title='ATR Length')  // length of the Average True Range (ATR) used to detect Sideways Movements

    atrMaType input.string('EMA'options=['SMA''EMA'], title='ATR Moving Average Type')  // Type of the moving average of the ATR used to detect Sideways Movements
    atrMaLen input.int(27minval=1title='ATR MA Length')  // length of the moving average of the ATR used to detect Sideways Movements

    useAdx input(truetitle='Use ADX to detect Sideways Movements')  // Use Average Directional Index (ADX) to detect Sideways Movements

    adxLen input.int(14minval=1maxval=50title='ADX Smoothing')  // length of the Average Directional Index (ADX) used to detect Sideways Movements
    diLen input.int(14minval=1title='DI Length')  // length of the Plus and Minus Directional Indicators (+DI & -DI) used to determine the direction of the trend
    adxLim input.int(25minval=1title='ADX Limit')  // A level of ADX used as the boundary between Trend Market and Sideways Market

    smooth input.int(3minval=1maxval=5title='Smoothing Factor')  // Factor used for smoothing the oscillator
    lag input.int(8minval=0maxval=15title='Lag')  // lag used to match indicator and chart
    //============================================================================================================================================================
    //===================================================================[Initial Calculations]===================================================================

    atr ta.atr(atrLen)  // Calculate the Average True Range (ATR)
    atrMa atrMaType == 'EMA' ta.ema(atratrMaLen) : ta.sma(atratrMaLen)  // Calculate the moving average of the ATR

    up ta.change(high)  // Calculate parameter related to ADX, +DI and -DI
    down = -ta.change(low)  // Calculate parameter related to ADX, +DI and -DI          
    plusDM na(up) ? na up down and up up 0  // Calculate parameter related to ADX, +DI and -DI
    minusDM na(down) ? na down up and down down 0  // Calculate parameter related to ADX, +DI and -DI
    trur ta.rma(ta.trdiLen)  // Calculate parameter related to ADX, +DI and -DI
    plus fixnan(100 ta.rma(plusDMdiLen) / trur)  // Calculate Plus Directional Indicator (+DI)
    minus fixnan(100 ta.rma(minusDMdiLen) / trur)  // Calculate Minus Directional Indicator (-DI)
    sum plus minus  // Calculate parameter related to ADX

    adx 100 ta.rma(math.abs(plus minus) / (sum == sum), adxLen)  // Calculate Average Directional Index (ADX)
    //============================================================================================================================================================
    //========================================================================[Conditions]========================================================================

    cndNa na(atr) or na(adx) or na(plus) or na(minus) or na(atrMaLen)  // Conditions for lack of sufficient data for calculations

    cndSidwayss1 useAtr and atr <= atrMa  // Sideways Movement condition (based on ATR)
    cndSidwayss2 useAdx and adx <= adxLim  // Sideways Movement condition (based on ADX)
    cndSidways cndSidwayss1 or cndSidwayss2  // General Sideways Movement condition

    cndUp plus minus  // uptrend condition
    cndDown minus >= plus  // downtrend condition

    trendType cndNa na cndSidways cndUp : -2  // Determine the type of trend
    smoothType na(trendType) ? na math.round(ta.sma(trendTypesmooth) / 2) * 2  // Calculate the smoothed trend type oscillator
    //============================================================================================================================================================
    //=========================================================================[Drawing]==========================================================================

    colGreen30 color.new(color.green10)  // Define the color used in the drawings
    colGreen90 color.new(color.green70)  // Define the color used in the drawings
    colGray color.new(color.gray20)  // Define the color used in the drawings      
    colWhite90 color.new(color.black100)  // Define the color used in the drawings
    colRed30 color.new(color.red30)  // Define the color used in the drawings
    colRed90 color.new(color.red70)  // Define the color used in the drawings

    band3 plot(+3title='3'color=color.new(color.black100))  // Draw the upper limit of the uptrend area
    band2 plot(+1title='2'color=color.new(color.black100))  // Draw the boundary between Sideways and Uptrend areas
    band1 plot(-1title='1'color=color.new(color.black100))  // Draw the boundary between Sideways and Downtrend areas
    band0 plot(-3title='0'color=color.new(color.black100))  // Draw the lower limit of the downtrend area

    fill(band2band3title='Uptrend area'color=colGreen90)  // Highlight the Uptrend area
    fill(band1band2title='Sideways area'color=colWhite90)  // Highlight the Sideways area
    fill(band0band1title='Downtrend area'color=colRed90)  // Highlight the Downtrend area

    var label lblUp na
    label
    .delete(lblUp)
    lblUp := label.new(x=timey=2text=''color=color.new(color.green100), textcolor=color.blackstyle=label.style_label_leftxloc=xloc.bar_timeyloc=yloc.pricesize=size.normaltextalign=text.align_left)  // Show Uptrend area label

    var label lblSideways na
    label
    .delete(lblSideways)
    lblSideways := label.new(x=timey=0text=''color=color.new(color.green100), textcolor=color.blackstyle=label.style_label_leftxloc=xloc.bar_timeyloc=yloc.pricesize=size.normaltextalign=text.align_left)  // Show Sideways area label

    var label lblDown na
    label
    .delete(lblDown)
    lblDown := label.new(x=timey=-2text=''color=color.new(color.green100), textcolor=color.blackstyle=label.style_label_leftxloc=xloc.bar_timeyloc=yloc.pricesize=size.normaltextalign=text.align_left)  // Show Downtrend area label

    var label lblCurrentType na
    label
    .delete(lblCurrentType)
    lblCurrentType := label.new(x=timey=smoothTypecolor=color.new(color.blue30), style=label.style_label_rightxloc=xloc.bar_timeyloc=yloc.pricesize=size.small)  // Show the latest status label

    trendCol smoothType == colGreen30 smoothType == colGray colRed30  // Determine the color of the oscillator in different conditions

    //plot(smoothType, title = "Tr", color = trendCol, 
    //    linewidth = 3, offset = -lag, style = plot.style_stepline)                 // Draw the trend type oscillator
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 

  6. ozgurhan @ozgurtrade der ki : İndikatör satan hanzolardan indikatör satın almayın.

    Lux Algo'nun ücretli satılan indikatörünün free ve alarm eklenmiş hali, 2 defadan fazla buy veya sell gelirse kademeli olarak alın.
    Kodları saklayın.


    https://tr.tradingview.com/script/SJ...CT-Algo-Alert/

    iyi bir strateji

    Pine script bilenler stratejiyi resimde görüldüğü üzere indikatöre çevirebilir.
    Strateji linki: https://tradingview.com/script/w91kw...eakout-Alerts/

    https://www.tradingview.com/script/w...eakout-Alerts/


    Strateji;
    Supertrend indikatörünün gereksiz buy sinyallerini önleyen 2 indikatör.

    https://tr.tradingview.com/v/2raJpSpw/
    https://tr.tradingview.com/v/4IYKX938/

  7.  Alıntı Originally Posted by rosense Yazıyı Oku
    ozgurhan @ozgurtrade der ki : İndikatör satan hanzolardan indikatör satın almayın.
    bu yazdığınız çok doğru....
    açık kaynak kodlar varken...
    indikatör almak....ne bileyim....

    strajeilerde hep şunu gördüm...
    en iyisi yüzde elli ile çalışabilir.....
    o da....stratejiye uygulanan zaman dilimini geniş tutanlar için.....

    en iyi strateji...tüm periyotlarda...
    aynı yüzdesel değere yakın olanlar.....

    yüzdesel değer aynı...ancak işlem sayısı değişiyor sadece.....


    sistemler ise....
    en güzeli....kişinin kendi tasarladığı...
    ve ya birleştirdiği sistemler.....

    çünkü el elin eşeğini türkü söyleyerek arar....

    ne olursa olsun....
    insanın kendi emek verdiği....
    sistem çalışması...kendi için evla olandır.....


Sayfa 192/331 İlkİlk ... 92142182190191192193194202242292 ... 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
  •