Sayfa 291/291 İlkİlk ... 191241281289290291
Arama sonucu : 2328 madde; 2,321 - 2,328 arası.

Konu: Tradingview

  1. PHP Code:
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    //
    //@version=6
    indicator('Trend System'shorttitle '.'overlay true)

    ///////
    // Input
    fastlen1 input(2title 'Fast Moving Average')
    slowlen1 input(3title 'Slow Moving Average')
    signallen1 input(3title 'Signal Line')
    switch21 input(truetitle 'Enable Moving Averages?')

    // Calculation
    fast1 ta.ema(closefastlen1)
    slow1 ta.ema(closeslowlen1)
    MACD1fast1 slow1
    signal1 
    ta.ema(MACD1signallen1)
    histogr1 MACD1 signal1

    // MACD, MA colors
    MACDcolor1 fast1 slow1 color.lime color.red
    fastcolor1 
    ta.change(fast1) > color.lime color.red
    slowcolor1 
    ta.change(slow1) > color.limecolor.red
    MACDupdowncolor1 
    ta.change(MACD1) > color.lime color.red

    // MACD histogram colors
    histogrMACDcolor1 MACD1 histogr1 color.lime color.red
    histogrzerocolor1 
    histogr1 color.lime color.red
    histogrupdowncolor1 
    ta.change(histogr1) > color.lime color.red

    // MACD signal line colors
    signalMACDcolor1 MACD1 signal1 color.lime color.red
    signalzerocolor1 
    signal1 color.lime color.red
    signalupdowncolor1 
    ta.change(signal1) > color.lime color.red

    S1 
    plot(switch21 slow1 nacolor MACDcolor1linewidth 1,title="MACD-Trend")
    ///////////////////////
    ///////////////////

    // @variable Length for LOWESS calculation
    int length input.int(1minval 1title 'Length'group 'LOWESS (Locally Weighted Scatterplot Smoothing)')

    // @variable Number of bars to the left for pivot calculation
    int leftBars input.int(5'Length'group 'Pivots')
    // @variable Number of bars to the right for pivot calculation
    int rightBars leftBars 4

    // @variable Line object for high pivot
    var line line_h na
    // @variable Line object for low pivot
    var line line_l na

    // @variable Color for upward movements
    color col_up color.yellow
    // @variable Color for downward movements
    color col_dn color.red


    // Calculate pivot high and low
    ph ta.pivothigh(leftBarsrightBars)
    pl ta.pivotlow(leftBarsrightBars)

    //@function Calculates LOWESS (Locally Weighted Scatterplot Smoothing)
    //@param src (float) Source series
    //@param length (int) Lookback period
    //@returns (float) LOWESS value
    lowess(srclength) =>
        
    sum_w 0.0
        sum_wx 
    0.0
        sum_wy 
    0.0
        
    for 0 to length 1 by 1
            w 
    math.pow(math.pow(length3), 3)
            
    sum_w := sum_w w
            sum_wx 
    := sum_wx i
            sum_wy 
    := sum_wy src[i]
            
    sum_wy
        a 
    sum_wy sum_w
        b 
    sum_wx sum_w
        a 
    / (length 1) / 2000

    //@function Calculates Modified Adaptive Gaussian Moving Average
    //@param src (float) Source series
    //@param length (int) Lookback period
    //@returns [float, float] Gaussian MA and smoothed Gaussian MA
    GaussianMA(srclength) =>
        
    h_l = array.new<float>(length)

        
    float gma 0.0
        float sumOfWeights 
    0.0
        float sigma 
    = (ta.atr(length) + ta.stdev(closelength)) / // Volatility adaption
        
    float highest 0.0
        float lowest 
    0.0
        float smoothed 
    0.0

        
    for 0 to length 1 by 1
            h_l
    .push(close[i])
            
    highest := h_l.max()
            
    lowest := h_l.min()
            
    weight math.exp(-math.pow((- (length 1)) / (sigma), 2) / 2)
            
    value math.max(highest[i], highest) + math.min(lowest[i], lowest)
            
    gma := gma value weight
            sumOfWeights 
    := sumOfWeights weight
            sumOfWeights

        gma 
    := gma sumOfWeights 2

        smoothed 
    := lowess(gma10)

        [
    gmasmoothed]

    [
    gmasmoothed] = GaussianMA(closelength)

    smoothedColor smoothed smoothed[2] ? col_up smoothed <= smoothed[2] ? col_dn na
    plot
    (smoothed'Pivot trend'smoothedColor)
    ///////////////////////////// 
    16.07.2024 - 10.12.2024

  2. PHP Code:
    //@version=6
    indicator('LOWESS (Locally Weighted Scatterplot Smoothing) [ChartPrime]''.'overlay truemax_lines_count 500max_labels_count 500)
    //@version=6

      ////


    /////

    ///////////////
    //@version=6
    // Inputs
    input.int(1title='Key Value. \"This changes the sensitivity\"')
    input.int(1title='ATR Period')
    input.bool(truetitle='Signals from Heikin Ashi Candles')


    xATR ta.atr(c)
    nLoss xATR


    src 
    request.security(syminfo.tickeridtimeframe.periodcloselookahead=barmerge.lookahead_offgaps=barmerge.gaps_off) : close
    xATRTrailingStop 
    0.0
    iff_1 
    src nz(xATRTrailingStop[1], 0) ? src nLoss src nLoss
    iff_2 
    src nz(xATRTrailingStop[1], 0) and src[1] < nz(xATRTrailingStop[1], 0) ? math.min(nz(xATRTrailingStop[1]), src nLoss) : iff_1
    xATRTrailingStop 
    := src nz(xATRTrailingStop[1], 0) and src[1] > nz(xATRTrailingStop[1], 0) ? math.max(nz(xATRTrailingStop[1]), src nLoss) : iff_2


    pos 
    0
    iff_3 
    src[1] > nz(xATRTrailingStop[1], 0) and src nz(xATRTrailingStop[1], 0) ? -nz(pos[1], 0)
    pos := src[1] < nz(xATRTrailingStop[1], 0) and src nz(xATRTrailingStop[1], 0) ? iff_3


    xcolor 
    pos == -color.red pos == color.green color.blue


    ema 
    ta.ema(src5)
    above ta.crossover(emaxATRTrailingStop)
    below ta.crossover(xATRTrailingStopema)

    barbuy src xATRTrailingStop
    barsell 
    src xATRTrailingStop

    barcolor
    (barbuy color.green na)
    barcolor(barsell color.red na)
    //////////////

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

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

    /////////////////////
    //@version=6

    start1 input(0.1)
    increment1 input(0.1)
    maximum1 input(0.1)
    xo input(0.01)
    xpr input(0.01)

    psar 0.0 // PSAR
    af 0.0 // Acceleration Factor
    trend_dir // Current direction of PSAR
    ep 0.0 // Extreme point

    sar_long_to_short trend_dir[1] == and close <= psar[1] * (xo// PSAR switches from long to short and exceeds xo filter
    sar_short_to_long trend_dir[1] == -and close >= psar[1] * (xo// PSAR switches from short to long and exceeds xo filter

    trend_change barstate.isfirst[1] or sar_long_to_short or sar_short_to_long

    // Calculate trend direction
    trend_dir := barstate.isfirst[1] and close[1] > open[1] ? barstate.isfirst[1] and close[1] <= open[1] ? -sar_long_to_short ? -sar_short_to_long nz(trend_dir[1])

    // Calculate  Acceleration Factor
    af := trend_change start1 trend_dir == and high ep[1] or trend_dir == -and low ep[1] ? math.min(maximum1af[1] + increment1) : af[1]

    // Calculate extreme point
    ep := trend_change and trend_dir == high trend_change and trend_dir == -low trend_dir == math.max(ep[1], high * (xpr)) : math.min(ep[1], low * (xpr))

    // Calculate PSAR
    psar := barstate.isfirst[1] and close[1] > open[1] ? low[1] : barstate.isfirst[1] and close[1] <= open[1] ? high[1] : trend_change ep[1] : trend_dir == psar[1] + af * (ep psar[1]) : psar[1] - af * (psar[1] - ep)

    plot(psarstyle plot.style_steplinecolor trend_dir == color.yellow color.blue,title "Range",linewidth 1)
    ////////////////////

    start12 input(0.2)
    increment12 input(0.2)
    maximum12 input(0.2)
    xo12 input(0.01)
    xpr12 input(0.01)

    psar12 0.0 // PSAR
    af12 0.0 // Acceleration Factor
    trend_dir12 // Current direction of PSAR
    ep12 0.0 // Extreme point

    sar_long_to_short12 trend_dir12[1] == and close <= psar12[1] * (xo12// PSAR switches from long to short and exceeds xo filter
    sar_short_to_long12 trend_dir12[1] == -and close >= psar12[1] * (xo12// PSAR switches from short to long and exceeds xo filter

    trend_change12 barstate.isfirst[1] or sar_long_to_short12 or sar_short_to_long12

    // Calculate trend direction
    trend_dir12 := barstate.isfirst[1] and close[1] > open[1] ? barstate.isfirst[1] and close[1] <= open[1] ? -sar_long_to_short12 ? -sar_short_to_long12 nz(trend_dir12[1])

    // Calculate  Acceleration Factor
    af12 := trend_change12 start12 trend_dir12 == and high ep12[1] or trend_dir12 == -and low ep12[1] ? math.min(maximum12af12[1] + increment12) : af12[1]

    // Calculate extreme point
    ep12 := trend_change12 and trend_dir12 == high trend_change12 and trend_dir12 == -low trend_dir12 == math.max(ep12[1], high * (xpr12)) : math.min(ep12[1], low * (xpr12))

    // Calculate PSAR
    psar12 := barstate.isfirst[1] and close[1] > open[1] ? low[1] : barstate.isfirst[1] and close[1] <= open[1] ? high[1] : trend_change12 ep12[1] : trend_dir12 == psar12[1] + af12 * (ep12 psar12[1]) : psar12[1] - af12 * (psar12[1] - ep12)

    plot(psar12style plot.style_steplinecolor trend_dir12 == color.yellow color.blue,title "Range",linewidth 1)

    al=ta.crossover(psarpsar12)
    plotshape(al)

    al1=ta.crossover(closepsar)
    plotshape(al1)
    ///////////////////////

    ////// 
    16.07.2024 - 10.12.2024

  3. PHP Code:
    //@version=6
    indicator(title '....'shorttitle '.'overlay true)

    start1 input(0.1)
    increment1 input(0.1)
    maximum1 input(0.1)
    xo input(0.01)
    xpr input(0.01)

    psar 0.0 // PSAR
    af 0.0 // Acceleration Factor
    trend_dir // Current direction of PSAR
    ep 0.0 // Extreme point

    sar_long_to_short trend_dir[1] == and close <= psar[1] * (xo// PSAR switches from long to short and exceeds xo filter
    sar_short_to_long trend_dir[1] == -and close >= psar[1] * (xo// PSAR switches from short to long and exceeds xo filter

    trend_change barstate.isfirst[1] or sar_long_to_short or sar_short_to_long

    // Calculate trend direction
    trend_dir := barstate.isfirst[1] and close[1] > open[1] ? barstate.isfirst[1] and close[1] <= open[1] ? -sar_long_to_short ? -sar_short_to_long nz(trend_dir[1])

    // Calculate  Acceleration Factor
    af := trend_change start1 trend_dir == and high ep[1] or trend_dir == -and low ep[1] ? math.min(maximum1af[1] + increment1) : af[1]

    // Calculate extreme point
    ep := trend_change and trend_dir == high trend_change and trend_dir == -low trend_dir == math.max(ep[1], high * (xpr)) : math.min(ep[1], low * (xpr))

    // Calculate PSAR
    psar := barstate.isfirst[1] and close[1] > open[1] ? low[1] : barstate.isfirst[1] and close[1] <= open[1] ? high[1] : trend_change ep[1] : trend_dir == psar[1] + af * (ep psar[1]) : psar[1] - af * (psar[1] - ep)

    plot(psarstyle plot.style_steplinecolor trend_dir == color.yellow color.blue,title "Range",linewidth 1)
    ////////////////////

    start12 input(0.2)
    increment12 input(0.2)
    maximum12 input(0.2)
    xo12 input(0.01)
    xpr12 input(0.01)

    psar12 0.0 // PSAR
    af12 0.0 // Acceleration Factor
    trend_dir12 // Current direction of PSAR
    ep12 0.0 // Extreme point

    sar_long_to_short12 trend_dir12[1] == and close <= psar12[1] * (xo12// PSAR switches from long to short and exceeds xo filter
    sar_short_to_long12 trend_dir12[1] == -and close >= psar12[1] * (xo12// PSAR switches from short to long and exceeds xo filter

    trend_change12 barstate.isfirst[1] or sar_long_to_short12 or sar_short_to_long12

    // Calculate trend direction
    trend_dir12 := barstate.isfirst[1] and close[1] > open[1] ? barstate.isfirst[1] and close[1] <= open[1] ? -sar_long_to_short12 ? -sar_short_to_long12 nz(trend_dir12[1])

    // Calculate  Acceleration Factor
    af12 := trend_change12 start12 trend_dir12 == and high ep12[1] or trend_dir12 == -and low ep12[1] ? math.min(maximum12af12[1] + increment12) : af12[1]

    // Calculate extreme point
    ep12 := trend_change12 and trend_dir12 == high trend_change12 and trend_dir12 == -low trend_dir12 == math.max(ep12[1], high * (xpr12)) : math.min(ep12[1], low * (xpr12))

    // Calculate PSAR
    psar12 := barstate.isfirst[1] and close[1] > open[1] ? low[1] : barstate.isfirst[1] and close[1] <= open[1] ? high[1] : trend_change12 ep12[1] : trend_dir12 == psar12[1] + af12 * (ep12 psar12[1]) : psar12[1] - af12 * (psar12[1] - ep12)

    plot(psar12style plot.style_steplinecolor trend_dir12 == color.yellow color.blue,title "Range",linewidth 1
    16.07.2024 - 10.12.2024

  4. PHP Code:
    //@version=6
    indicator(title '.'shorttitle '.')
    ao ta.sma(hl25) - ta.sma(hl245)
    plot(aocolor ta.change(ao) <= color.red color.greenstyle plot.style_crosslinewidth 2

    çok...sade....
    16.07.2024 - 10.12.2024

  5.  Alıntı Originally Posted by @yörük@ Yazıyı Oku
    PHP Code:
    //@version=6
    indicator(title '.'shorttitle '.')
    ao ta.sma(hl25) - ta.sma(hl245)
    plot(aocolor ta.change(ao) <= color.red color.greenstyle plot.style_crosslinewidth 2

    çok...sade....
    neden....çünkü... barın yüksek düşük/2 sini veri olarak alıp,
    5barlık sma dan, 45 barlık sma....çıkarıp...
    sıfırdan küçük veya büyük olmasına göre...hesaplanıp....çiziliyor....

    buna strateji yazılsa....ve grafiğin üzerine atılsa ne güzel olurdu....

    ama referans aralıkları farklı....

    aynı grafiğe atabilmek için....

    ya bar renklendirme....
    ya da
    zemin renklendirme yapmak gerekir...

    böylece...yazılan strateji...çok rahat görülür...

    örnek....
    https://www.tradingview.com/x/kcpV2WUj/
    https://www.tradingview.com/x/2yNlpXXL/
    https://www.tradingview.com/x/CAP0Y87Q/
    https://www.tradingview.com/x/ge5heEHW/
    16.07.2024 - 10.12.2024

  6. PHP Code:
    // This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/

    //@version=6
    indicator("."overlay truemax_lines_count 500max_labels_count=500)
    //////////////// MAS TREND VE BAR RENKLENDİRMESİDİR  /////////////////////////
    type_ma input.string("SMA""Type"options = ["SMA""EMA""SMMA (RMA)""WMA""VWMA"], group "MA")
    length input.int(10"Length"inline "ma"group "MA")
    source input.source(hl2""inline "ma"group "MA")
    grp "MA Shift Oscillator"
    osc_len input.int(15"Length"group grpinline "osc")
    osc_threshold input.float(0.5""step 0.1group grpinline "osc")

    // Colors
    osc_col_up1 input.color(#1dd1c2, "", inline = "c", group = "color")
    osc_col_up2 input.color(#17a297, "", inline = "c", group = "color")
    osc_col_dn1 input.color(color.yellow""inline "c"group "color")
    osc_col_dn2 input.color(color.orange""inline "c"group "color")


    // Smoothing MA Calculation
    ma(sourcelengthMAtype) =>
        switch 
    MAtype
            
    "SMA"                   => ta.sma(sourcelength)
            
    "EMA"                   => ta.ema(sourcelength)
            
    "SMMA (RMA)"            => ta.rma(sourcelength)
            
    "WMA"                   => ta.wma(sourcelength)
            
    "VWMA"                  => ta.vwma(sourcelength)

    // MA 
    MA ma(sourcelengthtype_ma
    color source >= MA osc_col_up2 osc_col_dn2

    // Osc 
    diff source MA 
    perc_r 
    ta.percentile_linear_interpolation(diff100099)

    osc ta.hma(ta.change(diff perc_rosc_len), 10)
    osc_col osc ? (osc osc[1] ? osc_col_up1 osc_col_up2) : (osc osc[1] ? osc_col_dn1 osc_col_dn2)

    // MAs Plot
    plot(MA"MAS TREND"color=colorforce_overlay truelinewidth 2)
    barcolor(color)

    /////////////////// 40 SMA İLE TREND TAKİP HESAPLAMASIDIR  ///////////////////////
    smaHigh ta.sma(high40)
    smaLow ta.sma(low40)
    mf=(smaHigh+smaLow)/2
    plot
    (mftitle 'SMA TREND 'color #fd07f5, linewidth = 2)
    /////////////////  YÜZDEYLE TREND VE KANAL HESAPLAMASIDIR  //////////////////
    //@version=6

    // Input for the filter smoothness parameter
    lambda input.int(100'Smoothness Parameter (λ)'minval 1)

    // Input to switch between percentage and price difference views
    displayMode input.string('Percentage''Display Mode'options = ['Percentage''Price Difference'])

    // Function to calculate the approximate HP trend component
    hpFilter(srclambda) =>
        var 
    float trend na
        trend 
    := na(trend[1]) ? src : (src + (lambda 1) * nz(trend[1])) / lambda
        trend

    // Calculate the HP Filter (trend component)
    hp_trend hpFilter(closelambda)

    // Calculate the cycle component as both percentage and price difference
    cycle_pct = (close hp_trend) / hp_trend 100
    cycle_price 
    close hp_trend

    // Arrays to store positive and negative cycle percentage values
    var pos_values = array.new_float()
    var 
    neg_values = array.new_float()

    // Collect positive and negative cycle percentage values
    if displayMode == 'Percentage'
        
    if cycle_pct 0
            
    array.push(pos_valuescycle_pct)
        else if 
    cycle_pct 0
            
    array.push(neg_valuescycle_pct)

    // Calculate medians for values above and below zero
    pos_median = array.size(pos_values) > ? array.avg(pos_values) : na
    neg_median 
    = array.size(neg_values) > ? array.avg(neg_values) : na

    // Target circles
    longtarget pos_median 100 hp_trend hp_trend
    shorttaget 
    neg_median 100 hp_trend hp_trend

    // Conditional plotting based on the selected display mode
    //plot(displayMode == 'Percentage' ? cycle_pct : na, title = 'HP Filter Divergence (%)', color = color.blue, linewidth = 1)
    //plot(displayMode == 'Price Difference' ? cycle_price : na, title = 'HP Filter Divergence (Price)', color = color.blue, linewidth = 1)
    //hline(0, 'Zero Line', linestyle = hline.style_dashed)

    // Plot the cycle component in the new pane
    plot(hp_trendtitle 'YÖRÜK TREND'color color.graylinewidth 2force_overlay true)
    plot(longtargettitle 'YÖRÜK ÜST KANAL'color color.grayforce_overlay truestyle plot.style_line)
    plot(shorttagettitle 'YÖRÜK ALT KANAL'color color.grayforce_overlay truestyle plot.style_line)

    // Plot horizontal lines for the median values above and below zero
    //plot(pos_median, 'Positive Median Line', color = color.green)
    //plot(neg_median, 'Negative Median Line', color = color.purple)
    ////////////////////// ATR TREND HESAPLAMASIDIR  /////////////////////
    //@version=6

    var params "Parameters"
    src55 nz(input.source(closetitle "Source"group params))
    len55 input.int(10title "ATR Len"group params)
    multi55 input.float(1.5title "Multi"step 0.25minval 0group params)

    var 
    disp "Display"
    rng_tog input.bool(truetitle "Consolidation Ranges"group disp)
    atr_tog input.bool(falsetitle "ATR Channel"group disp)

    var 
    cols "Colors"
    up_col input.color(#3daa45, title = "Up Color", group = cols)
    down_col input.color(#ff033e, title = "Down Color", group = cols)
    flat_col input.color(color.rgb(2352436), title "Flat Color"inline "3"group cols)
    rng_col input.color(#004d9233, title = "", inline = "3", group = cols)


    //Smooths a Source similar to Rope Stabilization in a Drawing Application. OR a "Range Filter" as some might say ;)
    rope_smoother(float _src55float _threshold) =>

        var 
    float _rope _src55

        _move 
    _src55 _rope //Movement from Rope

        
    _rope += math.max(math.abs(_move) - nz(_threshold), 0) * math.sign(_move//Directional Movement beyond the Threshold
        
        
    [_rope,_rope+_threshold,_rope-_threshold//[Rope, Upper, Lower]

    ///_____________________________________________________________________________________________________________________
    ///Rope Calcs
    ///‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

    //Calculating Rope
    atr ta.atr(len55)*multi55

    [rope,upper,lower] = rope_smoother(src55,atr)

    //Directional Detection
    var dir 0

    dir 
    := rope rope[1] ? rope rope[1] ? -dir

    if ta.cross(src55,rope)
        
    dir := 0

    //Directional Color Assignment    
    col dir up_col dir down_col flat_col

    ///_____________________________________________________________________________________________________________________
    ///Consolidation Ranges
    ///‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

    //High and Low Output Lines
    var float c_hi na
    var float c_lo na

    //Counters for Accumulating Averages
    var float h_sum 0
    var float l_sum 0
    var int c_count 0

    //Flip-Flop
    var ff 1

    //Flip Flop, Pip Slip Top,
    //Bear Drop, Bull Pop, Lunch Time Chop,
    //Tight Stop, Desktop Prop.
    if dir == 0

        
    if dir[1] != 0
            h_sum 
    := 0
            l_sum 
    := 0
            c_count 
    := 0
            ff 
    := ff * -1

        h_sum 
    += upper
        l_sum 
    += lower
        c_count 
    += 1
        c_hi 
    := h_sum/c_count
        c_lo 
    := l_sum/c_count

    ///_____________________________________________________________________________________________________________________
    ///Display
    ///‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

    //Rope
    plot(ropelinewidth 3color coltitle "ATR TREND"force_overlay true)

    /////////////////////////// ZEMİNİ RSİ TRENDE GÖRE RENKLENDİRME HESAPLAMASIDIR   ///////////////////
    src88 input.source(close,"RSI Source",group "Connors RSI")
    lenrsi input(24"RSI Length",group "Connors RSI")
    lenupdown input(20"UpDown Length",group "Connors RSI")
    lenroc input(75"ROC Length",group "Connors RSI")

    z_score_length  input(14"Z-Score Lookback",group "Filtering")
    threshold       input.float(1.5"Z-Score Threshold"step=0.025,group "Filtering")
    trendingLongThreshold input.float(65"Trending Long Threshold" ,group "Filtering")
    trendingShortThreshold input.float(35"Trending Short Threshold",group "Filtering")
    revertingLongThreshold  input.float(70title="Reverting Long Threshold",group "Filtering")
    revertingShortThreshold input.float(30title="Reverting Short Threshold",group "Filtering")

    // ─── CONNORS RSI ──────────────────────────────────────────────────────────
    updown(s) =>
        
    isEqual == s[1]
        
    isGrowing s[1]
        
    ud 0.0
        ud 
    := isEqual isGrowing ? (nz(ud[1]) <= nz(ud[1])+1) : (nz(ud[1]) >= ? -nz(ud[1])-1)
        
    ud
    rsi88 
    ta.rsi(src88lenrsi)
    updownrsi ta.rsi(updown(src88), lenupdown)
    percentrank ta.percentrank(ta.roc(src881), lenroc)
    crsi =  math.avg(rsi88updownrsipercentrank


    // ─── Z-SCORING ──────────────────────────────────────────────────────────
    mean    ta.sma(crsiz_score_length)
    stdDev  ta.stdev(crsiz_score_length)
    zScore88  = (crsi mean) / stdDev

    isTrending 
    math.abs(zScore88) > threshold

    // ─── Signal Generation ────────────────────────────────────────────────
    var int signal 0
    if barstate.isconfirmed
        
    if isTrending
            signal 
    := crsi trendingLongThreshold crsi trendingShortThreshold ? -signal[1]
        else
            
    signal := crsi revertingLongThreshold crsi revertingShortThreshold ? -signal[1]


    trendColor signal == #17dfad : signal == -1  ? #dd326b : color.gray


    //decor = plot(crsi,"Decor",style = plot.style_columns,histbase = 50,color=trendColor,linewidth = 2)
    bgcolor(color.new(trendColor,75))
    //plotcandle(open,high,low,close,"Candles",color=trendColor,wickcolor = trendColor,bordercolor = trendColor,force_overlay = true)
    /////////////
    //@version=6

    // Color variables
    upTrendColor color.green
    neutralColor 
    #0e0e0e
    downTrendColor color.red
    fillColor 
    color.rgb(12121270// Color between lines
    yellowColor color.rgb(2302142)
    blackTextColor color.rgb(000)
    blueColor color.rgb(2332170)
    whiteTextColor color.rgb(777)
    greenColor color.green
    redColor 
    color.red

    // Source
    source99 input(defval closetitle 'Source')

    // Sampling Period
    period input.int(defval 50minval 1title 'Sampling Period')

    // Range Multiplier
    multiplier input.float(defval 3.0minval 0.1title 'Range Multiplier')

    // Take Profit Settings
    takeProfitPips input.float(defval 600.0title 'Take Profit (in pips)')

    // Smooth Average Range
    smoothRange(xtm) =>
        
    adjustedPeriod 1
        avgRange 
    ta.ema(math.abs(x[1]), t)
        
    smoothRange ta.ema(avgRangeadjustedPeriod) * m
        smoothRange
    smoothedRange 
    smoothRange(source99periodmultiplier)

    // Trend Filter
    trendFilter(xr) =>
        
    filtered x
        filtered 
    := nz(filtered[1]) ? nz(filtered[1]) ? nz(filtered[1]) : nz(filtered[1]) ? nz(filtered[1]) : r
        filtered
    filter 
    trendFilter(sourcesmoothedRange)

    // Filter Direction
    upCount 0.0
    upCount 
    := filter filter[1] ? nz(upCount[1]) + filter filter[1] ? nz(upCount[1])
    downCount 0.0
    downCount 
    := filter filter[1] ? nz(downCount[1]) + filter filter[1] ? nz(downCount[1])

    // Colors
    filterColor upCount upTrendColor downCount downTrendColor neutralColor

    // Double Line Design
    //lineOffset = smoothedRange * 0.1
    //upperLinePlot = plot(filter + lineOffset, color = filterColor, linewidth = 1, title = 'EMA TREND')
    //lowerLinePlot = plot(filter - lineOffset, color = filterColor, linewidth = 1, title = 'Düşüş Trend Çizgisi')
    //fill(upperLinePlot, lowerLinePlot, color = fillColor, title = 'Trend Fill')


    // Break Outs
    longCondition bool(na)
    shortCondition bool(na)
    longCondition := source99 filter and source99 source99[1] and upCount or source99 filter and source99 source99[1] and upCount 0
    shortCondition 
    := source99 filter and source99 source99[1] and downCount or source99 filter and source99 source99[1] and downCount 0

    initialCondition 
    0
    initialCondition 
    := longCondition shortCondition ? -initialCondition[1]
    longSignal longCondition and initialCondition[1] == -1
    shortSignal 
    shortCondition and initialCondition[1] == 1

    // Take Profit Logic
    var float entryPriceBuy na
    var float entryPriceSell na
    takeProfitSignalBuy 
    false
    takeProfitSignalSell 
    false

    if longSignal
        entryPriceBuy 
    := source99
        entryPriceBuy
    if not na(entryPriceBuy) and source99 >= entryPriceBuy takeProfitPips syminfo.mintick
        takeProfitSignalBuy 
    := true
        entryPriceBuy 
    := na
        entryPriceBuy

    if shortSignal
        entryPriceSell 
    := source99
        entryPriceSell
    if not na(entryPriceSell) and source99 <= entryPriceSell takeProfitPips syminfo.mintick
        takeProfitSignalSell 
    := true
        entryPriceSell 
    := na
        entryPriceSell

    // Alerts and Signals
    plotshape(longSignaltitle 'Smart Buy Signal'text 'Al'textcolor color.whitestyle shape.labelupsize size.smalllocation location.belowbarcolor greenColor)
    plotshape(shortSignaltitle 'Smart Sell Signal'text 'Sat'textcolor color.whitestyle shape.labeldownsize size.smalllocation location.abovebarcolor redColor)
    //plotshape(takeProfitSignalBuy, title = 'Book Profit Buy', text = 'Book Profit', textcolor = blackTextColor, style = shape.labeldown, size = size.small, location = location.abovebar, color = yellowColor)
    //plotshape(takeProfitSignalSell, title = 'Book Profit Sell', text = 'Book Profit', textcolor = whiteTextColor, style = shape.labelup, size = size.small, location = location.belowbar, color = blueColor)
    ///////////////////// FİBO TREND HESAPLAMASIDIR  ///////////////////
    //@version=6

    grp1 "Indicator Settings"
    tpAggressiveness input.string("low""TP Aggressiveness"options=["low""medium""high"], group=grp1tooltip="Controls how aggressive the Take Profit (TP) trigger is. Low = slower exits, High = faster exits."display display.data_window)
    src44 input.source(hlc3"Source"group=grp1tooltip="Price source used for band calculations"display display.data_window)
    len44 input.int(10"Length"group=grp1tooltip="Length for the basis calculation"display display.data_window)
    atrLen44 input.int(10"ATR Length"group=grp1tooltip="Length for ATR or Stdev volatility basis"display display.data_window)
    useATR input.bool(true"Use ATR"group=grp1tooltip="Toggle between ATR or standard deviation for band width"display display.data_window)

    grp2 "Visual Options"
    showRej input.bool(true"Show Take Profit Crosses"group=grp2display display.data_window)
    showBounce input.bool(true"Show Basis Bounce Arrows"group=grp2display display.data_window)
    //colorbar = input.bool(true, "Custom Bar Color", group=grp2, display = display.data_window)
    //green = input.color(#00ffbb, "Bullish Color", group=grp2, display = display.data_window)
    //red = input.color(#ff1100, "Bearish Color", group=grp2, display = display.data_window)
    gray input.color(color.fuchsia"Basis Color"group=grp2display display.data_window)

    basis ta.ema(ta.ema(src44len44), len44)
    vol useATR ta.atr(atrLen44) : ta.stdev(src44len44)

    mult1 0.618
    mult2 
    1.0
    mult3 
    1.618
    mult4 
    2.618

    var int trend 0
    trend 
    := basis basis[1] ? basis basis[1] ? -nz(trend[1])

    upper1 basis vol mult1
    upper2 
    basis vol mult2
    upper3 
    basis vol mult3
    upper4 
    basis vol mult4
    lower1 
    basis vol mult1
    lower2 
    basis vol mult2
    lower3 
    basis vol mult3
    lower4 
    basis vol mult4

    plot
    (basistitle="Fibo-Trend"color=graylinewidth=1)
    ///////////////////////MACD TREND HESAPLAMASIDIR/////////////////
    //@version=6
    // Input
    fastlen1 input(2title 'Fast Moving Average')
    slowlen1 input(3title 'Slow Moving Average')
    signallen1 input(3title 'Signal Line')
    switch21 input(truetitle 'Enable Moving Averages?')

    // Calculation
    fast1 ta.ema(closefastlen1)
    slow1 ta.ema(closeslowlen1)
    MACD1fast1 slow1
    signal1 
    ta.ema(MACD1signallen1)
    histogr1 MACD1 signal1

    // MACD, MA colors
    MACDcolor1 fast1 slow1 color.lime color.red
    fastcolor1 
    ta.change(fast1) > color.lime color.red
    slowcolor1 
    ta.change(slow1) > color.limecolor.red
    MACDupdowncolor1 
    ta.change(MACD1) > color.lime color.red

    // MACD histogram colors
    histogrMACDcolor1 MACD1 histogr1 color.lime color.red
    histogrzerocolor1 
    histogr1 color.lime color.red
    histogrupdowncolor1 
    ta.change(histogr1) > color.lime color.red

    // MACD signal line colors
    signalMACDcolor1 MACD1 signal1 color.lime color.red
    signalzerocolor1 
    signal1 color.lime color.red
    signalupdowncolor1 
    ta.change(signal1) > color.lime color.red

    S1 
    plot(switch21 slow1 nacolor MACDcolor1linewidth 1,title="MACD-Trend")
    ///////////////////////
    ///////////////////

    // @variable Length for LOWESS calculation
    int length77 input.int(1minval 1title 'Length'group 'LOWESS (Locally Weighted Scatterplot Smoothing)')

    // @variable Number of bars to the left for pivot calculation
    int leftBars input.int(5'Length'group 'Pivots')
    // @variable Number of bars to the right for pivot calculation
    int rightBars leftBars 4

    // @variable Line object for high pivot
    var line line_h na
    // @variable Line object for low pivot
    var line line_l na

    // @variable Color for upward movements
    color col_up color.yellow
    // @variable Color for downward movements
    color col_dn color.red


    // Calculate pivot high and low
    ph ta.pivothigh(leftBarsrightBars)
    pl ta.pivotlow(leftBarsrightBars)

    //@function Calculates LOWESS (Locally Weighted Scatterplot Smoothing)
    //@param src (float) Source series
    //@param length (int) Lookback period
    //@returns (float) LOWESS value
    lowess(src79length77) =>
        
    sum_w 0.0
        sum_wx 
    0.0
        sum_wy 
    0.0
        
    for 0 to length77 1 by 1
            w 
    math.pow(math.pow(length773), 3)
            
    sum_w := sum_w w
            sum_wx 
    := sum_wx i
            sum_wy 
    := sum_wy src79[i]
            
    sum_wy
        a 
    sum_wy sum_w
        b 
    sum_wx sum_w
        a 
    / (length77 1) / 2000

    //@function Calculates Modified Adaptive Gaussian Moving Average
    //@param src (float) Source series
    //@param length (int) Lookback period
    //@returns [float, float] Gaussian MA and smoothed Gaussian MA
    GaussianMA(src79length77) =>
        
    h_l = array.new<float>(length77)

        
    float gma 0.0
        float sumOfWeights 
    0.0
        float sigma 
    = (ta.atr(length77) + ta.stdev(closelength77)) / // Volatility adaption
        
    float highest 0.0
        float lowest 
    0.0
        float smoothed 
    0.0

        
    for 0 to length77 1 by 1
            h_l
    .push(close[i])
            
    highest := h_l.max()
            
    lowest := h_l.min()
            
    weight math.exp(-math.pow((- (length77 1)) / (sigma), 2) / 2)
            
    value math.max(highest[i], highest) + math.min(lowest[i], lowest)
            
    gma := gma value weight
            sumOfWeights 
    := sumOfWeights weight
            sumOfWeights

        gma 
    := gma sumOfWeights 2

        smoothed 
    := lowess(gma10)

        [
    gmasmoothed]

    [
    gmasmoothed] = GaussianMA(closelength)

    smoothedColor smoothed smoothed[2] ? col_up smoothed <= smoothed[2] ? col_dn na
    plot
    (smoothed'Pivot trend'smoothedColor)
    /////////////////////////////STOP HESAPLAMADIR////////////////////////////////////
    //@version=6

    length66 input(title 'ATR Period'defval 10)
    mult66 input.float(title 'ATR Multiplier'step 0.1defval 2)
    srca input(title 'Source'defval ohlc4)
    wicks input(title 'Take Wicks into Account ?'defval true)


    atr66 mult66 ta.atr(length66)

    highPrice wicks high close
    lowPrice 
    wicks low close
    doji4price 
    open == close and open == low and open == high

    longStop 
    srca atr66
    longStopPrev 
    nz(longStop[1], longStop)

    if 
    longStop 0
        
    if doji4price
            longStop 
    := longStopPrev
            longStop
        
    else
            
    longStop := lowPrice[1] > longStopPrev math.max(longStoplongStopPrev) : longStop
            longStop
    else
        
    longStop := longStopPrev
        longStop

    shortStop 
    srca atr66
    shortStopPrev 
    nz(shortStop[1], shortStop)

    if 
    shortStop 0
        
    if doji4price
            shortStop 
    := shortStopPrev
            shortStop
        
    else
            
    shortStop := highPrice[1] < shortStopPrev math.min(shortStopshortStopPrev) : shortStop
            shortStop
    else
        
    shortStop := shortStopPrev
        shortStop

    var int dir66 1
    dir66 
    := dir66 == -and highPrice shortStopPrev dir66 == and lowPrice longStopPrev ? -dir66

    var color longColor color.green
    var color shortColor color.red

    buySignal 
    dir66 == and dir66[1] == -1
    plotshape
    (buySignal longStop natitle 'Long Stop Start'location location.absolutestyle shape.circlesize size.normalcolor color.new(longColor0))
    sellSignal dir66 == -and dir66[1] == 1
    plotshape
    (sellSignal shortStop natitle 'Short Stop Start'location location.absolutestyle shape.circlesize size.normalcolor color.new(shortColor0))
    /////////////////////////SAR İLE KANAL ARALIK HESAPLAMASIDIR////////////////////
    //@version=6

    start1 input(0.)
    increment1 input(0.1)
    maximum1 input(0.9)
    xo input(0.01)
    xpr input(0.01)

    psar 0.0 // PSAR
    af 0.0 // Acceleration Factor
    trend_dir // Current direction of PSAR
    ep 0.0 // Extreme point

    sar_long_to_short trend_dir[1] == and close <= psar[1] * (xo// PSAR switches from long to short and exceeds xo filter
    sar_short_to_long trend_dir[1] == -and close >= psar[1] * (xo// PSAR switches from short to long and exceeds xo filter

    trend_change barstate.isfirst[1] or sar_long_to_short or sar_short_to_long

    // Calculate trend direction
    trend_dir := barstate.isfirst[1] and close[1] > open[1] ? barstate.isfirst[1] and close[1] <= open[1] ? -sar_long_to_short ? -sar_short_to_long nz(trend_dir[1])

    // Calculate  Acceleration Factor
    af := trend_change start1 trend_dir == and high ep[1] or trend_dir == -and low ep[1] ? math.min(maximum1af[1] + increment1) : af[1]

    // Calculate extreme point
    ep := trend_change and trend_dir == high trend_change and trend_dir == -low trend_dir == math.max(ep[1], high * (xpr)) : math.min(ep[1], low * (xpr))

    // Calculate PSAR
    psar := barstate.isfirst[1] and close[1] > open[1] ? low[1] : barstate.isfirst[1] and close[1] <= open[1] ? high[1] : trend_change ep[1] : trend_dir == psar[1] + af * (ep psar[1]) : psar[1] - af * (psar[1] - ep)

    plot(psarstyle plot.style_steplinecolor trend_dir == color.yellow color.blue,title "KANAL",linewidth 1)
    ////////////////////

    start12 input(0.)
    increment12 input(0.01)
    maximum12 input(0.9)
    xo12 input(0.01)
    xpr12 input(0.01)

    psar12 0.0 // PSAR
    af12 0.0 // Acceleration Factor
    trend_dir12 // Current direction of PSAR
    ep12 0.0 // Extreme point

    sar_long_to_short12 trend_dir12[1] == and close <= psar12[1] * (xo12// PSAR switches from long to short and exceeds xo filter
    sar_short_to_long12 trend_dir12[1] == -and close >= psar12[1] * (xo12// PSAR switches from short to long and exceeds xo filter

    trend_change12 barstate.isfirst[1] or sar_long_to_short12 or sar_short_to_long12

    // Calculate trend direction
    trend_dir12 := barstate.isfirst[1] and close[1] > open[1] ? barstate.isfirst[1] and close[1] <= open[1] ? -sar_long_to_short12 ? -sar_short_to_long12 nz(trend_dir12[1])

    // Calculate  Acceleration Factor
    af12 := trend_change12 start12 trend_dir12 == and high ep12[1] or trend_dir12 == -and low ep12[1] ? math.min(maximum12af12[1] + increment12) : af12[1]

    // Calculate extreme point
    ep12 := trend_change12 and trend_dir12 == high trend_change12 and trend_dir12 == -low trend_dir12 == math.max(ep12[1], high * (xpr12)) : math.min(ep12[1], low * (xpr12))

    // Calculate PSAR
    psar12 := barstate.isfirst[1] and close[1] > open[1] ? low[1] : barstate.isfirst[1] and close[1] <= open[1] ? high[1] : trend_change12 ep12[1] : trend_dir12 == psar12[1] + af12 * (ep12 psar12[1]) : psar12[1] - af12 * (psar12[1] - ep12)

    plot(psar12style plot.style_steplinecolor trend_dir12 == color.yellow color.blue,title "KANAL",linewidth 1)

    ////////////////////// 
    16.07.2024 - 10.12.2024

  7. PHP Code:
    //@version=6
    indicator(title="Parabolic SAR Deviation [BigBeluga]"shorttitle="..."overlay=truemax_lines_count 500max_labels_count 500)

    //@version=6
    init input.float(0.009title 'Initial Start'step 0.001)
    fi input.float(3title 'Increment/Start Ratio'step 0.1)
    fm input.float(9title 'Max/Start Ratio'step 0.1)

    sar01 ta.sar(init 01init fi 01init fm 01)
    sar10 ta.sar(init 10init fi 10init fm 10)

    //plot(sar01, title = '01 SAR', style = plot.style_circles, color = renk ? sar01 > high ? color.red  : color.green : color.silver, linewidth = 1)
    //plot(sar10, title = '10 SAR', style = plot.style_circles, color = renk ? sar10 > high ? color.red  : color.green : color.silver, linewidth = 1)

    fd=(sar01+sar10)/2
    plot
    (fdtitle 'SAR TREND'style plot.style_steplinecolor renk fd high color.red  color.green color.silverlinewidth 2)
    ////////////////////////////////
    //@version=6
    start input(0.)
    increment input(0.1)
    maximum input(0.9"Max Value")
    out55 ta.sar(startincrementmaximum)
    plot_color close out55 color.rgb(518264) : close out55 color.rgb(16977) : na

    show_header 
    input(falsetitle="Show header?"group='Table Settings')
    dashboard_position input.string("Top center"title="Position"options=["Top right",  "Top center",  "Middle right"], group='Table Settings')
    text_size input.string('Normal'title="Size"options=["Tiny""Small""Normal""Large"], group='Table Settings')
    text_color input.color(color.rgb(1168224), title="Text color"group='Table Settings')
    table_color input.color(color.purpletitle="Border color"group='Table Settings')
    uptrend_indicator "🔵"
    downtrend_indicator "🟠"

    tf1 input.timeframe("1"title="Timeframe 1")
    tf2 input.timeframe("3"title="Timeframe 2")
    tf3 input.timeframe("5"title="Timeframe 3")
    tf4 input.timeframe("10"title="Timeframe 4")
    tf5 input.timeframe("15"title="Timeframe 5")
    tf6 input.timeframe("30"title="Timeframe 6")
    tf7 input.timeframe("60"title="Timeframe 7")
    tf8 input.timeframe("120"title="Timeframe 8")
    tf9 input.timeframe("240"title="Timeframe 9")
    tf10 input.timeframe("D"title="Timeframe 10")


    var 
    table_position dashboard_position == 'Top center' position.top_center :
      
    dashboard_position == 'Top center' position.top_center :
      
    dashboard_position == 'Middle right' position.middle_right position.middle_right
      
    var table_text_size text_size == 'Normal' size.normal :
      
    text_size == 'Small' size.small size.normal

    var table.new(position=table_positioncolumns=3rows=20frame_color=#cdcbcb, frame_width=5, border_color=table_color, border_width=1,bgcolor =color.rgb(21, 21, 21) )

    get_trend_status(trend_value) =>
        
    is_uptrend close trend_value
        candle_now 
    is_uptrend uptrend_indicator downtrend_indicator
        candle_now

    //--------------------------------------------------------------------------------------

    sar_1 request.security(syminfo.tickeridtf1ta.sar(startincrementmaximum))
    sar_2 request.security(syminfo.tickeridtf2ta.sar(startincrementmaximum))
    sar_3 request.security(syminfo.tickeridtf3ta.sar(startincrementmaximum))
    sar_4 request.security(syminfo.tickeridtf4ta.sar(startincrementmaximum))
    sar_5 request.security(syminfo.tickeridtf5ta.sar(startincrementmaximum))
    sar_6 request.security(syminfo.tickeridtf6ta.sar(startincrementmaximum))
    sar_7 request.security(syminfo.tickeridtf7ta.sar(startincrementmaximum))
    sar_8 request.security(syminfo.tickeridtf8ta.sar(startincrementmaximum))
    sar_9 request.security(syminfo.tickeridtf9ta.sar(startincrementmaximum))
    sar_10 request.security(syminfo.tickeridtf10ta.sar(startincrementmaximum))


    trend_indicator_1 get_trend_status(sar_1)
    trend_indicator_2 get_trend_status(sar_2)
    trend_indicator_3 get_trend_status(sar_3)
    trend_indicator_4 get_trend_status(sar_4)
    trend_indicator_5 get_trend_status(sar_5)
    trend_indicator_6 get_trend_status(sar_6)
    trend_indicator_7 get_trend_status(sar_7)
    trend_indicator_8 get_trend_status(sar_8)
    trend_indicator_9 get_trend_status(sar_9)
    trend_indicator_10 get_trend_status(sar_10)

    if 
    tf1 == "60"
        
    tf1 := "1H"
    if tf1 == "120"
        
    tf1 := "2H"
    if tf1 == "180"
        
    tf1 := "3H"
    if tf1 == "240"
        
    tf1 := "4H"

    if tf2 == "60"
        
    tf2 := "1H"
    if tf2 == "120"
        
    tf2 := "2H"
    if tf2 == "180"
        
    tf2 := "3H"
    if tf2 == "240"
        
    tf2 := "4H"

    if tf3 == "60"
        
    tf3 := "1H"
    if tf3 == "120"
        
    tf3 := "2H"
    if tf3 == "180"
        
    tf3 := "3H"
    if tf3 == "240"
        
    tf3 := "4H"

    if tf4 == "60"
        
    tf4 := "1H"
    if tf4 == "120"
        
    tf4 := "2H"
    if tf4 == "180"
        
    tf4 := "3H"
    if tf4 == "240"
        
    tf4 := "4H"

    if tf5 == "60"
        
    tf5 := "1H"
    if tf5 == "120"
        
    tf5 := "2H"
    if tf5 == "180"
        
    tf5 := "3H"
    if tf5 == "240"
        
    tf5 := "4H"

    if tf6 == "60"
        
    tf6 := "1H"
    if tf6 == "120"
        
    tf6 := "2H"
    if tf6 == "180"
        
    tf6 := "3H"
    if tf6 == "240"
        
    tf6 := "4H"

    if tf7 == "60"
        
    tf7 := "1H"
    if tf7 == "120"
        
    tf7 := "2H"
    if tf7 == "180"
        
    tf7 := "3H"
    if tf7 == "240"
        
    tf7 := "4H"

    if tf8 == "60"
        
    tf8 := "1H"
    if tf8 == "120"
        
    tf8 := "2H"
    if tf8 == "180"
        
    tf8 := "3H"
    if tf8 == "240"
        
    tf8 := "4H"

    if tf9 == "60"
        
    tf9 := "1H"
    if tf9 == "120"
        
    tf9 := "2H"
    if tf9 == "180"
        
    tf9 := "3H"
    if tf9 == "240"
        
    tf9 := "4H"

    if tf10 == "60"
        
    tf10 := "1H"
    if tf10 == "120"
        
    tf10 := "2H"
    if tf10 == "180"
        
    tf10 := "3H"
    if tf10 == "240"
        
    tf10 := "4H"


    //---------------------------------------------------------------------------------------------
    // Update table with trend data
    //---------------------------------------------------------------------------------------------
    if (barstate.islast)
       
        
    table.cell(t01tf1text_color=color.whitetext_size=table_text_size,bgcolor color.rgb(212121))
        
    table.cell(t11text="●"text_color=trend_indicator_1==uptrend_indicator?color.lime:color.red,text_size size.large)
        
    table.cell(t21str.tostring(sar_1"#.##"), text_color=color.whitetext_size=table_text_size,bgcolor color.rgb(212121))

        
    table.cell(t02tf2text_color=color.whitetext_size=table_text_size,bgcolor color.rgb(212121))
        
    table.cell(t12text="●"text_color=trend_indicator_2==uptrend_indicator?color.lime:color.red,text_size size.large)
        
    table.cell(t22str.tostring(sar_2"#.##"), text_color=color.whitetext_size=table_text_size,bgcolor color.rgb(212121))
        
        
    table.cell(t03tf3text_color=color.whitetext_size=table_text_size,bgcolorcolor.rgb(212121))
        
    table.cell(t13text="●"text_color=trend_indicator_3==uptrend_indicator?color.lime:color.red,text_size size.large)
        
    table.cell(t23str.tostring(sar_3"#.##"), text_color=color.whitetext_size=table_text_size,bgcolor color.rgb(212121))

        
    table.cell(t04tf4text_color=color.whitetext_size=table_text_sizebgcolor color.rgb(212121))
        
    table.cell(t14text="●"text_color=trend_indicator_4==uptrend_indicator?color.lime:color.red,text_size size.large)
        
    table.cell(t24str.tostring(sar_4"#.##"), text_color=color.whitetext_size=table_text_size,bgcolor color.rgb(212121))

        
    table.cell(t05tf5text_color=color.whitetext_size=table_text_sizebgcolor color.rgb(212121))
        
    table.cell(t15text="●"text_color=trend_indicator_5==uptrend_indicator?color.lime:color.red,text_size size.large)
        
    table.cell(t25str.tostring(sar_5"#.##"), text_color=color.whitetext_size=table_text_size,bgcolor color.rgb(212121))

        
    table.cell(t06tf6text_color=color.whitetext_size=table_text_size,bgcolor color.rgb(212121))
        
    table.cell(t16text="●"text_color=trend_indicator_6==uptrend_indicator?color.lime:color.red,text_size size.large)
        
    table.cell(t26str.tostring(sar_6"#.##"), text_color=color.whitetext_size=table_text_size,bgcolor color.rgb(212121))

        
    table.cell(t07tf7text_color=color.whitetext_size=table_text_size,bgcolor color.rgb(212121))
        
    table.cell(t17text="●"text_color=trend_indicator_7==uptrend_indicator?color.lime:color.red,text_size size.large)
        
    table.cell(t27str.tostring(sar_7"#.##"), text_color=color.whitetext_size=table_text_size,bgcolor color.rgb(212121))

        
    table.cell(t08tf8text_color=color.whitetext_size=table_text_size,bgcolor =  color.rgb(212121))
        
    table.cell(t18text="●"text_color=trend_indicator_8==uptrend_indicator?color.lime:color.red,text_size size.large)
        
    table.cell(t28str.tostring(sar_8"#.##"), text_color=color.whitetext_size=table_text_size,bgcolor color.rgb(212121))

        
    table.cell(t09tf9text_color=color.whitetext_size=table_text_size,bgcolor =  color.rgb(212121))
        
    table.cell(t19text="●"text_color=trend_indicator_9==uptrend_indicator?color.lime:color.red,text_size size.large)
        
    table.cell(t29str.tostring(sar_9"#.##"), text_color=color.whitetext_size=table_text_size,bgcolor color.rgb(212121))

        
    table.cell(t010tf10text_color=color.whitetext_size=table_text_size,bgcolor =  color.rgb(212121))
        
    table.cell(t110text="●"text_color=trend_indicator_10==uptrend_indicator?color.lime:color.red,text_size size.large)
        
    table.cell(t210str.tostring(sar_10"#.##"), text_color=color.whitetext_size=table_text_size,bgcolor color.rgb(212121))

     
    table.cell(t,0,0,"Periyot",text_color color.white,bgcolor color.rgb(212121))
    table.cell(t,1,0,"Trend",text_color color.white,bgcolor color.rgb(212121))
    table.cell(t,2,0,"Fiyat",text_color color.white,bgcolor color.rgb(212121))

    lookback input.int(5"Line Lookback Period"minval=1)

    //////////////////////////DEVİNASYON İLE SMA HESAPLAMASIDIR///////////////////////
    //@version=6
    bool prices input.bool(true"Signals"group "SAR")
    color col_up input.color(#40c3fb, "", inline = "col", group = "SAR")
    color col_dn input.color(#e040fb, "", inline = "col", group = "SAR")
    float deviation_size input.float(3.5"Deviation"step 0.1group "Deviation Levels")
    color color_na color.new(color.black100)
    color standart_col chart.fg_color

    out88 
    ta.sma(close,40)
    deviation_levels(trend)=>
        
    float dist ta.sma(high-low100)*deviation_size

        
    var lines = array.new<line>(1line(na))
        var 
    labels = array.new<label>(1label(na))

        if 
    trend != trend[1

            for 
    1 to 4
                y 
    trend close+dist*close-dist*i

    bool trend 
    close out88 
    bool trend_up 
    ta.crossover(closeout88) and barstate.isconfirmed
    bool trend_dn 
    ta.crossunder(closeout88) and barstate.isconfirmed

    color trend_col 
    trend col_up col_dn

    if prices
        
    if trend_up
            label
    .new(bar_indexout88"▲\n" str.tostring(close"#,###.####"), style=label.style_label_uptextcolor trend_colcolor color_na)

        if 
    trend_dn
            label
    .new(bar_indexout88str.tostring(close"#,###.####") + "\n▼"style=label.style_label_downtextcolor trend_colcolor color_na)

    //deviation_levels(trend)
    ///////////////DEVİNASYON VE 40 EMA İLE SAR TREND HESAAPLAMASIDIR//////////////////////
    s13 ta.sar(00.10.9)
    lookBack13 input(40)
    multi13 input.float(1title 'Multiplier'minval 0.001maxval 2)
    mean13 ta.ema(s13lookBack13)
    stddev multi13 ta.stdev(s13lookBack13)
    b123 mean13 stddev
    s232 
    mean13 stddev
    meanp 
    plot(mean13title 'Sar Trend'color color.new(color.yellow0))
    //////////////////SAR İLE KANAL ARASI HESAPLAMASIDIR///////////////////////////
    //@version=6

    start1 input(0.)
    increment1 input(0.1)
    maximum1 input(0.9)
    xo input(0.01)
    xpr input(0.01)

    psar 0.0 // PSAR
    af 0.0 // Acceleration Factor
    trend_dir // Current direction of PSAR
    ep 0.0 // Extreme point

    sar_long_to_short trend_dir[1] == and close <= psar[1] * (xo// PSAR switches from long to short and exceeds xo filter
    sar_short_to_long trend_dir[1] == -and close >= psar[1] * (xo// PSAR switches from short to long and exceeds xo filter

    trend_change barstate.isfirst[1] or sar_long_to_short or sar_short_to_long

    // Calculate trend direction
    trend_dir := barstate.isfirst[1] and close[1] > open[1] ? barstate.isfirst[1] and close[1] <= open[1] ? -sar_long_to_short ? -sar_short_to_long nz(trend_dir[1])

    // Calculate  Acceleration Factor
    af := trend_change start1 trend_dir == and high ep[1] or trend_dir == -and low ep[1] ? math.min(maximum1af[1] + increment1) : af[1]

    // Calculate extreme point
    ep := trend_change and trend_dir == high trend_change and trend_dir == -low trend_dir == math.max(ep[1], high * (xpr)) : math.min(ep[1], low * (xpr))

    // Calculate PSAR
    psar := barstate.isfirst[1] and close[1] > open[1] ? low[1] : barstate.isfirst[1] and close[1] <= open[1] ? high[1] : trend_change ep[1] : trend_dir == psar[1] + af * (ep psar[1]) : psar[1] - af * (psar[1] - ep)

    plot(psarstyle plot.style_steplinecolor trend_dir == color.yellow color.blue,title "KANAL",linewidth 1)
    ////////////////////

    start12 input(0.)
    increment12 input(0.01)
    maximum12 input(0.9)
    xo12 input(0.01)
    xpr12 input(0.01)

    psar12 0.0 // PSAR
    af12 0.0 // Acceleration Factor
    trend_dir12 // Current direction of PSAR
    ep12 0.0 // Extreme point

    sar_long_to_short12 trend_dir12[1] == and close <= psar12[1] * (xo12// PSAR switches from long to short and exceeds xo filter
    sar_short_to_long12 trend_dir12[1] == -and close >= psar12[1] * (xo12// PSAR switches from short to long and exceeds xo filter

    trend_change12 barstate.isfirst[1] or sar_long_to_short12 or sar_short_to_long12

    // Calculate trend direction
    trend_dir12 := barstate.isfirst[1] and close[1] > open[1] ? barstate.isfirst[1] and close[1] <= open[1] ? -sar_long_to_short12 ? -sar_short_to_long12 nz(trend_dir12[1])

    // Calculate  Acceleration Factor
    af12 := trend_change12 start12 trend_dir12 == and high ep12[1] or trend_dir12 == -and low ep12[1] ? math.min(maximum12af12[1] + increment12) : af12[1]

    // Calculate extreme point
    ep12 := trend_change12 and trend_dir12 == high trend_change12 and trend_dir12 == -low trend_dir12 == math.max(ep12[1], high * (xpr12)) : math.min(ep12[1], low * (xpr12))

    // Calculate PSAR
    psar12 := barstate.isfirst[1] and close[1] > open[1] ? low[1] : barstate.isfirst[1] and close[1] <= open[1] ? high[1] : trend_change12 ep12[1] : trend_dir12 == psar12[1] + af12 * (ep12 psar12[1]) : psar12[1] - af12 * (psar12[1] - ep12)

    plot(psar12style plot.style_steplinecolor trend_dir12 == color.yellow color.blue,title "KANAL",linewidth 1)

    /////////////////// 
    16.07.2024 - 10.12.2024

  8. PHP Code:
    //@version=6
    indicator('...'overlay truemax_bars_back 100)
    renk input(true)
    //////başlangıç ve imza kısmıdır.////////////////
    a1 ta.sar(0.0.0430.34)
    a2 ta.sar(0.10.0.34)
    a3 ta.sar(0.10.010.5)
    a5 ta.sar(0.0.040.4)
    a6 ta.sar(0.0.030.3)
    a7 ta.sar(0.0.020.2)
    a8 ta.sar(0.0.010.1)


    plot(a1title='6'style=plot.style_steplinecolor=renk a1 close color.rgb(2473300) : color.rgb(24250400) : color.silverlinewidth=1)
    plot(a2title='4'style=plot.style_steplinecolor=renk a2 close color.rgb(2473300) : color.rgb(24250400) : color.silverlinewidth=1)
    plot(a3title '1'style plot.style_steplinecolor renk a3 close color.rgb(2473300) : color.rgb(24250400) : color.silverlinewidth 1)
    plot(a5title '2'style plot.style_steplinecolor renk a5 close color.rgb(2473300) : color.rgb(24250400) : color.silverlinewidth 1)
    plot(a6title='5'style=plot.style_steplinecolor=renk a6 close color.rgb(2473300) : color.rgb(24250400) : color.silverlinewidth=1)
    plot(a7title '3'style plot.style_steplinecolor renk a7 close color.rgb(2473300) : color.rgb(24250400) : color.silverlinewidth 1)
    plot(a8title='0'style=plot.style_steplinecolor=renk a8 close color.rgb(2473300) : color.rgb(24250400) : color.silverlinewidth=1)
    ////////////////////
    //@version=6
    UV ta.sar(0.0.10.9)
    OV ta.sar(0.0.10.1)
    OV1 ta.sar(00.010.9)

    plot(UVtitle '1,Döngü'style plot.style_circlescolor renk UV close color.red color.lime color.silverlinewidth 2)
    plot(OVtitle '2.Döngü'style plot.style_circlescolor renk OV close color.red color.lime color.silverlinewidth 2)
    plot(OV1title '3.Döngü'style plot.style_circlescolor renk OV1 close color.red color.lime color.silverlinewidth 2
    16.07.2024 - 10.12.2024

Sayfa 291/291 İlkİlk ... 191241281289290291

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
  •