Sayfa 255/272 İlkİlk ... 155205245253254255256257265 ... SonSon
Arama sonucu : 2172 madde; 2,033 - 2,040 arası.

Konu: Tradingview

  1. kırılımları görmek isteyenler için örnek deneme kodu.... dilediğiniz değerleri değiştirirn...
    PHP Code:

    //@version=5
    indicator("."overlay true)

    //Stop Function
    mult156 input.float(3'Multiplicative Factor'minval 0)
    slope156 input.float(100'Slope'minval 0)
    width156 input.float(100'Width %'minval 0maxval 100) / 100
    //Style
    bullCss156 input.color(color.lime'Average Color'inline 'avg'group 'Style')
    bearCss156 input.color(color.red''              inline 'avg'group 'Style')

    //Calculation
    //-----------------------------------------------------------------------------{
    var float upper156 na
    var float lower156 na
    var float avg156   close

    var hold156 0.
    var os156 1.
        
    atr156 
    nz(ta.atr(200)) * mult156

    avg156 
    := math.abs(close avg156) > atr156 
      
    math.avg(closeavg156)
      : 
    avg156 os156 * (hold156 mult156 slope156)

    os156 := math.sign(avg156 avg156[1])
    hold156 := os156 != os156[1] ? atr156 hold156

    upper156 
    := avg156 width156 hold156
    lower156 
    := avg156 width156 hold156

    css156 
    os156 == bullCss156 bearCss156
    plot_avg156 
    plot(avg156'Kırılım'os156 != os156[1] ? na css156style=plot.style_line,linewidth 4)
    //END 
    https://www.tradingview.com/x/446MwYrJ/
    Teknik olarak; yarına gebe olan bugünü yaşamalı ki, yarın, yaşanmış olsun.

  2. hoşuma giden kodları kombine edip....sinyal çizgilerini kapatıp...ortalamasını aldım...fuşya renginde....

    sonra ema 1-10-20-50-100-200 alıp....ortalamasını hesapladım...sarı çizgi......

    sinyalleme size kalmıştır.....denemek isteyene örnek kod.....

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

    //@version=5
    indicator('SCA'max_bars_back=100overlay=true)
    //Time period
    inp input(title='Source'defval=close)
    res input.timeframe(title='Resolution'defval='')
    rep input(title='Allow Repainting?'defval=false)
    //
    src1 request.security(syminfo.tickeridresinp[rep barstate.isrealtime 0])[rep barstate.isrealtime 1]
    fastLength1 input.int(title='FastLength'defval=12minval=1)
    slowLength1 input.int(title='SlowLength'defval=26minval=1)
    signalLength1 input.int(title='SignalLength'defval=9minval=1)
    macdLevel1 input.float(title='MacdLevel'defval=0minval=0)

    fastAlpha1 2.0 / (fastLength1)
    slowAlpha1 2.0 / (slowLength1)

    fastEma1 ta.ema(src1fastLength1)
    slowEma1 ta.ema(src1slowLength1)

    pMacdEq1 fastAlpha1 slowAlpha1 != ? ((nz(fastEma1[1]) * fastAlpha1) - (nz(slowEma1[1]) * slowAlpha1)) / (fastAlpha1 slowAlpha1) : 0
    pMacdEqSig1 
    ta.ema(pMacdEq1signalLength1)
    pMacdLevel1 fastAlpha1 slowAlpha1 != ? (macdLevel1 - (nz(fastEma1[1]) * (fastAlpha1)) + (nz(slowEma1[1]) * (slowAlpha1))) / (fastAlpha1 slowAlpha1) : 0

    slo1 
    src1 pMacdEq1
    sig1 
    slo1 slo1 nz(slo1[1]) ? slo1 slo1 nz(slo1[1]) ? -: -0

    rmacdColor 
    sig1 color.lime sig1 color.lime sig1 < -color.red sig1 color.red color.white

    //plot(pMacdEq1, title='Trend Continue',style=plot.style_cross, color=rmacdColor, linewidth=2)
    //plot(pMacdEqSig1, title='MacdEqSignal', color=color.rgb(255, 255, 255, 100), linewidth=1)
    //plot(pMacdLevel1, title='MacdLevel', color=color.blue, linewidth=2)
    xyz1=(pMacdEq1+pMacdEqSig1+pMacdLevel1)/3
    //plot(xyz11, title='Avarage', color=color.rgb(241, 225, 8, 100), linewidth=2)
    //
    src25 request.security(syminfo.tickeridresinp[rep barstate.isrealtime 0])[rep barstate.isrealtime 1]
    fastLimit25 input.float(title='FastLimit'defval=0.2minval=0.01step=0.01)
    slowLimit25 input.float(title='SlowLimit'defval=0.02minval=0.01step=0.01)

    pi25 math.asin(1)
    period25 0.0
    smooth25 
    = (src25 nz(src25[1]) + nz(src25[2]) + nz(src25[3])) / 10
    detrender25 
    = (0.0962 smooth25 0.5769 nz(smooth25[2]) - 0.5769 nz(smooth25[4]) - 0.0962 nz(smooth25[6])) * (0.075 nz(period25[1]) + 0.54)

    q125 = (0.0962 detrender25 0.5769 nz(detrender25[2]) - 0.5769 nz(detrender25[4]) - 0.0962 nz(detrender25[6])) * (0.075 nz(period25[1]) + 0.54)
    i125 nz(detrender25[3])

    jI25 = (0.0962 i125 0.5769 nz(i125[2]) - 0.5769 nz(i125[4]) - 0.0962 nz(i125[6])) * (0.075 nz(period25[1]) + 0.54)
    jQ25 = (0.0962 q125 0.5769 nz(q125[2]) - 0.5769 nz(q125[4]) - 0.0962 nz(q125[6])) * (0.075 nz(period25[1]) + 0.54)

    i225 i125 jQ25
    i225 
    := 0.2 i225 0.8 nz(i225[1])
    q225 q125 jI25
    q225 
    := 0.2 q225 0.8 nz(q225[1])

    re25 i225 nz(i225[1]) + q225 nz(q225[1])
    re25 := 0.2 re25 0.8 nz(re25[1])
    im25 i225 nz(q225[1]) - q225 nz(i225[1])
    im25 := 0.2 im25 0.8 nz(im25[1])

    period25 := im25 != and re25 != pi25 math.atan(im25 re25) : 0
    period25 
    := math.min(math.max(period250.67 nz(period25[1])), 1.5 nz(period25[1]))
    period25 := math.min(math.max(period256), 50)
    period25 := 0.2 period25 0.8 nz(period25[1])

    smoothPeriod25 0.0
    smoothPeriod25 
    := 0.33 period25 0.67 nz(smoothPeriod25[1])

    phase25 i125 != math.atan(q125 i125) * 180 pi25 0
    deltaPhase25 
    nz(phase25[1]) - phase25
    deltaPhase25 
    := deltaPhase25 deltaPhase25

    alpha25 
    fastLimit25 deltaPhase25
    alpha25 
    := alpha25 slowLimit25 slowLimit25 alpha25

    mama25 
    0.0
    mama25 
    := alpha25 src25 + (alpha25) * nz(mama25[1])

    fama25 0.0
    fama25 
    := 0.5 alpha25 mama25 + (0.5 alpha25) * nz(fama25[1])

    sig25 mama25 fama25 mama25 fama25 ? -0

    mamaColor25 
    sig25 color.green sig25 color.red color.black

    //plot(mama25, title='MAMA', color=mamaColor25, linewidth=2)
    //plot(fama25, title='FAMA', color=color.new(color.yellow, 0), linewidth=2)
    xyz2=(mama25+fama25)/2
    //
    length26 input.int(title='Length'defval=15minval=1)
    momLength26 input.int(title='MomentumLength'defval=5minval=1)
    src26 request.security(syminfo.tickeridresinp[rep barstate.isrealtime 0])[rep barstate.isrealtime 1]

    num26 0.0
    coefSum26 
    0.0
    for 0 to length26 1 by 1
        coef26 
    math.abs(nz(src26[i]) - nz(src26[momLength26]))
        
    num26 += coef26 nz(src26[i])
        
    coefSum26 += coef26
        coefSum26

    filt26 
    coefSum26 != num26 coefSum26 0

    sig26 
    src26 filt26 src26 filt26 ? -0

    filtColor26 
    sig26 color.green sig26 color.red color.black

    //plot(filt26, title='Filter', color=filtColor26, linewidth=2)
    //
    src27 request.security(syminfo.tickeridresinp[rep barstate.isrealtime 0])[rep barstate.isrealtime 1]

    wma127 = (src27 nz(src27[1]) + nz(src27[2]) + nz(src27[3]) + nz(src27[4]) + nz(src27[5]) + nz(src27[6])) / 28
    wma227 
    = (wma127 nz(wma127[1]) + nz(wma127[2]) + nz(wma127[3]) + nz(wma127[4]) + nz(wma127[5]) + nz(wma127[6])) / 28

    predict27 
    wma127 wma227
    trigger27 
    = (predict27 nz(predict27[1]) + nz(predict27[2]) + nz(predict27[3])) / 10

    sig27 
    predict27 trigger27 predict27 trigger27 ? -0

    pmaColor27 
    sig27 color.green sig27 color.red color.black

    //plot(predict27, title='Predict', color=pmaColor27, linewidth=2)
    //plot(trigger27, title='Trigger', color=color.new(color.yellow, 0), linewidth=1)
    xyz3=(filt26+predict27+trigger27)/3
    //
    src29 request.security(syminfo.tickeridresinp[rep barstate.isrealtime 0])[rep barstate.isrealtime 1]
    shortLength29 input.int(title='ShortLength'defval=5minval=1)
    longLength29 input.int(title='LongLength'defval=20minval=1)

    shortAvg29 ta.wma(src29shortLength29)
    shortMa29 math.sum(math.pow(src29 shortAvg292), shortLength29) / shortLength29
    shortRms29 
    shortMa29 math.sqrt(shortMa29) : 0

    longAvg29 
    ta.wma(src29longLength29)
    longMa29 math.sum(math.pow(src29 longAvg292), longLength29) / longLength29
    longRms29 
    longMa29 math.sqrt(longMa29) : 0

    kk29 
    longRms29 != 0.2 shortRms29 longRms29 0
    vidya29 
    0.0
    vidya29 
    := kk29 src29 + (kk29) * nz(vidya29[1])

    slo29 src29 vidya29
    sig29 
    slo29 slo29 nz(slo29[1]) ? slo29 slo29 nz(slo29[1]) ? -: -0

    vidyaColor29 
    sig29 color.green sig29 color.lime sig29 < -color.maroon sig29 color.red color.black

    //plot(vidya29, title='Vidya', color=vidyaColor29, linewidth=2)
    //
    src32 request.security(syminfo.tickeridresinp[rep barstate.isrealtime 0])[rep barstate.isrealtime 1]
    length32 input.int(title='Length'defval=3minval=1)

    jsa32 = (src32 src32[length32]) / 2

    sig32 
    src32 jsa32 src32 jsa32 ? -0

    jsaColor32 
    sig32 color.green sig32 color.red color.black

    //plot(jsa32, color=jsaColor32, linewidth=2)
    //
    src33 request.security(syminfo.tickeridresinp[rep barstate.isrealtime 0])[rep barstate.isrealtime 1]
    fastLength33 input.int(title "FastLength"defval 5minval 1)
    slowLength33 input.int(title "SlowLength"defval 50minval 1)

    leavittProjection(src33length33) =>
        
    result33 ta.linreg(src33length33, -1)
        
    fastLp33 leavittProjection(src33fastLength33)
    slowLp33 leavittProjection(src33slowLength33)

    slo33 fastLp33 slowLp33
    sig33 
    slo33 slo33 nz(slo33[1]) ? slo33 slo33 nz(slo33[1]) ? -: -0

    lpColor33 
    sig33 color.lime sig33 color.lime sig33 < -color.red sig33 color.red color.white

    //plot(fastLp33, title = 'FastLp', color = lpColor33, linewidth = 2)
    //plot(slowLp33, title = 'Stop', style=plot.style_cross, color = rmacdColor, linewidth = 2)
    xyz4=(vidya29+jsa32+fastLp33+slowLp33)/4
    //
    src37 request.security(syminfo.tickeridresinp[rep barstate.isrealtime 0])[rep barstate.isrealtime 1]
    fastLength37 input.int(title='FastLength'defval=5minval=1)
    slowLength37 input.int(title='SlowLength'defval=20minval=1)
    mult37 input.int(title='Multiple'defval=1minval=1)

    fastEma37 ta.ema(src37fastLength37)
    slowEma37 ta.ema(src37slowLength37)
    sqAvg37 math.sum(math.pow(slowEma37 fastEma372), fastLength37) / fastLength37
    dev37 
    math.sqrt(sqAvg37) * mult37

    upperBand37 
    slowEma37 dev37
    lowerBand37 
    slowEma37 dev37
    middleBand37 
    fastEma37

    sig37 
    src37 upperBand37 and nz(src37[1]) <= nz(upperBand37[1]) or src37 lowerBand37 and nz(src37[1]) <= nz(lowerBand37[1]) ? src37 lowerBand37 and nz(src37[1]) >= nz(lowerBand37[1]) or src37 upperBand37 and nz(src37[1]) >= nz(upperBand37[1]) ? -src37 middleBand37 src37 middleBand37 ? -0

    mabColor37 
    sig37 color.green sig37 color.red color.black

    //plot(upperBand37, title='MabUp', color=mabColor37, linewidth=2)
    //plot(middleBand37, title='MabMid', color=color.new(color.yellow, 0), linewidth=1)
    //plot(lowerBand37, title='MabLow', color=mabColor37, linewidth=2)
    xyz5=(upperBand37+middleBand37+lowerBand37)/3
    //
    src44 request.security(syminfo.tickeridresinp[rep barstate.isrealtime 0])[rep barstate.isrealtime 1]
    length44 input.int(title='Length'defval=10minval=1)
    middleBandLength44 input.int(title='MiddleBandLength'defval=21minval=1)
    bandsDeviation44 input.float(title='BandsDeviation'defval=2.4minval=0.1)
    lowBandAdjust44 input.float(title='LowBandAdjust'defval=0.9minval=0.1)

    atrPeriod44 length44 1
    atrBuf44 
    ta.atr(atrPeriod44) * bandsDeviation44
    ma44 
    ta.ema(src44length44)

    upperBand44 ma44 ma44 atrBuf44 src44
    middleBand44 
    ta.ema(src44middleBandLength44)
    lowerBand44 ma44ma44 atrBuf44 lowBandAdjust44 src44

    sig44 
    src44 upperBand44 and nz(src44[1]) <= nz(upperBand44[1]) or src44 lowerBand44 and nz(src44[1]) <= nz(lowerBand44[1]) or src44 middleBand44 src44 lowerBand44 and nz(src44[1]) >= nz(lowerBand44[1]) or src44 upperBand44 and nz(src44[1]) >= nz(upperBand44[1]) or src44 middleBand44 ? -0

    svbColor44 
    sig44 color.green sig44 color.red color.black

    //plot(upperBand44, title='SVBUp', color=svbColor44, linewidth=2)
    //plot(middleBand44, title='SVBMid', color=color.new(color.black, 0), linewidth=1)
    //plot(lowerBand44, title='SVBLow', color=svbColor44, linewidth=2)
    xyz6=(upperBand44+middleBand44+lowerBand44)/3
    //
    float inp55 input(title 'Source'defval close)
    string res55 input.timeframe(title 'Resolution'defval '')
    bool rep55 input(title 'Allow Repainting?'defval false)
    //
    float src51 request.security(syminfo.tickerres55inp55[rep55 barstate.isrealtime 0])[rep55 barstate.isrealtime 1]
    int fastLength51 input.int(title 'FastLength'defval 5minval 1)
    int slowLength51 input.int(title 'SlowLength'defval 20minval 1)
    int sampleLength51 input.int(title 'SampleLength'defval 5minval 1)

    hannFilter51(float sampleSrc51int length51) =>
        
    filt51 0.0coef51 0.0
        
    for 1 to length51
            cosine51 
    math.cos(math.pi / (length51 1))
            
    filt51 := filt51 + (cosine51 nz(sampleSrc51[1]))
            
    coef51 := coef51 cosine51
        filt51 
    := coef51 != filt51 coef51 0

    float sample51 
    0.0
    sample51 
    := bar_index sampleLength51 == src51 nz(sample51[1])
    float fastAvg51 hannFilter51(sample51fastLength51)
    float slowAvg51 hannFilter51(sample51slowLength51)

    float slo51 fastAvg51 slowAvg51
    int sig51 
    slo51 slo51 nz(slo51[1]) ? slo51 slo51 nz(slo51[1]) ? -: -0

    color udsmaColor51 
    sig51 color.green sig51 color.lime sig51 < -color.maroon sig51 color.red color.black

    //plot(fastAvg51, title = "FastAverage", color = udsmaColor51, linewidth = 2)
    //plot(slowAvg51, title = "SlowAverage", color = chart.fg_color, linewidth = 1)
    xyz7=(fastAvg51+slowAvg51)/2
    //
    float src52 request.security(syminfo.tickeridres55inp55[rep55 barstate.isrealtime 0])[rep55 barstate.isrealtime 1]
    fastLength52 input.int(title "FastLength"defval 14minval 1)
    slowLength52 input.int(title "SlowLength"defval 30minval 1)

    leavittProjection52(float src52int length52) =>
        
    float result52 ta.linreg(src52length52, -1)
        
    leavittConvolution52(float src52int length52) =>
        
    int sqrtLength52 math.floor(nz(math.sqrt(length52)))
        
    float result52 ta.linreg(leavittProjection52(src52length52), sqrtLength52, -1)
        
    float fastConv52 leavittConvolution52(src52fastLength52)
    float slowConv52 leavittConvolution52(src52slowLength52)

    float slo52 fastConv52 slowConv52
    int sig52 
    slo52 slo52 nz(slo52[1]) ? slo52 slo52 nz(slo52[1]) ? -: -0

    color lcColor52 
    sig52 color.green sig52 color.lime sig52 < -color.maroon sig52 color.red color.white

    //plot(fastConv52, title = 'FastConv', color = lcColor52, linewidth = 2)
    //plot(slowConv52, title = 'SlowConv', color = chart.fg_color, linewidth = 1)
    xyz8=(fastConv52+slowConv52)/2
    //
    f_security(_symbol66_res66_src66_repaint66) =>
        
    request.security(_symbol66_res66_src66[_repaint66 barstate.isrealtime 0])[_repaint66 barstate.isrealtime 1]

    res66 input.timeframe(title='Resolution'defval='')
    rep66 input(title='Allow Repainting?'defval=false)
    //
    length53 input.int(title='Length'defval=20minval=1)
    factor53 input.int(title='Factor'defval=2minval=1)
    p53 f_security(syminfo.tickeridres66hl2rep66)
    h53 f_security(syminfo.tickeridres66highrep66)
    l53 f_security(syminfo.tickeridres66lowrep66)
    t53 f_security(syminfo.tickeridres66ta.trrep66)

    mpEma53 ta.ema(p53length53)
    trEma53 ta.ema(t53length53)
    stdDev53 ta.stdev(trEma53length53)

    ad53 p53 nz(p53[1]) ? mpEma53 trEma53 p53 nz(p53[1]) ? mpEma53 trEma53 mpEma53
    adm53 
    ta.ema(ad53length53)

    trndDn53 0.0
    trndDn53 
    := ta.crossunder(adm53mpEma53) ? h53[2] : p53 nz(p53[1]) ? p53 stdDev53 factor53 nz(trndDn53[1], h53[2])
    trndUp53 0.0
    trndUp53 
    := ta.crossover(adm53mpEma53) ? l53[2] : p53 nz(p53[1]) ? p53 stdDev53 factor53 nz(trndUp53[1], l53[2])
    trndr53 0.0
    trndr53 
    := adm53 mpEma53 trndDn53 adm53 mpEma53 trndUp53 nz(trndr53[1], 0)

    sig53 p53 trndr53 p53 trndr53 ? -0

    trndrColor53 
    sig53 color.green sig53 color.red color.black

    //plot(trndr53, color=trndrColor53, linewidth=2)
    //plot(mpEma53, color=color.new(color.blue, 0), linewidth=2)
    //plot(adm53, color=color.new(color.black, 0), linewidth=1)
    xyz9=(trndDn53+mpEma53+adm53)/3
    //
    c54 f_security(syminfo.tickeridres66closerep66)
    v54 f_security(syminfo.tickeridres66volumerep66)
    length54 input.int(title='Length'defval=50minval=2)
    mult54 input.float(title='Mult'defval=10.0minval=0.01)

    alpha54 2.0 / (length54 1)
    mom54 c54 nz(c54[1])
    pv54 mom54 v54 0
    nv54 
    mom54 v54 0
    pvMa54 
    ta.ema(pv54length54)
    nvMa54 ta.ema(nv54length54)
    vs54 pvMa54 nvMa54 != math.abs(pvMa54 nvMa54) / (pvMa54 nvMa54) : 0

    rsvaEma54 
    0.0
    rsvaEma54 
    := nz(rsvaEma54[1]) + (alpha54 * (+ (vs54 mult54)) * (c54 nz(rsvaEma54[1])))

    slo54 c54 rsvaEma54
    sig54 
    slo54 slo54 nz(slo54[1]) ? slo54 slo54 nz(slo54[1]) ? -: -0

    rsvaemaColor54 
    sig54 color.green sig54 color.lime sig54 < -color.maroon sig54 color.red color.black

    //plot(rsvaEma54, title='RSEma', color=rsvaemaColor54, linewidth=2)
    //
    length56 input.int(title='Length'defval=20minval=1)

    h56 f_security(syminfo.tickeridres66highrep66)
    l56 f_security(syminfo.tickeridres66lowrep66)
    c56 f_security(syminfo.tickeridres66closerep66)

    hh56 ta.highest(h56length56)
    ll56 ta.lowest(l56length56)
    atr56 ta.atr(length56)
    mult56 math.sqrt(length56)

    dSup56 hh56 atr56 mult56
    dRes56 
    ll56 atr56 mult56
    dMid56 
    = (dSup56 dRes56) / 2

    sig56 
    c56 dMid56 c56 dMid56 ? -0

    dsrColor56 
    sig56 color.green sig56 color.red color.black

    //plot(dSup56, title='Support', color=color.new(color.red, 0), linewidth=2)
    //plot(dMid56, title='Middle', color=dsrColor56, linewidth=1)
    //plot(dRes56, title='Resistance', color=color.new(color.green, 0), linewidth=2)
    xyz10=(rsvaEma54+dSup56+dMid56+dRes56)/4
    //
    length57 input.int(title='Length'defval=10minval=1)

    h57 f_security(syminfo.tickeridres66highrep66)
    l57 f_security(syminfo.tickeridres66lowrep66)
    c57 f_security(syminfo.tickeridres66closerep66)

    highMa57 ta.sma(h57length57)
    lowMa57 ta.sma(l57length57)

    ghla57 0.0
    ghla57 
    := c57 nz(highMa57[1]) ? lowMa57 c57 nz(lowMa57[1]) ? highMa57 nz(ghla57[1])

    sig57 c57 ghla57 c57 ghla57 ? -0

    ghlaColor57 
    sig57 color.green sig57 color.red color.black

    //plot(ghla57, title='GHLA', color=ghlaColor57, linewidth=2)
    //
    inp59 input(title='Source'defval=close)
    h59 f_security(syminfo.tickeridres66highrep66)
    l59 f_security(syminfo.tickeridres66lowrep66)
    c59 f_security(syminfo.tickeridres66inp59rep66)
    length59 input.int(title='Length'defval=14minval=1)

    mHigh59 ta.linreg(h59length590) - ta.linreg(h59length591)
    mLow59 ta.linreg(l59length590) - ta.linreg(l59length591)

    upperBand59 h59lowerBand59 l59
    for 0 to length59 1
        currH59 
    nz(h59[i])
        
    prevH59 nz(h59[1])
        
    currL59 nz(l59[i])
        
    prevL59 nz(l59[1])
        
        
    vHigh59 currH59 + (nz(mHigh59[i]) * i)
        
    vLow59 currL59 + (nz(mLow59[i]) * i)
        
        
    upperBand59 := math.max(vHigh59upperBand59)
        
    lowerBand59 := math.min(vLow59lowerBand59)
    middleBand59 = (upperBand59 59) / 2

    slo59 
    c59 middleBand59
    sig59 
    = (c59 upperBand59 and nz(c59[1]) <= nz(upperBand59[1])) or (c59 lowerBand59 and nz(c59[1]) <= nz(lowerBand59[1]))
          ? 
    : (c59 lowerBand59 and nz(c59[1]) >= nz(lowerBand59[1])) or (c59 upperBand59 and nz(c59[1]) >= nz(upperBand59[1]))
          ? -
    slo59 slo59 nz(slo59[1]) ? slo59 slo59 nz(slo59[1]) ? -: -0

    pbColor59 
    sig59 color.green sig59 color.lime sig59 < -color.maroon sig59 color.red color.black

    //plot(upperBand59, title="UpperBand", linewidth=2, color=pbColor59)

    //plot(lowerBand59, title="LowerBand", linewidth=2, color=pbColor59)
    xyz11=(ghla57+upperBand59+lowerBand59)/3
    //
    length61 input.int(title='Length'defval=25minval=1)
    h61 f_security(syminfo.tickeridres66highrep66)
    l61 f_security(syminfo.tickeridres66lowrep66)
    c61 f_security(syminfo.tickeridres66closerep66)

    hh61 ta.highest(h61length61)
    ll61 ta.lowest(l61length61)
    range_161 hh61 ll61

    sup161 
    ll61 0.25 range_161
    sup261 
    ll61 0.5 range_161
    res161 
    hh61 0.25 range_161
    res261 
    hh61 0.5 range_161
    mid61 
    = (sup161 sup261 res161 res261) / 4

    sig61 
    c61 mid61 c61 mid61 ? -0

    psrColor61 
    sig61 color.green sig61 color.red color.black

    //plot(sup161, title='Support1', color=color.new(color.red, 0), linewidth=2)
    //plot(sup261, title='Support2', color=color.new(color.red, 0), linewidth=2)
    //plot(mid61, title='Middle', color=psrColor61, linewidth=1)
    //plot(res161, title='Resistance1', color=color.new(color.green, 0), linewidth=2)
    //plot(res261, title='Resistance2', color=color.new(color.green, 0), linewidth=2)
    xyz12=(sup161+sup261+mid61+res161+res261)/5
    //Emas

    price request.security(syminfo.tickerid""close)
    EMA_5 ta.ema(price1)
    EMA_13 ta.ema(price10)
    EMA_26 ta.ema(price20)
    EMA_50 ta.ema(price50)
    EMA_100 ta.ema(price100)
    EMA_200 ta.ema(price200)

    sdf=(EMA_5+EMA_13+EMA_26+EMA_50+EMA_100+EMA_200)/6
    plot
    (sdf,"Ortalama EMA",color.yellowlinewidth=1)

    //Function Avarage
    xyz13=(xyz1+xyz2+xyz3+xyz4+xyz5+xyz6+xyz7+xyz8+xyz9+xyz10+xyz11+xyz12)/12
    plot
    (xyz13title='Super Avarage',style=plot.style_linecolor=color.fuchsialinewidth=2)

    //END 
    örnek görüntü...https://www.tradingview.com/x/5z6zMpEL/
    Teknik olarak; yarına gebe olan bugünü yaşamalı ki, yarın, yaşanmış olsun.

  3. 2034 nolu mesajdaki koda....parabol ve çift döngü sar eklenmiş hali...ortalamalar saatlik hesaplatılmıştır...
    denemek isteyene örnek kod....
    PHP Code:
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © carefulCode53358

    //@version=5
    indicator('.'max_bars_back=100overlay=true)
    //Time period
    inp input(title='Source'defval=close)
    res input.timeframe(title='Resolution'defval='15')
    rep input(title='Allow Repainting?'defval=false)
    //
    src1 request.security(syminfo.tickeridresinp[rep barstate.isrealtime 0])[rep barstate.isrealtime 1]
    fastLength1 input.int(title='FastLength'defval=12minval=1)
    slowLength1 input.int(title='SlowLength'defval=26minval=1)
    signalLength1 input.int(title='SignalLength'defval=9minval=1)
    macdLevel1 input.float(title='MacdLevel'defval=0minval=0)

    fastAlpha1 2.0 / (fastLength1)
    slowAlpha1 2.0 / (slowLength1)

    fastEma1 ta.ema(src1fastLength1)
    slowEma1 ta.ema(src1slowLength1)

    pMacdEq1 fastAlpha1 slowAlpha1 != ? ((nz(fastEma1[1]) * fastAlpha1) - (nz(slowEma1[1]) * slowAlpha1)) / (fastAlpha1 slowAlpha1) : 0
    pMacdEqSig1 
    ta.ema(pMacdEq1signalLength1)
    pMacdLevel1 fastAlpha1 slowAlpha1 != ? (macdLevel1 - (nz(fastEma1[1]) * (fastAlpha1)) + (nz(slowEma1[1]) * (slowAlpha1))) / (fastAlpha1 slowAlpha1) : 0

    slo1 
    src1 pMacdEq1
    sig1 
    slo1 slo1 nz(slo1[1]) ? slo1 slo1 nz(slo1[1]) ? -: -0

    rmacdColor 
    sig1 color.lime sig1 color.lime sig1 < -color.red sig1 color.red color.white

    //plot(pMacdEq1, title='Trend Continue',style=plot.style_cross, color=rmacdColor, linewidth=2)
    //plot(pMacdEqSig1, title='MacdEqSignal', color=color.rgb(255, 255, 255, 100), linewidth=1)
    //plot(pMacdLevel1, title='MacdLevel', color=color.blue, linewidth=2)
    xyz1=(pMacdEq1+pMacdEqSig1+pMacdLevel1)/3
    //plot(xyz11, title='Avarage', color=color.rgb(241, 225, 8, 100), linewidth=2)
    //
    src25 request.security(syminfo.tickeridresinp[rep barstate.isrealtime 0])[rep barstate.isrealtime 1]
    fastLimit25 input.float(title='FastLimit'defval=0.2minval=0.01step=0.01)
    slowLimit25 input.float(title='SlowLimit'defval=0.02minval=0.01step=0.01)

    pi25 math.asin(1)
    period25 0.0
    smooth25 
    = (src25 nz(src25[1]) + nz(src25[2]) + nz(src25[3])) / 10
    detrender25 
    = (0.0962 smooth25 0.5769 nz(smooth25[2]) - 0.5769 nz(smooth25[4]) - 0.0962 nz(smooth25[6])) * (0.075 nz(period25[1]) + 0.54)

    q125 = (0.0962 detrender25 0.5769 nz(detrender25[2]) - 0.5769 nz(detrender25[4]) - 0.0962 nz(detrender25[6])) * (0.075 nz(period25[1]) + 0.54)
    i125 nz(detrender25[3])

    jI25 = (0.0962 i125 0.5769 nz(i125[2]) - 0.5769 nz(i125[4]) - 0.0962 nz(i125[6])) * (0.075 nz(period25[1]) + 0.54)
    jQ25 = (0.0962 q125 0.5769 nz(q125[2]) - 0.5769 nz(q125[4]) - 0.0962 nz(q125[6])) * (0.075 nz(period25[1]) + 0.54)

    i225 i125 jQ25
    i225 
    := 0.2 i225 0.8 nz(i225[1])
    q225 q125 jI25
    q225 
    := 0.2 q225 0.8 nz(q225[1])

    re25 i225 nz(i225[1]) + q225 nz(q225[1])
    re25 := 0.2 re25 0.8 nz(re25[1])
    im25 i225 nz(q225[1]) - q225 nz(i225[1])
    im25 := 0.2 im25 0.8 nz(im25[1])

    period25 := im25 != and re25 != pi25 math.atan(im25 re25) : 0
    period25 
    := math.min(math.max(period250.67 nz(period25[1])), 1.5 nz(period25[1]))
    period25 := math.min(math.max(period256), 50)
    period25 := 0.2 period25 0.8 nz(period25[1])

    smoothPeriod25 0.0
    smoothPeriod25 
    := 0.33 period25 0.67 nz(smoothPeriod25[1])

    phase25 i125 != math.atan(q125 i125) * 180 pi25 0
    deltaPhase25 
    nz(phase25[1]) - phase25
    deltaPhase25 
    := deltaPhase25 deltaPhase25

    alpha25 
    fastLimit25 deltaPhase25
    alpha25 
    := alpha25 slowLimit25 slowLimit25 alpha25

    mama25 
    0.0
    mama25 
    := alpha25 src25 + (alpha25) * nz(mama25[1])

    fama25 0.0
    fama25 
    := 0.5 alpha25 mama25 + (0.5 alpha25) * nz(fama25[1])

    sig25 mama25 fama25 mama25 fama25 ? -0

    mamaColor25 
    sig25 color.green sig25 color.red color.black

    //plot(mama25, title='MAMA', color=mamaColor25, linewidth=2)
    //plot(fama25, title='FAMA', color=color.new(color.yellow, 0), linewidth=2)
    xyz2=(mama25+fama25)/2
    //
    length26 input.int(title='Length'defval=15minval=1)
    momLength26 input.int(title='MomentumLength'defval=5minval=1)
    src26 request.security(syminfo.tickeridresinp[rep barstate.isrealtime 0])[rep barstate.isrealtime 1]

    num26 0.0
    coefSum26 
    0.0
    for 0 to length26 1 by 1
        coef26 
    math.abs(nz(src26[i]) - nz(src26[momLength26]))
        
    num26 += coef26 nz(src26[i])
        
    coefSum26 += coef26
        coefSum26

    filt26 
    coefSum26 != num26 coefSum26 0

    sig26 
    src26 filt26 src26 filt26 ? -0

    filtColor26 
    sig26 color.green sig26 color.red color.black

    //plot(filt26, title='Filter', color=filtColor26, linewidth=2)
    //
    src27 request.security(syminfo.tickeridresinp[rep barstate.isrealtime 0])[rep barstate.isrealtime 1]

    wma127 = (src27 nz(src27[1]) + nz(src27[2]) + nz(src27[3]) + nz(src27[4]) + nz(src27[5]) + nz(src27[6])) / 28
    wma227 
    = (wma127 nz(wma127[1]) + nz(wma127[2]) + nz(wma127[3]) + nz(wma127[4]) + nz(wma127[5]) + nz(wma127[6])) / 28

    predict27 
    wma127 wma227
    trigger27 
    = (predict27 nz(predict27[1]) + nz(predict27[2]) + nz(predict27[3])) / 10

    sig27 
    predict27 trigger27 predict27 trigger27 ? -0

    pmaColor27 
    sig27 color.green sig27 color.red color.black

    //plot(predict27, title='Predict', color=pmaColor27, linewidth=2)
    //plot(trigger27, title='Trigger', color=color.new(color.yellow, 0), linewidth=1)
    xyz3=(filt26+predict27+trigger27)/3
    //
    src29 request.security(syminfo.tickeridresinp[rep barstate.isrealtime 0])[rep barstate.isrealtime 1]
    shortLength29 input.int(title='ShortLength'defval=5minval=1)
    longLength29 input.int(title='LongLength'defval=20minval=1)

    shortAvg29 ta.wma(src29shortLength29)
    shortMa29 math.sum(math.pow(src29 shortAvg292), shortLength29) / shortLength29
    shortRms29 
    shortMa29 math.sqrt(shortMa29) : 0

    longAvg29 
    ta.wma(src29longLength29)
    longMa29 math.sum(math.pow(src29 longAvg292), longLength29) / longLength29
    longRms29 
    longMa29 math.sqrt(longMa29) : 0

    kk29 
    longRms29 != 0.2 shortRms29 longRms29 0
    vidya29 
    0.0
    vidya29 
    := kk29 src29 + (kk29) * nz(vidya29[1])

    slo29 src29 vidya29
    sig29 
    slo29 slo29 nz(slo29[1]) ? slo29 slo29 nz(slo29[1]) ? -: -0

    vidyaColor29 
    sig29 color.green sig29 color.lime sig29 < -color.maroon sig29 color.red color.black

    //plot(vidya29, title='Vidya', color=vidyaColor29, linewidth=2)
    //
    src32 request.security(syminfo.tickeridresinp[rep barstate.isrealtime 0])[rep barstate.isrealtime 1]
    length32 input.int(title='Length'defval=3minval=1)

    jsa32 = (src32 src32[length32]) / 2

    sig32 
    src32 jsa32 src32 jsa32 ? -0

    jsaColor32 
    sig32 color.green sig32 color.red color.black

    //plot(jsa32, color=jsaColor32, linewidth=2)
    //
    src33 request.security(syminfo.tickeridresinp[rep barstate.isrealtime 0])[rep barstate.isrealtime 1]
    fastLength33 input.int(title "FastLength"defval 5minval 1)
    slowLength33 input.int(title "SlowLength"defval 50minval 1)

    leavittProjection(src33length33) =>
        
    result33 ta.linreg(src33length33, -1)
        
    fastLp33 leavittProjection(src33fastLength33)
    slowLp33 leavittProjection(src33slowLength33)

    slo33 fastLp33 slowLp33
    sig33 
    slo33 slo33 nz(slo33[1]) ? slo33 slo33 nz(slo33[1]) ? -: -0

    lpColor33 
    sig33 color.lime sig33 color.lime sig33 < -color.red sig33 color.red color.white

    //plot(fastLp33, title = 'FastLp', color = lpColor33, linewidth = 2)
    //plot(slowLp33, title = 'Stop', style=plot.style_cross, color = rmacdColor, linewidth = 2)
    xyz4=(vidya29+jsa32+fastLp33+slowLp33)/4
    //
    src37 request.security(syminfo.tickeridresinp[rep barstate.isrealtime 0])[rep barstate.isrealtime 1]
    fastLength37 input.int(title='FastLength'defval=5minval=1)
    slowLength37 input.int(title='SlowLength'defval=20minval=1)
    mult37 input.int(title='Multiple'defval=1minval=1)

    fastEma37 ta.ema(src37fastLength37)
    slowEma37 ta.ema(src37slowLength37)
    sqAvg37 math.sum(math.pow(slowEma37 fastEma372), fastLength37) / fastLength37
    dev37 
    math.sqrt(sqAvg37) * mult37

    upperBand37 
    slowEma37 dev37
    lowerBand37 
    slowEma37 dev37
    middleBand37 
    fastEma37

    sig37 
    src37 upperBand37 and nz(src37[1]) <= nz(upperBand37[1]) or src37 lowerBand37 and nz(src37[1]) <= nz(lowerBand37[1]) ? src37 lowerBand37 and nz(src37[1]) >= nz(lowerBand37[1]) or src37 upperBand37 and nz(src37[1]) >= nz(upperBand37[1]) ? -src37 middleBand37 src37 middleBand37 ? -0

    mabColor37 
    sig37 color.green sig37 color.red color.black

    //plot(upperBand37, title='MabUp', color=mabColor37, linewidth=2)
    //plot(middleBand37, title='MabMid', color=color.new(color.yellow, 0), linewidth=1)
    //plot(lowerBand37, title='MabLow', color=mabColor37, linewidth=2)
    xyz5=(upperBand37+middleBand37+lowerBand37)/3
    //
    src44 request.security(syminfo.tickeridresinp[rep barstate.isrealtime 0])[rep barstate.isrealtime 1]
    length44 input.int(title='Length'defval=10minval=1)
    middleBandLength44 input.int(title='MiddleBandLength'defval=21minval=1)
    bandsDeviation44 input.float(title='BandsDeviation'defval=2.4minval=0.1)
    lowBandAdjust44 input.float(title='LowBandAdjust'defval=0.9minval=0.1)

    atrPeriod44 length44 1
    atrBuf44 
    ta.atr(atrPeriod44) * bandsDeviation44
    ma44 
    ta.ema(src44length44)

    upperBand44 ma44 ma44 atrBuf44 src44
    middleBand44 
    ta.ema(src44middleBandLength44)
    lowerBand44 ma44ma44 atrBuf44 lowBandAdjust44 src44

    sig44 
    src44 upperBand44 and nz(src44[1]) <= nz(upperBand44[1]) or src44 lowerBand44 and nz(src44[1]) <= nz(lowerBand44[1]) or src44 middleBand44 src44 lowerBand44 and nz(src44[1]) >= nz(lowerBand44[1]) or src44 upperBand44 and nz(src44[1]) >= nz(upperBand44[1]) or src44 middleBand44 ? -0

    svbColor44 
    sig44 color.green sig44 color.red color.black

    //plot(upperBand44, title='SVBUp', color=svbColor44, linewidth=2)
    //plot(middleBand44, title='SVBMid', color=color.new(color.black, 0), linewidth=1)
    //plot(lowerBand44, title='SVBLow', color=svbColor44, linewidth=2)
    xyz6=(upperBand44+middleBand44+lowerBand44)/3
    //
    float inp55 input(title 'Source'defval close)
    string res55 input.timeframe(title 'Resolution'defval '')
    bool rep55 input(title 'Allow Repainting?'defval false)
    //
    float src51 request.security(syminfo.tickerres55inp55[rep55 barstate.isrealtime 0])[rep55 barstate.isrealtime 1]
    int fastLength51 input.int(title 'FastLength'defval 5minval 1)
    int slowLength51 input.int(title 'SlowLength'defval 20minval 1)
    int sampleLength51 input.int(title 'SampleLength'defval 5minval 1)

    hannFilter51(float sampleSrc51int length51) =>
        
    filt51 0.0coef51 0.0
        
    for 1 to length51
            cosine51 
    math.cos(math.pi / (length51 1))
            
    filt51 := filt51 + (cosine51 nz(sampleSrc51[1]))
            
    coef51 := coef51 cosine51
        filt51 
    := coef51 != filt51 coef51 0

    float sample51 
    0.0
    sample51 
    := bar_index sampleLength51 == src51 nz(sample51[1])
    float fastAvg51 hannFilter51(sample51fastLength51)
    float slowAvg51 hannFilter51(sample51slowLength51)

    float slo51 fastAvg51 slowAvg51
    int sig51 
    slo51 slo51 nz(slo51[1]) ? slo51 slo51 nz(slo51[1]) ? -: -0

    color udsmaColor51 
    sig51 color.green sig51 color.lime sig51 < -color.maroon sig51 color.red color.black

    //plot(fastAvg51, title = "FastAverage", color = udsmaColor51, linewidth = 2)
    //plot(slowAvg51, title = "SlowAverage", color = chart.fg_color, linewidth = 1)
    xyz7=(fastAvg51+slowAvg51)/2
    //
    float src52 request.security(syminfo.tickeridres55inp55[rep55 barstate.isrealtime 0])[rep55 barstate.isrealtime 1]
    fastLength52 input.int(title "FastLength"defval 14minval 1)
    slowLength52 input.int(title "SlowLength"defval 30minval 1)

    leavittProjection52(float src52int length52) =>
        
    float result52 ta.linreg(src52length52, -1)
        
    leavittConvolution52(float src52int length52) =>
        
    int sqrtLength52 math.floor(nz(math.sqrt(length52)))
        
    float result52 ta.linreg(leavittProjection52(src52length52), sqrtLength52, -1)
        
    float fastConv52 leavittConvolution52(src52fastLength52)
    float slowConv52 leavittConvolution52(src52slowLength52)

    float slo52 fastConv52 slowConv52
    int sig52 
    slo52 slo52 nz(slo52[1]) ? slo52 slo52 nz(slo52[1]) ? -: -0

    color lcColor52 
    sig52 color.green sig52 color.lime sig52 < -color.maroon sig52 color.red color.white

    //plot(fastConv52, title = 'FastConv', color = lcColor52, linewidth = 2)
    //plot(slowConv52, title = 'SlowConv', color = chart.fg_color, linewidth = 1)
    xyz8=(fastConv52+slowConv52)/2
    //
    f_security(_symbol66_res66_src66_repaint66) =>
        
    request.security(_symbol66_res66_src66[_repaint66 barstate.isrealtime 0])[_repaint66 barstate.isrealtime 1]

    res66 input.timeframe(title='Resolution'defval='')
    rep66 input(title='Allow Repainting?'defval=false)
    //
    length53 input.int(title='Length'defval=20minval=1)
    factor53 input.int(title='Factor'defval=2minval=1)
    p53 f_security(syminfo.tickeridres66hl2rep66)
    h53 f_security(syminfo.tickeridres66highrep66)
    l53 f_security(syminfo.tickeridres66lowrep66)
    t53 f_security(syminfo.tickeridres66ta.trrep66)

    mpEma53 ta.ema(p53length53)
    trEma53 ta.ema(t53length53)
    stdDev53 ta.stdev(trEma53length53)

    ad53 p53 nz(p53[1]) ? mpEma53 trEma53 p53 nz(p53[1]) ? mpEma53 trEma53 mpEma53
    adm53 
    ta.ema(ad53length53)

    trndDn53 0.0
    trndDn53 
    := ta.crossunder(adm53mpEma53) ? h53[2] : p53 nz(p53[1]) ? p53 stdDev53 factor53 nz(trndDn53[1], h53[2])
    trndUp53 0.0
    trndUp53 
    := ta.crossover(adm53mpEma53) ? l53[2] : p53 nz(p53[1]) ? p53 stdDev53 factor53 nz(trndUp53[1], l53[2])
    trndr53 0.0
    trndr53 
    := adm53 mpEma53 trndDn53 adm53 mpEma53 trndUp53 nz(trndr53[1], 0)

    sig53 p53 trndr53 p53 trndr53 ? -0

    trndrColor53 
    sig53 color.green sig53 color.red color.black

    //plot(trndr53, color=trndrColor53, linewidth=2)
    //plot(mpEma53, color=color.new(color.blue, 0), linewidth=2)
    //plot(adm53, color=color.new(color.black, 0), linewidth=1)
    xyz9=(trndDn53+mpEma53+adm53)/3
    //
    c54 f_security(syminfo.tickeridres66closerep66)
    v54 f_security(syminfo.tickeridres66volumerep66)
    length54 input.int(title='Length'defval=50minval=2)
    mult54 input.float(title='Mult'defval=10.0minval=0.01)

    alpha54 2.0 / (length54 1)
    mom54 c54 nz(c54[1])
    pv54 mom54 v54 0
    nv54 
    mom54 v54 0
    pvMa54 
    ta.ema(pv54length54)
    nvMa54 ta.ema(nv54length54)
    vs54 pvMa54 nvMa54 != math.abs(pvMa54 nvMa54) / (pvMa54 nvMa54) : 0

    rsvaEma54 
    0.0
    rsvaEma54 
    := nz(rsvaEma54[1]) + (alpha54 * (+ (vs54 mult54)) * (c54 nz(rsvaEma54[1])))

    slo54 c54 rsvaEma54
    sig54 
    slo54 slo54 nz(slo54[1]) ? slo54 slo54 nz(slo54[1]) ? -: -0

    rsvaemaColor54 
    sig54 color.green sig54 color.lime sig54 < -color.maroon sig54 color.red color.black

    //plot(rsvaEma54, title='RSEma', color=rsvaemaColor54, linewidth=2)
    //
    length56 input.int(title='Length'defval=20minval=1)

    h56 f_security(syminfo.tickeridres66highrep66)
    l56 f_security(syminfo.tickeridres66lowrep66)
    c56 f_security(syminfo.tickeridres66closerep66)

    hh56 ta.highest(h56length56)
    ll56 ta.lowest(l56length56)
    atr56 ta.atr(length56)
    mult56 math.sqrt(length56)

    dSup56 hh56 atr56 mult56
    dRes56 
    ll56 atr56 mult56
    dMid56 
    = (dSup56 dRes56) / 2

    sig56 
    c56 dMid56 c56 dMid56 ? -0

    dsrColor56 
    sig56 color.green sig56 color.red color.black

    //plot(dSup56, title='Support', color=color.new(color.red, 0), linewidth=2)
    //plot(dMid56, title='Middle', color=dsrColor56, linewidth=1)
    //plot(dRes56, title='Resistance', color=color.new(color.green, 0), linewidth=2)
    xyz10=(rsvaEma54+dSup56+dMid56+dRes56)/4
    //
    length57 input.int(title='Length'defval=10minval=1)

    h57 f_security(syminfo.tickeridres66highrep66)
    l57 f_security(syminfo.tickeridres66lowrep66)
    c57 f_security(syminfo.tickeridres66closerep66)

    highMa57 ta.sma(h57length57)
    lowMa57 ta.sma(l57length57)

    ghla57 0.0
    ghla57 
    := c57 nz(highMa57[1]) ? lowMa57 c57 nz(lowMa57[1]) ? highMa57 nz(ghla57[1])

    sig57 c57 ghla57 c57 ghla57 ? -0

    ghlaColor57 
    sig57 color.green sig57 color.red color.black

    //plot(ghla57, title='GHLA', color=ghlaColor57, linewidth=2)
    //
    inp59 input(title='Source'defval=close)
    h59 f_security(syminfo.tickeridres66highrep66)
    l59 f_security(syminfo.tickeridres66lowrep66)
    c59 f_security(syminfo.tickeridres66inp59rep66)
    length59 input.int(title='Length'defval=14minval=1)

    mHigh59 ta.linreg(h59length590) - ta.linreg(h59length591)
    mLow59 ta.linreg(l59length590) - ta.linreg(l59length591)

    upperBand59 h59lowerBand59 l59
    for 0 to length59 1
        currH59 
    nz(h59[i])
        
    prevH59 nz(h59[1])
        
    currL59 nz(l59[i])
        
    prevL59 nz(l59[1])
        
        
    vHigh59 currH59 + (nz(mHigh59[i]) * i)
        
    vLow59 currL59 + (nz(mLow59[i]) * i)
        
        
    upperBand59 := math.max(vHigh59upperBand59)
        
    lowerBand59 := math.min(vLow59lowerBand59)
    middleBand59 = (upperBand59 59) / 2

    slo59 
    c59 middleBand59
    sig59 
    = (c59 upperBand59 and nz(c59[1]) <= nz(upperBand59[1])) or (c59 lowerBand59 and nz(c59[1]) <= nz(lowerBand59[1]))
          ? 
    : (c59 lowerBand59 and nz(c59[1]) >= nz(lowerBand59[1])) or (c59 upperBand59 and nz(c59[1]) >= nz(upperBand59[1]))
          ? -
    slo59 slo59 nz(slo59[1]) ? slo59 slo59 nz(slo59[1]) ? -: -0

    pbColor59 
    sig59 color.green sig59 color.lime sig59 < -color.maroon sig59 color.red color.black

    //plot(upperBand59, title="UpperBand", linewidth=2, color=pbColor59)

    //plot(lowerBand59, title="LowerBand", linewidth=2, color=pbColor59)
    xyz11=(ghla57+upperBand59+lowerBand59)/3
    //
    length61 input.int(title='Length'defval=25minval=1)
    h61 f_security(syminfo.tickeridres66highrep66)
    l61 f_security(syminfo.tickeridres66lowrep66)
    c61 f_security(syminfo.tickeridres66closerep66)

    hh61 ta.highest(h61length61)
    ll61 ta.lowest(l61length61)
    range_161 hh61 ll61

    sup161 
    ll61 0.25 range_161
    sup261 
    ll61 0.5 range_161
    res161 
    hh61 0.25 range_161
    res261 
    hh61 0.5 range_161
    mid61 
    = (sup161 sup261 res161 res261) / 4

    sig61 
    c61 mid61 c61 mid61 ? -0

    psrColor61 
    sig61 color.green sig61 color.red color.black

    //plot(sup161, title='Support1', color=color.new(color.red, 0), linewidth=2)
    //plot(sup261, title='Support2', color=color.new(color.red, 0), linewidth=2)
    //plot(mid61, title='Middle', color=psrColor61, linewidth=1)
    //plot(res161, title='Resistance1', color=color.new(color.green, 0), linewidth=2)
    //plot(res261, title='Resistance2', color=color.new(color.green, 0), linewidth=2)
    xyz12=(sup161+sup261+mid61+res161+res261)/5
    //Function Avarage
    xyz13=(xyz1+xyz2+xyz3+xyz4+xyz5+xyz6+xyz7+xyz8+xyz9+xyz10+xyz11+xyz12)/12
    plot
    (xyz13title='Super Avarage',style=plot.style_steplinecolor=rmacdColorlinewidth=2)


    //Emas
    price request.security(syminfo.tickerid"60"close)
    EMA_5 ta.ema(price5)
    EMA_13 ta.ema(price13)
    EMA_26 ta.ema(price26)
    EMA_50 ta.ema(price50)
    EMA_100 ta.ema(price100)
    EMA_200 ta.ema(price200)

    sdf=(EMA_5+EMA_13+EMA_26+EMA_50+EMA_100+EMA_200)/6
    plot
    (sdf,"Avarage EMA",color.yellowlinewidth=1)
    //END
    //2 Pole Super Smoother Function
    SSF(xt) =>
        
    omega math.atan(1) * t
        a 
    math.exp(-math.sqrt(2) * math.atan(1) * t)
        
    math.cos(math.sqrt(2) / omega)
        
    c2 b
        c3 
    = -math.pow(a2)
        
    c1 c2 c3
        SSF 
    0.0
        SSF 
    := c1 c2 nz(SSF[1], x) + c3 nz(SSF[2], nz(SSF[1], x))
        
    SSF

    //Getter Function For Pseudo 2D Matrix
    get_val(matrowcolrowsize) =>
        array.
    get(matint(rowsize row col))

    //Setter Function For Pseudo 2D Matrix
    set_val(matrowcolrowsizeval) =>
        array.
    set(matint(rowsize row col), val)

    //LU Decomposition Function
    LU(AB) =>
        
    A_size = array.size(A)
        
    B_size = array.size(B)
        var 
    = array.new_float(A_size)
        var 
    = array.new_float(A_size)
        
    L_temp 0.0
        U_temp 
    0.0
        
    for 0 to B_size 1 by 1
            set_val
    (U0cB_sizeget_val(A0cB_size))
        for 
    1 to B_size 1 by 1
            set_val
    (Lr0B_sizeget_val(Ar0B_size) / get_val(U00B_size))
        for 
    0 to B_size 1 by 1
            
    for 0 to B_size 1 by 1
                
    if == c
                    set_val
    (LrcB_size1)
                if 
    c
                    set_val
    (LrcB_size0)
                if 
    c
                    set_val
    (UrcB_size0)
        for 
    0 to B_size 1 by 1
            
    for 0 to B_size 1 by 1
                
    if na(get_val(LrcB_size))
                    
    L_temp := get_val(ArcB_size)
                    for 
    0 to math.max(10by 1
                        L_temp 
    -= get_val(UkcB_size) * get_val(LrkB_size)
                        
    L_temp
                    set_val
    (LrcB_sizeL_temp get_val(UccB_size))
                if 
    na(get_val(UrcB_size))
                    
    U_temp := get_val(ArcB_size)
                    for 
    0 to math.max(10by 1
                        U_temp 
    -= get_val(UkcB_size) * get_val(LrkB_size)
                        
    U_temp
                    set_val
    (UrcB_sizeU_temp)
        [
    LU]

    //Lower Triangular Solution Function (Forward Substitution)
    LT_solve(L_B) =>
        
    B_size = array.size(B)
        var 
    = array.new_float(B_size)
        
    Y_temp 0.0
        
    array.set(Y0, array.get(B0) / get_val(L_00B_size))
        for 
    1 to B_size 1 by 1
            Y_temp 
    := array.get(Br)
            for 
    0 to math.max(10by 1
                Y_temp 
    -= get_val(L_rkB_size) * array.get(Yk)
                
    Y_temp
            
    array.set(YrY_temp get_val(L_rrB_size))
        
    Y

    //Upper Triangular Solution Function (Backward Substitution)
    UT_solve(U_Y_) =>
        
    Y_size = array.size(Y_)
        
    U_rev = array.copy(U_)
        
    Y_rev = array.copy(Y_)
        array.
    reverse(U_rev)
        array.
    reverse(Y_rev)
        
    X_rev LT_solve(U_revY_rev)
        
    = array.copy(X_rev)
        array.
    reverse(X)
        
    X

    //Regression Function
    regression_val(X_index_order_offset_) =>
        
    reg 0.0
        
    for 0 to order_ by 1
            reg 
    += array.get(X_i) * math.pow(index_ offset_i)
            
    reg
        reg

    //Curve Segment Drawing Function
    draw_curve(Ysdevnstep_collslwdrawconf) =>
        var 
    line segment line.new(x1=time[step_], y1=array.get(Yn) + sdevx2=time[(1) * step_], y2=array.get(Y1) + sdevxloc=xloc.bar_time)
        if 
    draw
            
    if conf barstate.isconfirmed 1
                line
    .set_xy1(segmenttime[step_], array.get(Yn) + sdev)
                
    line.set_xy2(segmenttime[(1) * step_], array.get(Y1) + sdev)
                
    line.set_color(segmentcol)
                
    line.set_width(segmentlw)
                
    line.set_style(segmentls == 'Solid' line.style_solid ls == 'Dotted' line.style_dotted line.style_dashed)
        else
            
    line.delete(segment)

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

    //Source Inputs
    src input(defval=closetitle='Input Source Value')
    use_filt input(defval=truetitle='Smooth Data Before Curve Fitting')
    filt_per input.int(defval=10minval=2title='Data Smoothing Period ═══════════════════')

    //Calculation Inputs
    per input.int(defval=20minval=2title='Regression Sample Period')
    order input.int(defval=2minval=1title='Polynomial Order')
    calc_offs input(defval=0title='Regression Offset')
    ndev input.float(defval=2.0minval=0title='Width Coefficient')
    equ_from input.int(defval=0minval=0title='Forecast From _ Bars Ago ═══════════════════')

    //Channel Display Inputs
    show_curve input(defval=truetitle='Show Fitted Curve')
    show_high input(defval=truetitle='Show Fitted Channel High')
    show_low input(defval=truetitle='Show Fitted Channel Low')
    draw_step1 input.int(defval=10minval=1title='Curve Drawing Step Size')
    auto_step input(defval=truetitle='Auto Decide Step Size Instead')
    draw_freq input.string(defval='Close Only'options=['Continuous''Close Only'], title='Curve Update Frequency')
    poly_col_h input(defval=color.yellowtitle='Channel High Line Color')
    poly_lw_h input.int(defval=1minval=1title='Channel High Line Width')
    poly_ls_h input.string(defval='Dashed'options=['Solid''Dotted''Dashed'], title='Channel High Line Style')
    poly_col_m input(defval=color.rgb(25523559100), title='Channel Middle Line Color')
    poly_lw_m input.int(defval=1minval=1title='Channel Middle Line Width')
    poly_ls_m input.string(defval='Dotted'options=['Solid''Dotted''Dashed'], title='Channel Middle Line Style')
    poly_col_l input(defval=color.yellowtitle='Channel Low Line Color')
    poly_lw_l input.int(defval=1minval=1title='Channel Low Line Width')
    poly_ls_l input.string(defval='Dashed'options=['Solid''Dotted''Dashed'], title='Channel Low Line Style ═══════════════════')

    //Smooth data and determine source type for calculation.
    filt SSF(srcfilt_per)
    srcxd use_filt filt src

    //Populate a period sized array with bar values.
    var x_vals = array.new_float(per)
    for 
    0 to per 1 by 1
        
    array.set(x_valsi1)

    //Populate a period sized array with historical source values.
    var src_vals = array.new_float(per)
    for 
    0 to per 1 by 1
        
    array.set(src_valsisrcxd[per equ_from])

    //Populate an order*2 + 1 sized array with bar power sums.
    var xp_sums = array.new_float(order 1)
    xp_sums_temp 0.0
    for 0 to order 2 by 1
        xp_sums_temp 
    := 0
        
    for 0 to per 1 by 1
            xp_sums_temp 
    += math.pow(array.get(x_valsj), i)
            
    xp_sums_temp
        
    array.set(xp_sumsixp_sums_temp)

    //Populate an order + 1 sized array with (bar power)*(source value) sums.
    var xpy_sums = array.new_float(order 1)
    xpy_sums_temp 0.0
    for 0 to order by 1
        xpy_sums_temp 
    := 0
        
    for 0 to per 1 by 1
            xpy_sums_temp 
    += math.pow(array.get(x_valsj), i) * array.get(src_valsj)
            
    xpy_sums_temp
        
    array.set(xpy_sumsixpy_sums_temp)

    //Generate a pseudo square matrix with row and column sizes of order + 1 using bar power sums.
    var xp_matrix = array.new_float(int(math.pow(order 12)))
    for 
    0 to order by 1
        
    for 0 to order by 1
            set_val
    (xp_matrixrcorder 1, array.get(xp_sumsc))

    //Factor the power sum matrix into lower and upper triangular matrices with order + 1 rows and columns.
    [lowerupper] = LU(xp_matrixxpy_sums)

    //Find lower triangular matrix solutions using (bar power)*(source value) sums.
    l_solutions LT_solve(lowerxpy_sums)

    //Find upper triangular matrix solutions using lower matrix solutions. This gives us our regression coefficients.
    reg_coefs UT_solve(upperl_solutions)

    //Define curve drawing step size.
    draw_step auto_step math.ceil(per 10) : draw_step1

    //Calculate curve values.
    var inter_vals = array.new_float(11)
    for 
    0 to 10 by 1
        
    array.set(inter_valsiregression_val(reg_coefsperordercalc_offs equ_from draw_step i))

    //Calculate standard deviation for channel.
    Stdev = array.stdev(src_vals) * ndev
    //Draw interpolated segments.
    draw_curve(inter_vals01draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals02draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals03draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals04draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals05draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals06draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals07draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals08draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals09draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals010draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')

    //Draw channel high segments.
    draw_curve(inter_valsStdev1draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev2draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev3draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev4draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev5draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev6draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev7draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev8draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev9draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev10draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')

    //Draw channel low segments.
    draw_curve(inter_vals, -Stdev1draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev2draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev3draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev4draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev5draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev6draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev7draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev8draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev9draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev10draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    //END

    //Function Sar; slow-avarage-fast
    lenxc input(5)
    lenxc20 input(5)
    lenxc50 input(5)

    z(closelenxc) =>
        
    hxc 0.0
        dxc 
    0.0
        
    for 0 to lenxc 1 by 1
            kxc 
    = (lenxc i) * lenxc
            hxc 
    += kxc
            dxc 
    += close[i] * kxc
            dxc
        dxc 
    hxc

    cxc 
    z(closemath.floor(math.sqrt(lenxc)))
    //

    z20(closelenxc20) =>
        
    hcx20 0.0
        dxc20 
    0.0
        
    for 0 to lenxc20 1 by 1
            kxc20 
    = (lenxc20 i) * lenxc20
            hcx20 
    += kxc20
            dxc20 
    += close[i] * kxc20
            dxc20
        dxc20 
    hcx20

    cxc20 
    z20(closemath.floor(math.sqrt(lenxc20)))
    //
    z50(closelenxc50) =>
        
    hxc50 0.0
        dxc50 
    0.0
        
    for 0 to lenxc50 1 by 1
            kxc50 
    = (lenxc50 i) * lenxc50
            hxc50 
    += kxc50
            dxc50 
    += close[i] * kxc50
            dxc50
        dxc50 
    hxc50

    cxc50 
    z50(closemath.floor(math.sqrt(lenxc50)))
    //
    //
    startsx 0.05
    incrementsx 
    0.75
    maximumsx 
    0.35
    ssx 
    ta.sar(startsxincrementsxmaximumsx)
    s1sx z(ssxlenxc)
    pcsx close s1sx color.rgb(2558282100) : color.rgb(7617579100)
    //plot(s1sx, title="SAR Avarage",style=plot.style_cross, color=pcsx, linewidth=1)

    startsx20 0
    incrementsx20 
    0.01
    maximumsx20 
    1
    ssx20 
    ta.sar(startsx20incrementsx20maximumsx20)
    s1sx20 z20(ssx20lenxc20)
    pcsx20 close s1sx20 color.rgb(255828200) : color.rgb(761757900)
    plot(s1sx20title="Cyclical Slow",style=plot.style_linecolor=pcsx20linewidth=1)

    startsx50 0
    incrementsx50 
    0.1
    maximumsx50 
    1
    ssx50 
    ta.sar(startsx50incrementsx50maximumsx50)
    s1sx50 z50(ssx50lenxc50)
    pcsx50 close s1sx50 color.rgb(255828200) : color.rgb(761757900)
    plot(s1sx50title="Cyclical Fast",style=plot.style_linecolor=pcsx50linewidth=1)
    //END 
    Teknik olarak; yarına gebe olan bugünü yaşamalı ki, yarın, yaşanmış olsun.

  4. aynı değerle hesaplanan....iki psarın....50 uzunluktaki parabol içinde....
    trend görüntüsü örneği....https://www.tradingview.com/x/VxcfWL6c/
    not....parabol işlem yapılan alan olarak düşünülmeli....
    parabolün yönü trend yönü....çizgilerin ucu ise destek-direnç gibi düşünülmelidir...
    periyodu ve sinyallemeyi dilediğiniz gibi yapın....

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

    //@version=5
    indicator("Sar Reverse"overlay true)
    //Psar
    psar(start1inc1maximum1) =>
        
    out1 float(na)
        
    isUpTrend1 bool(na)
        
    maxMin1 float(na)
        
    acc1 float(na)
        
    prev1 float(na)

        if 
    bar_index >= 1
            prev1 
    := out1[1]
            if 
    bar_index == 1
                
    if close close[1]
                    
    isUpTrend1 := true
                    maxMin1 
    := math.max(highhigh[1])
                    
    prev1 := math.min(lowlow[1])
                    
    prev1
                
    else
                    
    isUpTrend1 := false
                    maxMin1 
    := math.min(lowlow[1])
                    
    prev1 := math.max(highhigh[1])
                    
    prev1

                acc1 
    := start1
                acc1
            
    else
                
    isUpTrend1 := isUpTrend1[1]
                
    acc1 := acc1[1]
                
    maxMin1 := maxMin1[1]
                
    maxMin1

            
    if isUpTrend1
                
    if high maxMin1
                    maxMin1 
    := high
                    acc1 
    := math.min(acc1 inc1maximum1)
                    
    acc1
            
    else
                if 
    low maxMin1
                    maxMin1 
    := low
                    acc1 
    := math.min(acc1 inc1maximum1)
                    
    acc1

            
    if na(out1)
                
    out1 := prev1 acc1 * (maxMin1 prev1)
                
    out1

            
    if isUpTrend1
                
    if low <= out1
                    isUpTrend1 
    := false
                    out1 
    := maxMin1
                    maxMin1 
    := low
                    acc1 
    := start1
                    acc1
            
    else
                if 
    high >= out1
                    isUpTrend1 
    := true
                    out1 
    := maxMin1
                    maxMin1 
    := high
                    acc1 
    := start1
                    acc1

            
    if na(out1)
                if 
    isUpTrend1
                    out1 
    := math.min(out1bar_index == low[1] : math.min(low[1], low[2]))
                    
    out1
                
    else
                    
    out1 := math.max(out1bar_index == high[1] : math.max(high[1], high[2]))
                    
    out1

        
    [out1acc1maxMin1isUpTrend1]


    start1 input(0)
    increment1 input(0.1)
    maximum1 input(1)
    [
    p1AF1EP1isUpTrend1] = psar(start1increment1maximum1)

    newEP1 EP1 != EP1[1]
    epNew1 newEP1 EP1 na

    //plot(p1, 'TREND-Continue', style=plot.style_line, color=isUpTrend1 ? color.rgb(76, 175, 79, 00) : color.rgb(255, 82, 82, 00), linewidth=2)
    plot(EP1'HızlıTREND'style=plot.style_linecolor=isUpTrend1 color.rgb(761757900) : color.rgb(255828200), linewidth=2)
    //Psar Reverse
    x10ta.sar(00.11)
    plot(x10title='YavaşTREND'style=plot.style_linecolor=isUpTrend1 color.rgb(761757900) : color.rgb(255828200),  linewidth=2)

    //End
    //2 Pole Super Smoother Function
    SSF(xt) =>
        
    omega math.atan(1) * t
        a 
    math.exp(-math.sqrt(2) * math.atan(1) * t)
        
    math.cos(math.sqrt(2) / omega)
        
    c2 b
        c3 
    = -math.pow(a2)
        
    c1 c2 c3
        SSF 
    0.0
        SSF 
    := c1 c2 nz(SSF[1], x) + c3 nz(SSF[2], nz(SSF[1], x))
        
    SSF

    //Getter Function For Pseudo 2D Matrix
    get_val(matrowcolrowsize) =>
        array.
    get(matint(rowsize row col))

    //Setter Function For Pseudo 2D Matrix
    set_val(matrowcolrowsizeval) =>
        array.
    set(matint(rowsize row col), val)

    //LU Decomposition Function
    LU(AB) =>
        
    A_size = array.size(A)
        
    B_size = array.size(B)
        var 
    = array.new_float(A_size)
        var 
    = array.new_float(A_size)
        
    L_temp 0.0
        U_temp 
    0.0
        
    for 0 to B_size 1 by 1
            set_val
    (U0cB_sizeget_val(A0cB_size))
        for 
    1 to B_size 1 by 1
            set_val
    (Lr0B_sizeget_val(Ar0B_size) / get_val(U00B_size))
        for 
    0 to B_size 1 by 1
            
    for 0 to B_size 1 by 1
                
    if == c
                    set_val
    (LrcB_size1)
                if 
    c
                    set_val
    (LrcB_size0)
                if 
    c
                    set_val
    (UrcB_size0)
        for 
    0 to B_size 1 by 1
            
    for 0 to B_size 1 by 1
                
    if na(get_val(LrcB_size))
                    
    L_temp := get_val(ArcB_size)
                    for 
    0 to math.max(10by 1
                        L_temp 
    -= get_val(UkcB_size) * get_val(LrkB_size)
                        
    L_temp
                    set_val
    (LrcB_sizeL_temp get_val(UccB_size))
                if 
    na(get_val(UrcB_size))
                    
    U_temp := get_val(ArcB_size)
                    for 
    0 to math.max(10by 1
                        U_temp 
    -= get_val(UkcB_size) * get_val(LrkB_size)
                        
    U_temp
                    set_val
    (UrcB_sizeU_temp)
        [
    LU]

    //Lower Triangular Solution Function (Forward Substitution)
    LT_solve(L_B) =>
        
    B_size = array.size(B)
        var 
    = array.new_float(B_size)
        
    Y_temp 0.0
        
    array.set(Y0, array.get(B0) / get_val(L_00B_size))
        for 
    1 to B_size 1 by 1
            Y_temp 
    := array.get(Br)
            for 
    0 to math.max(10by 1
                Y_temp 
    -= get_val(L_rkB_size) * array.get(Yk)
                
    Y_temp
            
    array.set(YrY_temp get_val(L_rrB_size))
        
    Y

    //Upper Triangular Solution Function (Backward Substitution)
    UT_solve(U_Y_) =>
        
    Y_size = array.size(Y_)
        
    U_rev = array.copy(U_)
        
    Y_rev = array.copy(Y_)
        array.
    reverse(U_rev)
        array.
    reverse(Y_rev)
        
    X_rev LT_solve(U_revY_rev)
        
    = array.copy(X_rev)
        array.
    reverse(X)
        
    X

    //Regression Function
    regression_val(X_index_order_offset_) =>
        
    reg 0.0
        
    for 0 to order_ by 1
            reg 
    += array.get(X_i) * math.pow(index_ offset_i)
            
    reg
        reg

    //Curve Segment Drawing Function
    draw_curve(Ysdevnstep_collslwdrawconf) =>
        var 
    line segment line.new(x1=time[step_], y1=array.get(Yn) + sdevx2=time[(1) * step_], y2=array.get(Y1) + sdevxloc=xloc.bar_time)
        if 
    draw
            
    if conf barstate.isconfirmed 1
                line
    .set_xy1(segmenttime[step_], array.get(Yn) + sdev)
                
    line.set_xy2(segmenttime[(1) * step_], array.get(Y1) + sdev)
                
    line.set_color(segmentcol)
                
    line.set_width(segmentlw)
                
    line.set_style(segmentls == 'Solid' line.style_solid ls == 'Dotted' line.style_dotted line.style_dashed)
        else
            
    line.delete(segment)

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

    //Source Inputs
    src input(defval=closetitle='Input Source Value')
    use_filt input(defval=truetitle='Smooth Data Before Curve Fitting')
    filt_per input.int(defval=10minval=2title='Data Smoothing Period ═══════════════════')

    //Calculation Inputs
    per input.int(defval=50minval=2title='Regression Sample Period')
    order input.int(defval=2minval=1title='Polynomial Order')
    calc_offs input(defval=0title='Regression Offset')
    ndev input.float(defval=2.0minval=0title='Width Coefficient')
    equ_from input.int(defval=0minval=0title='Forecast From _ Bars Ago ═══════════════════')

    //Channel Display Inputs
    show_curve input(defval=truetitle='Show Fitted Curve')
    show_high input(defval=truetitle='Show Fitted Channel High')
    show_low input(defval=truetitle='Show Fitted Channel Low')
    draw_step1 input.int(defval=10minval=1title='Curve Drawing Step Size')
    auto_step input(defval=truetitle='Auto Decide Step Size Instead')
    draw_freq input.string(defval='Close Only'options=['Continuous''Close Only'], title='Curve Update Frequency')
    poly_col_h input(defval=color.yellowtitle='Channel High Line Color')
    poly_lw_h input.int(defval=1minval=1title='Channel High Line Width')
    poly_ls_h input.string(defval='Dashed'options=['Solid''Dotted''Dashed'], title='Channel High Line Style')
    poly_col_m input(defval=color.rgb(25523559100), title='Channel Middle Line Color')
    poly_lw_m input.int(defval=1minval=1title='Channel Middle Line Width')
    poly_ls_m input.string(defval='Dotted'options=['Solid''Dotted''Dashed'], title='Channel Middle Line Style')
    poly_col_l input(defval=color.yellowtitle='Channel Low Line Color')
    poly_lw_l input.int(defval=1minval=1title='Channel Low Line Width')
    poly_ls_l input.string(defval='Dashed'options=['Solid''Dotted''Dashed'], title='Channel Low Line Style ═══════════════════')

    //Smooth data and determine source type for calculation.
    filt SSF(srcfilt_per)
    src1 use_filt filt src

    //Populate a period sized array with bar values.
    var x_vals = array.new_float(per)
    for 
    0 to per 1 by 1
        
    array.set(x_valsi1)

    //Populate a period sized array with historical source values.
    var src_vals = array.new_float(per)
    for 
    0 to per 1 by 1
        
    array.set(src_valsisrc1[per equ_from])

    //Populate an order*2 + 1 sized array with bar power sums.
    var xp_sums = array.new_float(order 1)
    xp_sums_temp 0.0
    for 0 to order 2 by 1
        xp_sums_temp 
    := 0
        
    for 0 to per 1 by 1
            xp_sums_temp 
    += math.pow(array.get(x_valsj), i)
            
    xp_sums_temp
        
    array.set(xp_sumsixp_sums_temp)

    //Populate an order + 1 sized array with (bar power)*(source value) sums.
    var xpy_sums = array.new_float(order 1)
    xpy_sums_temp 0.0
    for 0 to order by 1
        xpy_sums_temp 
    := 0
        
    for 0 to per 1 by 1
            xpy_sums_temp 
    += math.pow(array.get(x_valsj), i) * array.get(src_valsj)
            
    xpy_sums_temp
        
    array.set(xpy_sumsixpy_sums_temp)

    //Generate a pseudo square matrix with row and column sizes of order + 1 using bar power sums.
    var xp_matrix = array.new_float(int(math.pow(order 12)))
    for 
    0 to order by 1
        
    for 0 to order by 1
            set_val
    (xp_matrixrcorder 1, array.get(xp_sumsc))

    //Factor the power sum matrix into lower and upper triangular matrices with order + 1 rows and columns.
    [lowerupper] = LU(xp_matrixxpy_sums)

    //Find lower triangular matrix solutions using (bar power)*(source value) sums.
    l_solutions LT_solve(lowerxpy_sums)

    //Find upper triangular matrix solutions using lower matrix solutions. This gives us our regression coefficients.
    reg_coefs UT_solve(upperl_solutions)

    //Define curve drawing step size.
    draw_step auto_step math.ceil(per 10) : draw_step1

    //Calculate curve values.
    var inter_vals = array.new_float(11)
    for 
    0 to 10 by 1
        
    array.set(inter_valsiregression_val(reg_coefsperordercalc_offs equ_from draw_step i))

    //Calculate standard deviation for channel.
    Stdev = array.stdev(src_vals) * ndev
    //Draw interpolated segments.
    draw_curve(inter_vals01draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals02draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals03draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals04draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals05draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals06draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals07draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals08draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals09draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals010draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')

    //Draw channel high segments.
    draw_curve(inter_valsStdev1draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev2draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev3draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev4draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev5draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev6draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev7draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev8draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev9draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev10draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')

    //Draw channel low segments.
    draw_curve(inter_vals, -Stdev1draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev2draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev3draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev4draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev5draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev6draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev7draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev8draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev9draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev10draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    //END 
    Teknik olarak; yarına gebe olan bugünü yaşamalı ki, yarın, yaşanmış olsun.

  5. bu kodla...strateji testi yapıp...kendinize en uygun...psar değerini bulabilirsiniz....

    ben içine bir değer yerleştirdim.....ortalama yüzde 27 ile sonuç verdi....
    PHP Code:
    //@version=5
    strategy("*"overlay=true)
    start input(0.05)
    increment input(0.075)
    maximum input(0.35)
    var 
    bool uptrend na
    var float EP na
    var float SAR na
    var float AF start
    var float nextBarSAR na
    if bar_index 0
        firstTrendBar 
    false
        SAR 
    := nextBarSAR
        
    if bar_index == 1
            float prevSAR 
    na
            float prevEP 
    na
            lowPrev 
    low[1]
            
    highPrev high[1]
            
    closeCur close
            closePrev 
    close[1]
            if 
    closeCur closePrev
                uptrend 
    := true
                EP 
    := high
                prevSAR 
    := lowPrev
                prevEP 
    := high
            
    else
                
    uptrend := false
                EP 
    := low
                prevSAR 
    := highPrev
                prevEP 
    := low
            firstTrendBar 
    := true
            SAR 
    := prevSAR start * (prevEP prevSAR)
        if 
    uptrend
            
    if SAR low
                firstTrendBar 
    := true
                uptrend 
    := false
                SAR 
    := math.max(EPhigh)
                
    EP := low
                AF 
    := start
        
    else
            if 
    SAR high
                firstTrendBar 
    := true
                uptrend 
    := true
                SAR 
    := math.min(EPlow)
                
    EP := high
                AF 
    := start
        
    if not firstTrendBar
            
    if uptrend
                
    if high EP
                    EP 
    := high
                    AF 
    := math.min(AF incrementmaximum)
            else
                if 
    low EP
                    EP 
    := low
                    AF 
    := math.min(AF incrementmaximum)
        if 
    uptrend
            SAR 
    := math.min(SARlow[1])
            if 
    bar_index 1
                SAR 
    := math.min(SARlow[2])
        else
            
    SAR := math.max(SARhigh[1])
            if 
    bar_index 1
                SAR 
    := math.max(SARhigh[2])
        
    nextBarSAR := SAR AF * (EP SAR)
        if 
    barstate.isconfirmed
            
    if uptrend
                strategy
    .entry("ParSE"strategy.shortstop=nextBarSARcomment="Sat")
                
    strategy.cancel("ParLE")
            else
                
    strategy.entry("ParLE"strategy.longstop=nextBarSARcomment="Al")
                
    strategy.cancel("ParSE")
    plot(SARstyle=plot.style_linelinewidth=1color=color.orange)
    plot(nextBarSARstyle=plot.style_linelinewidth=1color=color.aqua)
    //plot(strategy.equity, title="equity", color=color.red, linewidth=2, style=plot.style_areabr) 
    Teknik olarak; yarına gebe olan bugünü yaşamalı ki, yarın, yaşanmış olsun.

  6. 50lik parabol içine 50lik regrasyon birleştirerek....
    bar renklendirme....mavi barlar...trend kararsızlığı....https://www.tradingview.com/x/dbWgpgbJ/
    işlem alanı parabol içi....parabol kullanım aynı...yukarda anlattığım gibi düşünülür...

    denemek isteyene kodu....
    PHP Code:
     // © OmegaTools

    //@version=5
    indicator("Linear Regression"overlay true)
    import TradingView/ta/5

    lnt 
    input(50"Lenght")
    lnt2 lnt 2
    off 
    input(1"Offset")

    reg ta.linreg(closelnt0)
    reg2 ta.linreg(closelnt20)
    regavg math.avg(regreg2)

    barc reg reg[1] and reg2 reg2[1] ? #79f504 : reg < reg[1] and reg2 < reg2[1] ? #e91e63 : color.rgb(11, 7, 236)

    barcolor(barc0truetitle "Bar Color")
    plot(regavg"Regression line"color.white1plot.style_lineoffset off)
    //End
    //2 Pole Super Smoother Function
    SSF(xt) =>
        
    omega math.atan(1) * t
        a 
    math.exp(-math.sqrt(2) * math.atan(1) * t)
        
    math.cos(math.sqrt(2) / omega)
        
    c2 b
        c3 
    = -math.pow(a2)
        
    c1 c2 c3
        SSF 
    0.0
        SSF 
    := c1 c2 nz(SSF[1], x) + c3 nz(SSF[2], nz(SSF[1], x))
        
    SSF

    //Getter Function For Pseudo 2D Matrix
    get_val(matrowcolrowsize) =>
        array.
    get(matint(rowsize row col))

    //Setter Function For Pseudo 2D Matrix
    set_val(matrowcolrowsizeval) =>
        array.
    set(matint(rowsize row col), val)

    //LU Decomposition Function
    LU(AB) =>
        
    A_size = array.size(A)
        
    B_size = array.size(B)
        var 
    = array.new_float(A_size)
        var 
    = array.new_float(A_size)
        
    L_temp 0.0
        U_temp 
    0.0
        
    for 0 to B_size 1 by 1
            set_val
    (U0cB_sizeget_val(A0cB_size))
        for 
    1 to B_size 1 by 1
            set_val
    (Lr0B_sizeget_val(Ar0B_size) / get_val(U00B_size))
        for 
    0 to B_size 1 by 1
            
    for 0 to B_size 1 by 1
                
    if == c
                    set_val
    (LrcB_size1)
                if 
    c
                    set_val
    (LrcB_size0)
                if 
    c
                    set_val
    (UrcB_size0)
        for 
    0 to B_size 1 by 1
            
    for 0 to B_size 1 by 1
                
    if na(get_val(LrcB_size))
                    
    L_temp := get_val(ArcB_size)
                    for 
    0 to math.max(10by 1
                        L_temp 
    -= get_val(UkcB_size) * get_val(LrkB_size)
                        
    L_temp
                    set_val
    (LrcB_sizeL_temp get_val(UccB_size))
                if 
    na(get_val(UrcB_size))
                    
    U_temp := get_val(ArcB_size)
                    for 
    0 to math.max(10by 1
                        U_temp 
    -= get_val(UkcB_size) * get_val(LrkB_size)
                        
    U_temp
                    set_val
    (UrcB_sizeU_temp)
        [
    LU]

    //Lower Triangular Solution Function (Forward Substitution)
    LT_solve(L_B) =>
        
    B_size = array.size(B)
        var 
    = array.new_float(B_size)
        
    Y_temp 0.0
        
    array.set(Y0, array.get(B0) / get_val(L_00B_size))
        for 
    1 to B_size 1 by 1
            Y_temp 
    := array.get(Br)
            for 
    0 to math.max(10by 1
                Y_temp 
    -= get_val(L_rkB_size) * array.get(Yk)
                
    Y_temp
            
    array.set(YrY_temp get_val(L_rrB_size))
        
    Y

    //Upper Triangular Solution Function (Backward Substitution)
    UT_solve(U_Y_) =>
        
    Y_size = array.size(Y_)
        
    U_rev = array.copy(U_)
        
    Y_rev = array.copy(Y_)
        array.
    reverse(U_rev)
        array.
    reverse(Y_rev)
        
    X_rev LT_solve(U_revY_rev)
        
    = array.copy(X_rev)
        array.
    reverse(X)
        
    X

    //Regression Function
    regression_val(X_index_order_offset_) =>
        
    reg 0.0
        
    for 0 to order_ by 1
            reg 
    += array.get(X_i) * math.pow(index_ offset_i)
            
    reg
        reg

    //Curve Segment Drawing Function
    draw_curve(Ysdevnstep_collslwdrawconf) =>
        var 
    line segment line.new(x1=time[step_], y1=array.get(Yn) + sdevx2=time[(1) * step_], y2=array.get(Y1) + sdevxloc=xloc.bar_time)
        if 
    draw
            
    if conf barstate.isconfirmed 1
                line
    .set_xy1(segmenttime[step_], array.get(Yn) + sdev)
                
    line.set_xy2(segmenttime[(1) * step_], array.get(Y1) + sdev)
                
    line.set_color(segmentcol)
                
    line.set_width(segmentlw)
                
    line.set_style(segmentls == 'Solid' line.style_solid ls == 'Dotted' line.style_dotted line.style_dashed)
        else
            
    line.delete(segment)

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

    //Source Inputs
    src input(defval=closetitle='Input Source Value')
    use_filt input(defval=truetitle='Smooth Data Before Curve Fitting')
    filt_per input.int(defval=10minval=2title='Data Smoothing Period ═══════════════════')

    //Calculation Inputs
    per input.int(defval=50minval=2title='Regression Sample Period')
    order input.int(defval=2minval=1title='Polynomial Order')
    calc_offs input(defval=0title='Regression Offset')
    ndev input.float(defval=2.0minval=0title='Width Coefficient')
    equ_from input.int(defval=0minval=0title='Forecast From _ Bars Ago ═══════════════════')

    //Channel Display Inputs
    show_curve input(defval=truetitle='Show Fitted Curve')
    show_high input(defval=truetitle='Show Fitted Channel High')
    show_low input(defval=truetitle='Show Fitted Channel Low')
    draw_step1 input.int(defval=10minval=1title='Curve Drawing Step Size')
    auto_step input(defval=truetitle='Auto Decide Step Size Instead')
    draw_freq input.string(defval='Close Only'options=['Continuous''Close Only'], title='Curve Update Frequency')
    poly_col_h input(defval=color.yellowtitle='Channel High Line Color')
    poly_lw_h input.int(defval=1minval=1title='Channel High Line Width')
    poly_ls_h input.string(defval='Dashed'options=['Solid''Dotted''Dashed'], title='Channel High Line Style')
    poly_col_m input(defval=color.rgb(25523559100), title='Channel Middle Line Color')
    poly_lw_m input.int(defval=1minval=1title='Channel Middle Line Width')
    poly_ls_m input.string(defval='Dotted'options=['Solid''Dotted''Dashed'], title='Channel Middle Line Style')
    poly_col_l input(defval=color.yellowtitle='Channel Low Line Color')
    poly_lw_l input.int(defval=1minval=1title='Channel Low Line Width')
    poly_ls_l input.string(defval='Dashed'options=['Solid''Dotted''Dashed'], title='Channel Low Line Style ═══════════════════')

    //Smooth data and determine source type for calculation.
    filt SSF(srcfilt_per)
    src1 use_filt filt src

    //Populate a period sized array with bar values.
    var x_vals = array.new_float(per)
    for 
    0 to per 1 by 1
        
    array.set(x_valsi1)

    //Populate a period sized array with historical source values.
    var src_vals = array.new_float(per)
    for 
    0 to per 1 by 1
        
    array.set(src_valsisrc1[per equ_from])

    //Populate an order*2 + 1 sized array with bar power sums.
    var xp_sums = array.new_float(order 1)
    xp_sums_temp 0.0
    for 0 to order 2 by 1
        xp_sums_temp 
    := 0
        
    for 0 to per 1 by 1
            xp_sums_temp 
    += math.pow(array.get(x_valsj), i)
            
    xp_sums_temp
        
    array.set(xp_sumsixp_sums_temp)

    //Populate an order + 1 sized array with (bar power)*(source value) sums.
    var xpy_sums = array.new_float(order 1)
    xpy_sums_temp 0.0
    for 0 to order by 1
        xpy_sums_temp 
    := 0
        
    for 0 to per 1 by 1
            xpy_sums_temp 
    += math.pow(array.get(x_valsj), i) * array.get(src_valsj)
            
    xpy_sums_temp
        
    array.set(xpy_sumsixpy_sums_temp)

    //Generate a pseudo square matrix with row and column sizes of order + 1 using bar power sums.
    var xp_matrix = array.new_float(int(math.pow(order 12)))
    for 
    0 to order by 1
        
    for 0 to order by 1
            set_val
    (xp_matrixrcorder 1, array.get(xp_sumsc))

    //Factor the power sum matrix into lower and upper triangular matrices with order + 1 rows and columns.
    [lowerupper] = LU(xp_matrixxpy_sums)

    //Find lower triangular matrix solutions using (bar power)*(source value) sums.
    l_solutions LT_solve(lowerxpy_sums)

    //Find upper triangular matrix solutions using lower matrix solutions. This gives us our regression coefficients.
    reg_coefs UT_solve(upperl_solutions)

    //Define curve drawing step size.
    draw_step auto_step math.ceil(per 10) : draw_step1

    //Calculate curve values.
    var inter_vals = array.new_float(11)
    for 
    0 to 10 by 1
        
    array.set(inter_valsiregression_val(reg_coefsperordercalc_offs equ_from draw_step i))

    //Calculate standard deviation for channel.
    Stdev = array.stdev(src_vals) * ndev
    //Draw interpolated segments.
    draw_curve(inter_vals01draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals02draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals03draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals04draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals05draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals06draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals07draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals08draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals09draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')
    draw_curve(inter_vals010draw_steppoly_col_mpoly_ls_mpoly_lw_mshow_curvedraw_freq == 'Close Only')

    //Draw channel high segments.
    draw_curve(inter_valsStdev1draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev2draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev3draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev4draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev5draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev6draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev7draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev8draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev9draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')
    draw_curve(inter_valsStdev10draw_steppoly_col_hpoly_ls_hpoly_lw_hshow_highdraw_freq == 'Close Only')

    //Draw channel low segments.
    draw_curve(inter_vals, -Stdev1draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev2draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev3draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev4draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev5draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev6draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev7draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev8draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev9draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    draw_curve(inter_vals, -Stdev10draw_steppoly_col_lpoly_ls_lpoly_lw_lshow_lowdraw_freq == 'Close Only')
    //END 
    Teknik olarak; yarına gebe olan bugünü yaşamalı ki, yarın, yaşanmış olsun.

  7.  Alıntı Originally Posted by @yörük@ Yazıyı Oku
    bu kodla...strateji testi yapıp...kendinize en uygun...psar değerini bulabilirsiniz....

    ben içine bir değer yerleştirdim.....ortalama yüzde 27 ile sonuç verdi....
    PHP Code:
    //@version=5
    strategy("*"overlay=true)
    start input(0.05)
    increment input(0.075)
    maximum input(0.35)
    var 
    bool uptrend na
    var float EP na
    var float SAR na
    var float AF start
    var float nextBarSAR na
    if bar_index 0
        firstTrendBar 
    false
        SAR 
    := nextBarSAR
        
    if bar_index == 1
            float prevSAR 
    na
            float prevEP 
    na
            lowPrev 
    low[1]
            
    highPrev high[1]
            
    closeCur close
            closePrev 
    close[1]
            if 
    closeCur closePrev
                uptrend 
    := true
                EP 
    := high
                prevSAR 
    := lowPrev
                prevEP 
    := high
            
    else
                
    uptrend := false
                EP 
    := low
                prevSAR 
    := highPrev
                prevEP 
    := low
            firstTrendBar 
    := true
            SAR 
    := prevSAR start * (prevEP prevSAR)
        if 
    uptrend
            
    if SAR low
                firstTrendBar 
    := true
                uptrend 
    := false
                SAR 
    := math.max(EPhigh)
                
    EP := low
                AF 
    := start
        
    else
            if 
    SAR high
                firstTrendBar 
    := true
                uptrend 
    := true
                SAR 
    := math.min(EPlow)
                
    EP := high
                AF 
    := start
        
    if not firstTrendBar
            
    if uptrend
                
    if high EP
                    EP 
    := high
                    AF 
    := math.min(AF incrementmaximum)
            else
                if 
    low EP
                    EP 
    := low
                    AF 
    := math.min(AF incrementmaximum)
        if 
    uptrend
            SAR 
    := math.min(SARlow[1])
            if 
    bar_index 1
                SAR 
    := math.min(SARlow[2])
        else
            
    SAR := math.max(SARhigh[1])
            if 
    bar_index 1
                SAR 
    := math.max(SARhigh[2])
        
    nextBarSAR := SAR AF * (EP SAR)
        if 
    barstate.isconfirmed
            
    if uptrend
                strategy
    .entry("ParSE"strategy.shortstop=nextBarSARcomment="Sat")
                
    strategy.cancel("ParLE")
            else
                
    strategy.entry("ParLE"strategy.longstop=nextBarSARcomment="Al")
                
    strategy.cancel("ParSE")
    plot(SARstyle=plot.style_linelinewidth=1color=color.orange)
    plot(nextBarSARstyle=plot.style_linelinewidth=1color=color.aqua)
    //plot(strategy.equity, title="equity", color=color.red, linewidth=2, style=plot.style_areabr) 
    bunu yaptığınızda...
    farklı periyotlar için farklı değerlerin....
    ve bunları birbiriyle ilişkilendirdiğinizde...
    farklı döngüler elde edebilirsiniz.....

    örnek...farklı 12 psar değerini hesaplatıp...ortalamasını çekerseniz.....
    https://www.tradingview.com/x/7pcyt7yn/ görüntü bu...
    denemek isteyene 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/
    // © carefulCode53358
    //@version=5
    indicator("*"overlay true)

    //Sar Functıons
    x1ta.sar(0.010.010.1)
    x2 ta.sar(0.010.020.1)
    x3ta.sar(0.010.030.1)
    x4ta.sar(0.010.020.2)
    x5ta.sar(0.010.040.2)
    x6ta.sar(0.020.020.2)
    x7ta.sar(00.11)
    x8ta.sar(00.011)
    x9ta.sar(00.010.2)
    x10ta.sar(0.100.2)
    x11ta.sar(0.10.10.1)
    x12ta.sar(0.050.0750.35)

    reverseavg=(x1+x2+x3+x4+x5+x6+x7+x8+x9+x10+x11+x12)/12
    plot
    (reverseavg,   title='Sar Ortalamaları'style=plot.style_steplinelinewidth=2
    Teknik olarak; yarına gebe olan bugünü yaşamalı ki, yarın, yaşanmış olsun.

  8. bir noktadan sonsuz doğru geçirme...
    ve ya
    bir noktaya eşit uzaklıklar....
    matematik sembolü daire....

    daire....döngü denilirse....

    döngülerin hakikatı...aslına rucudur....

    şimdi...
    herhangi bir değeri...tüm periyotlara ilişkilendirip....
    ortalama alma örneği.....

    örnekte psar kullanıldı.... renklendirme 15lik periyotla ilişkilendirirldi......
    https://www.tradingview.com/x/dcaAeX5M/
    denemek isteyene örnek kod.....

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

    indicator('*'overlay=true)
    //resolution
    x1 input.timeframe('1'title='Resolution')
    x3 input.timeframe('3'title='Resolution')
    x5 input.timeframe('5'title='Resolution')
    x15 input.timeframe('15'title='Resolution')
    x30 input.timeframe('30'title='Resolution')
    x45 input.timeframe('45'title='Resolution')
    x60 input.timeframe('60'title='Resolution')
    x120 input.timeframe('120'title='Resolution')
    x180 input.timeframe('180'title='Resolution')
    x240 input.timeframe('240'title='Resolution')
    x720 input.timeframe('D'title='Resolution')
    //output functions
    ta.sar(0.050.0750.35)
    // Security
    y1 request.security(syminfo.tickeridx1z)
    y3 request.security(syminfo.tickeridx3z)
    y5 request.security(syminfo.tickeridx5z)
    y15 request.security(syminfo.tickeridx15z)
    y30 request.security(syminfo.tickeridx30z)
    y45 request.security(syminfo.tickeridx45z)
    y60 request.security(syminfo.tickeridx60z)
    y120 request.security(syminfo.tickeridx120z)
    y180 request.security(syminfo.tickeridx180z)
    y240 request.security(syminfo.tickeridx240z)
    y720 request.security(syminfo.tickeridx720z)
    //Plots
    xz input(truetitle='Adaptive Coloring')
    //plot(y1, title="1", style=circles, color=xz?(y1>close?red:lime) : silver, transp=100, linewidth=1)
    //plot(y3, title="3", style=circles, color=xz?(y3>close?red:lime) : silver, transp=100, linewidth=1)
    //plot(y5, title="5", style=circles, color=xz?(y5>close?red:lime) : silver, transp=100, linewidth=1)
    //plot(y15, title="15", style=circles, color=xz?(y15>close?red:lime) : silver, transp=100, linewidth=1)
    //plot(y30, title="30", style=circles, color=xz?(y30>close?red:lime) : silver, transp=100, linewidth=1)
    //plot(y45, title="45", style=circles, color=xz?(y45>close?red:lime) : silver, transp=100, linewidth=1)
    //plot(y60, title="60", style=circles, color=xz?(y60>close?red:lime) : silver, transp=100, linewidth=1)
    //plot(y120, title="120", style=circles, color=xz?(y120>close?red:lime) : silver, transp=100, linewidth=1)
    //plot(y180, title="180", style=circles, color=xz?(y180>close?red:lime) : silver, transp=100, linewidth=1)
    //plot(y240, title="240", style=circles, color=xz?(y240>close?red:lime) : silver, transp=100, linewidth=1)
    //plot(y720, title="720", style=circles, color=xz?(y720>close?red:lime) : silver, transp=100, linewidth=1)


    xyzq = (y1 y3 y5 y15 y30 y45 y60 y120 y180 y240 y720  ) / 11


    plot
    (xyzqtitle='tüm periyotlar ortalaması'style=plot.style_linebrcolor=xz y15 close color.red color.lime color.silverlinewidth=2
    Teknik olarak; yarına gebe olan bugünü yaşamalı ki, yarın, yaşanmış olsun.

Sayfa 255/272 İlkİlk ... 155205245253254255256257265 ... 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
  •