Sayfa 202/295 İlkİlk ... 102152192200201202203204212252 ... SonSon
Arama sonucu : 2353 madde; 1,609 - 1,616 arası.

Konu: Tradingview

  1. önceki tasarımla....beraber görüntü...

    https://www.tradingview.com/x/IhnXkJfX/
    https://www.tradingview.com/x/bBmfMqgS/

    https://www.tradingview.com/x/QCTFnIQ5/
    gap koduyla beraber bakılınca....

    genellikle...bıraktığı gapları doldurma eğilimi yüksek....
    16.07.2024 - 10.12.2024

  2. az işlem açan....
    strateji ile birleşmiş görüntü...
    https://www.tradingview.com/x/8an6uh54/


    PHP Code:
     //@version=5
    strategy(title='Moonhub Cycle Index'shorttitle='*'overlay=true,max_lines_count 100)

    // Input parameters
    len_DIema input.int(5minval=1title='COEMA Length')
    len_DIsma input.int(20minval=1title='COSMA Length')
    start1 input(0)
    increment1 input(0.1)
    maximum1 input(1"Max Value")
    out1 ta.sar(start1increment1maximum1)
    start2 input(0)
    increment2 input(0.01)
    maximum2 input(0.1"Max Value")
    out2 ta.sar(start2increment2maximum2)
    start3 input(0.1)
    increment3 input(0.1)
    maximum3 input(0.1"Max Value")
    out3 ta.sar(start3increment3maximum3)
    // Create a custom index
    index = (out1 out2 out3) / 3

    // Calculate COEMA and COSMA for the Custom Index
    DI_index_Co_E ta.ema(indexlen_DIema)
    DI_Co_indexS ta.sma(indexlen_DIsma)

    // Plot the index
    plot(indextitle='Index'color=color.new(#ff5252, 100), linewidth=2)
    plot(DI_index_Co_Etitle='5EMA'color=color.new(#2195f3, 100), linewidth=2)
    plot(DI_Co_indexStitle='20SMA'color=color.new(#4caf4f, 100), linewidth=2)

    changebarcol input.bool(truetitle='Change Bar Color'inline='bcol')
    bcolup input.color(color.rgb(10324376), title=''inline='bcol')
    bcoldn input.color(color.rgb(2487878), title=''inline='bcol')

    var 
    color lastBarColor na
    BullishColor 
    input.color(color.rgb(12524777))
    BearishColor input.color(color.rgb(2457676))
    barColorBasedOnDEMATrend close out1 and close out2 and close out3    BullishColor close out1 and close out2 and close out3  BearishColor nz(lastBarColor[1])
    lastBarColor := barColorBasedOnDEMATrend
    //barcolor(color=changebarcol ? barColorBasedOnDEMATrend : na)

    xa ta.crossover(close,out1) and  ta.crossover(close,out2) and  ta.crossover(close,out3)
    ys ta.crossunder(close,out1) and ta.crossunder(close,out2) and ta.crossunder(close,out3)
    in_b ta.barssince(xa)[1] < ta.barssince(ys)[1]
    in_s ta.barssince(ys)[1] < ta.barssince(xa)[1]

    if 
    xa
        strategy
    .entry("Long",strategy.long)
    if 
    ys
        strategy
    .close("Long")
    ///////////////////////////////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © HoanGhetti

    //@version=5

    input_lookback  input.int(defval 5title 'Lookback Range'minval 5)
    input_extend1    input.string(defval 'None'title 'Extend'options = ['None''Right''Left''Both'])
    input_width     input.int(defval 1title 'Width'minval 0)
    input_labels    input.bool(defval truetitle 'Labels'inline 'Labels')
    input_offset    input.int(defval 5title '| Offset Right'inline 'Labels')
    input_prices    input.bool(defval truetitle 'Prices'tooltip 'Prints the price of the level next to the retracement level.')
    input_bullColor input.color(defval color.greentitle 'Bull'inline 'color')
    input_bearColor input.color(defval color.redtitle 'Bear'inline 'color')
    input_trendline input.bool(defval truetitle 'Use Trendline'group 'Levels')
    input_use236    input.bool(defval falsetitle ''inline '0'group 'Levels')
    input_236       input.float(defval 0.236title ''inline '0'group 'Levels'step 0.01)
    input_use382    input.bool(defval falsetitle ''inline '382'group 'Levels')
    input_382       input.float(defval 0.382title ''inline '382'group 'Levels'step 0.01)
    input_use5      input.bool(defval truetitle ''inline '382'group 'Levels')
    input_5         input.float(defval 0.5title ''inline '382'group 'Levels'step 0.01)
    input_use618    input.bool(defval falsetitle ''inline '618'group 'Levels')
    input_618       input.float(defval 0.618title ''inline '618'group 'Levels'step 0.01)
    input_use786    input.bool(defval falsetitle ''inline '618'group 'Levels')
    input_786       input.float(defval 0.786title ''inline '618'group 'Levels'step 0.01)

    exType = switch input_extend1
        
    'None' => extend.none
        
    'Right' => extend.right
        
    'Left' => extend.left
        
    'Both' => extend.both

    pl1 
    fixnan(ta.pivotlow(input_lookbackinput_lookback))
    ph1 fixnan(ta.pivothigh(input_lookbackinput_lookback))
    plC ta.barssince(ta.change(pl1))
    phC ta.barssince(ta.change(ph1))

    var 
    string dir na
    since 
    phC plC plC input_lookback phC input_lookback
    if ta.change(ph1) or ta.crossunder(lowpl1)
        
    dir := 'bear'
    if ta.change(pl1) or ta.crossover(highph1)
        
    dir := 'bull'
    col dir == 'bull' input_bullColor input_bearColor

    getOuter
    (pivotsrc) =>
        var 
    srcValue src
        
    if ta.change(pivot)
            
    srcValue := pivot
        
    if pivot == ph1 src srcValue src srcValue
            srcValue 
    := src
        
    [srcValue]

    [
    h] = getOuter(ph1high)
    [
    l] = getOuter(pl1low)

    calcFib(float lofloat hifloat perc) => dir == 'bull' lo - (lo hi) * perc hi - (hi lo) * perc

    levelsArr 
    = array.from(0input_use236 input_236 nainput_use382 input_382 nainput_use5 input_5 nainput_use618 input_618 nainput_use786 input_786 na1)
    var 
    trendline  line.new(nanananastyle line.style_dottedwidth input_width)
    var 
    innerLines = array.new<line>()
    for 
    0 to 6
        
    if innerLines.size() < 7
            innerLines
    .push(line.new(nanananawidth input_width))
        
    innerLines.get(i).set_xy1(bar_index sincecalcFib(lhlevelsArr.get(i)))
        
    innerLines.get(i).set_xy2(bar_indexcalcFib(lhlevelsArr.get(i)))
        
    innerLines.get(i).set_color(col)
        
    innerLines.get(i).set_extend(exType)
        if 
    input_labels
            
    var labelArray = array.new<label>()
            if 
    labelArray.size() < 7
                labelArray
    .push(label.new(nananastyle label.style_none))
            
    labelArray.get(i).set_xy(bar_index input_offsetcalcFib(lhlevelsArr.get(i)))
            
    labelArray.get(i).set_text(str.tostring(levelsArr.get(i)) + (input_prices ' (' str.tostring(calcFib(lhlevelsArr.get(i)), format.mintick) + ')' na))
            
    labelArray.get(i).set_textcolor(col)    

    if 
    input_trendline
        
    if dir == 'bull'
            
    trendline.set_xy1(bar_index sincel)
            
    trendline.set_xy2(bar_indexh)
        else
            
    trendline.set_xy1(bar_index sinceh)
            
    trendline.set_xy2(bar_indexl)
    trendline.set_color(col)
    ///////////////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © HoanGhetti

    //@version=5

    import HoanGhetti/SimpleTrendlines/as tl

    input_len       
    input.int(defval 5title 'Pivot Length'minval 1)
    input_pivotType input.string(defval 'Fast'title 'Pivot Type'options = ['Normal''Fast'], tooltip 'Normal: Uses Pine\'s built-in pivot system.\n\nFast: Uses a custom pivot system that tracks every reversal.')
    input_repaint   input.bool(defval truetitle 'Repainting'tooltip 'If disabled, it will wait for bar confirmation to avoid printing false alerts.')
    input_targets   input.bool(defval truetitle 'Target Levels')
    input_bearC     input.color(defval color.redtitle 'Bear Breakout'group 'Styling')
    input_bullC     input.color(defval color.greentitle 'Bull Breakout'group 'Styling')
    input_extend    input.string(defval extend.nonetitle 'Extend'options = [extend.noneextend.rightextend.leftextend.both], group 'Styling')
    input_style     input.string(defval line.style_dottedtitle 'Trendline Style'options = [line.style_dottedline.style_dashedline.style_solid], group 'Styling')
    input_tstyle    input.string(defval line.style_dashedtitle 'Target Style'options = [line.style_dottedline.style_dashedline.style_solid], group 'Styling')
    input_override  input.bool(defval truetitle 'Override Source'group 'Override'tooltip 'Overriding the source will allow the script to create trendlines on any specified source.')
    input_useSrc    input.bool(defval truetitle 'Use Source for Cross Detection'group 'Override'tooltip 'Instead of checking if the close value crossed trendline, check for the specified source.')
    input_source    input.source(defval lowtitle 'Source'group 'Override')

    pl fixnan(ta.pivotlow(input_override input_source lowinput_pivotType == 'Normal' input_len 1input_len))
    ph fixnan(ta.pivothigh(input_override input_source highinput_pivotType == 'Normal' input_len 1input_len))

    pivot(float pType) =>
        
    pivot pType == pl pl ph
        xAxis 
    ta.valuewhen(ta.change(pivot), bar_index0) - ta.valuewhen(ta.change(pivot), bar_index1)
        
    prevPivot ta.valuewhen(ta.change(pivot), pivot1)
        
    pivotCond ta.change(pivot) and (pType == pl pivot prevPivot pivot prevPivot)
        
    pData tl.new(x_axis xAxisoffset input_lenstrictMode truestrictType pType == pl 1)
        
    pData.drawLine(pivotCondprevPivotpivotinput_override input_source na)
        
    pData

    breakout
    (tl.Trendline thisfloat pType) =>
        var 
    bool hasCrossed false
        
    if ta.change(this.lines.startline.get_y1())
            
    hasCrossed := false
        this
    .drawTrendline(not hasCrossed)
        
    confirmation not hasCrossed and (input_repaint not hasCrossed barstate.isconfirmed)
        if (
    pType == pl ? (input_override and input_useSrc input_source close) < this.lines.trendline.get_y2() : (input_override and input_useSrc input_source close) > this.lines.trendline.get_y2()) and confirmation
            hasCrossed 
    := true
            this
    .lines.startline.set_xy2(this.lines.trendline.get_x2(), this.lines.trendline.get_y2())
            
    this.lines.trendline.set_xy2(nana)
            
    this.lines.startline.copy()
        
    hasCrossed

    plData 
    pivot(pl)
    phData pivot(ph)

    style(tl.Trendline thiscolor col) =>
        
    this.lines.startline.set_color(col), this.lines.trendline.set_color(col)
        
    this.lines.startline.set_width(2), this.lines.trendline.set_width(2)
        
    this.lines.trendline.set_style(input_style), this.lines.trendline.set_extend(input_extend)
    style(plDatainput_bearC), style(phDatainput_bullC)

    cu breakout(plDatapl)
    co breakout(phDataph)
    plotshape(ta.change(cu) and cu plData.lines.startline.get_y2() : natitle 'Bearish Breakout'style shape.labeldowncolor input_bearCtextcolor color.whitelocation location.abovebartext 'PS')
    plotshape(ta.change(co) and co phData.lines.startline.get_y2() : natitle 'Bullish Breakout'style shape.labelupcolor input_bullCtextcolor color.whitelocation location.belowbartext 'PA')
    alertcondition(ta.change(cu) and cu'Bearish Breakout')
    alertcondition(ta.change(co) and co'Bullish Breakout')

    // Target Levels [v4 Update]
    phData_target tl.new(phData.values.changeInX)
    plData_target tl.new(plData.values.changeInX)
    phData_target.drawLine(ta.change(phData.values.y1) and input_targetsphData.values.y2phData.values.y2)
    plData_target.drawLine(ta.change(plData.values.y1) and input_targetsplData.values.y2plData.values.y2)

    target_style(tl.Trendline thiscolor col) =>
        
    this.lines.startline.set_style(input_tstyle)
        
    this.lines.trendline.set_style(input_tstyle)
        
    this.lines.startline.set_color(col)
        
    this.lines.trendline.set_color(col)
    target_style(plData_targetinput_bearC)
    target_style(phData_targetinput_bullC)
    breakout(phData_targetph)
    breakout(plData_targetpl)
    ///////////////////////
    //@version=5
    grp_CS          "Candlesticks"
    showRanging     input(truetitle="Color consolidation candles"group=grp_CStooltip="Determined by the Range Filter settings as ranging/consolidating mid-range")
    allCandleColor  input(truetitle="Color trending candles"group=grp_CStooltip="Determined by the Range Filter settings as not ranging/consolidating")

    grp_MAIN        "General"
    showRF          input(falsetitle="Show Range Filter"group=grp_MAIN)
    showRFBands     input(falsetitle="Show Range Filter bands"group=grp_MAIN)

    // Color variables
    grp_THEME "Theme"
    upColor   input.color(color.rgb(0225255), title="Bullish*"group=grp_THEMEtooltip="This will be applied to entry candles, the Range Filter, and the Hull ribbon. These are not always technically bullish candles, but rather derive their logic from the Range Filter bar coloring instead of OHLC values.")
    downColor input.color(color.rgb(2262107), title="Bearish*"group=grp_THEMEtooltip="This will be applied to entry candles, the Range Filter, and the Hull ribbon. These are not always technically bearish candles, but rather derive their logic from the Range Filter bar coloring instead of OHLC values.")
    midColor  input.color(color.orangetitle="Consolidation candle"group=grp_THEMEtooltip="Determined by the Range Filter settings as ranging")


    //=Range Filter
    //==================================================================================================================================

    grp_RF "Range Filter"
    src input(defval=hl2title="Source"group=grp_RF)
    per input.int(defval=27minval=1title="Sampling Period"group=grp_RF)
    mult input.float(defval=2.7minval=0.1title="Range Multiplier"group=grp_RF)

    // Smooth Average Range
    smoothrng(xtm) =>
        
    wper 1
        avrng 
    ta.ema(math.abs(x[1]), t)
        
    smoothrng ta.ema(avrngwper) * m
        smoothrng
    smrng 
    smoothrng(srcpermult)

    // Range Filter
    rngfilt(xr) =>
        
    rngfilt x
        rngfilt 
    := nz(rngfilt[1]) ? nz(rngfilt[1]) ? nz(rngfilt[1]) : 
           
    nz(rngfilt[1]) ? nz(rngfilt[1]) : r
        rngfilt
    filt 
    rngfilt(srcsmrng)

    // Filter Direction
    upward 0.0
    upward 
    := filt filt[1] ? nz(upward[1]) + filt filt[1] ? nz(upward[1])
    downward 0.0
    downward 
    := filt filt[1] ? nz(downward[1]) + filt filt[1] ? nz(downward[1])


    // Colors
    filtcolor upward upColor downward downColor midColor

    barcolor 
    src filt and src src[1] and upward ? (allCandleColor upColor na) :
       
    src filt and src src[1] and upward ? (allCandleColor upColor na) : 
       
    src filt and src src[1] and downward ? (allCandleColor downColor na) : 
       
    src filt and src src[1] and downward ? (allCandleColor downColor na) : (showRanging midColor na)

    isUpColor src filt and src src[1] and upward true :
       
    src filt and src src[1] and upward true false

    isDownColor 
    src filt and src src[1] and downward true 
       
    src filt and src src[1] and downward true false

    isOrange 
    src filt and src src[1] and upward na :
       
    src filt and src src[1] and upward na 
       
    src filt and src src[1] and downward na 
       
    src filt and src src[1] and downward na true

    filtplot 
    plot(filtcolor=filtcolorlinewidth=1title="Range Filter"display=(showRF display.all display.none))

    barcolor(barcolor)

    ////////////////////////// 
    denemek isteyenler için kod....
    16.07.2024 - 10.12.2024


  3. https://tr.tradingview.com/v/Q95qqFgC/ kod.... görüntü... https://www.tradingview.com/x/kotnb7al/

    https://tr.tradingview.com/v/BgC5o5F9/ görüntü...https://www.tradingview.com/x/7lPfoRSw/

    https://tr.tradingview.com/v/GtWKHvJB/ görüntü... https://www.tradingview.com/x/QlqnvQ9s/

    https://tr.tradingview.com/v/YBPV8OiX/ görüntü... https://www.tradingview.com/x/dI3BSep0/


    hepsini 12-25 uzunluk ile kombine edersek.....

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

    //@version=5
    strategy('*'overlay=true,explicit_plot_zorder=true)

    // Variables
    var ok 0
    var countBuy 0
    var countSell 0
    src 
    input(closetitle='OHLC Type')
    i_fastEMA input(12title='Fast EMA')
    i_slowEMA input(25title='Slow EMA')
    i_defEMA input(25title='Consolidated EMA')

    // Allow the option to show single or double EMA
    i_bothEMAs input(title='Show Both EMAs'defval=true)

    // Define EMAs
    v_fastEMA ta.ema(srci_fastEMA)
    v_slowEMA ta.ema(srci_slowEMA)
    v_biasEMA ta.ema(srci_defEMA)

    // Color the EMAs
    emaColor v_fastEMA v_slowEMA color.rgb(7617579100) : v_fastEMA v_slowEMA color.rgb(2558282100) : #FF530D

    // Plot EMAs
    plot(i_bothEMAs na v_biasEMAcolor=emaColorlinewidth=3title='Consolidated EMA')
    plot(i_bothEMAs v_fastEMA natitle='12EMA'color=emaColor)
    plot(i_bothEMAs v_slowEMA natitle='25EMA'color=emaColor)

    // Colour the bars
    buy v_fastEMA v_slowEMA
    sell 
    v_fastEMA v_slowEMA

    if buy
        countBuy 
    += 1
        countBuy

    if buy
        countSell 
    := 0
        countSell

    if sell
        countSell 
    += 1
        countSell

    if sell
        countBuy 
    := 0
        countBuy

    buysignal 
    countBuy and countBuy and countSell and buy and not buy[1]
    sellsignal countSell and countSell and countBuy and sell and not sell[1]

    barcolor(buysignal color.green na)
    barcolor(sellsignal color.red na)

    // Plot Bull/Bear

    //plotshape(buysignal, title='Bull', text='Bull', style=shape.triangleup, location=location.belowbar, color=color.new(color.green, 0), textcolor=color.new(color.black, 0), size=size.tiny)
    //plotshape(sellsignal, title='Bear', text='Bear', style=shape.triangledown, location=location.abovebar, color=color.new(color.red, 0), textcolor=color.new(color.black, 0), size=size.tiny)

    bull countBuy 1
    bear 
    countSell 1

    barcolor
    (bull color.yellow na)
    barcolor(bear color.blue na)
    /////////////////
    start input(0)
    increment input(0.01)
    maximum input(1"Max Value")
    out ta.sar(startincrementmaximum)
    plot(out"ParabolicSAR"style=plot.style_crosscolor=#f809ec)

    //Inputs
    lengthMA input(25'Length DR'inline='Inp'group='Input')
    color green input(#00e677f6, inline='Col', group='Color')
    color red input(#ff5252, inline='Col', group='Color')
    color gray =input(#787b86, inline='Col', group='Color')

    // Function
    dyn_rea(outlen) =>
        var 
    smma 0.0
        h 
    ta.ema(outlen)
        
    smma := na(smma[1]) ? : (smma[1] * (len 1) + out) / len
        smma

    // Calculation
    hi=dyn_rea(highlengthMA)
    lo=dyn_rea(lowlengthMA)
    mi=(hi-lo)/2+lo

    // Plots
    //a=plot(hi,"", hlc3>hi?green:hlc3<lo?red:gray)
    //b=plot(lo,"", hlc3>hi?green:hlc3<lo?red:gray)
    c=plot(mi,""hlc3>hi?green:hlc3<lo?red:gray)
    //fill(a,b,hlc3>hi?color.new(green,60):hlc3<lo?color.new(red,60):color.gray)
    ////////////////
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © MirNader_

    //@version=5

    //Input & Swing Detection
    // Define the input "swingLength" for the number of candles to look back for Swing detection
    int swingLength         input.int(20'Lookback Period' minval tooltip "Determines the length of bullish and bearish swings in the market")

    // Set the line color for bullish trend
    color swingcolorBullish input.color(color.green'Bullish Line' inline '01' tooltip "This line represents the trend direction. Green color indicates a bullish trend and red color indicates a bearish trend")

    // Set the line color for bearish trend
    color swingcolorBearish input.color(color.red  'Bearish Line' inline '01' tooltip "This line represents the trend direction. Green color indicates a bullish trend and red color indicates a bearish trend")

    //End of Input & Swing Detection
    //------------------------------\\
    //Swing Detection Function
    // The "detectSwing" function will calculate the swing highs and lows for the given number of candles
    detectSwing(swingPeriod) =>
    // Initialize the "currentSwingState" variable, which will be used to determine the swing state (0 for swing high, 1 for swing low)
        
    var currentSwingState 0

    // Calculate the highest high and lowest low for the given number of candles
        
    highestSwing ta.highest(swingPeriod)
        
    lowestSwing ta.lowest(swingPeriod)

        
    // Determine the swing state based on the current candle high and low compared to the highest high and lowest low
        
    currentSwingState := high[swingPeriod] > highestSwing low[swingPeriod] < lowestSwing currentSwingState[1]

        
    // If the current candle is a swing high and the previous candle was not a swing high, set "currentSwingTop" to the current candle high
        
    currentSwingTop currentSwingState == and currentSwingState[1] != high[swingPeriod] : 0
        
    // If the current candle is a swing low and the previous candle was not a swing low, set "currentSwingBottom" to the current candle low
        
    currentSwingBottom currentSwingState == and currentSwingState[1] != low[swingPeriod] : 0

        
    // Return the calculated swing high and swing low values
        
    [currentSwingTopcurrentSwingBottom]

    //End of Swing Detection 
    //------------------------------\\
    //Parameters
    // Initialize the "trendDirection" variable, which will keep track of the trend state (0 for downtrend, 1 for uptrend)
    var trendDirection 0

    // Initialize variables for storing pivot high values
    var swingTopValue 0., var swingTopTimestamp 0

    // Initialize variables for storing pivot low values
    var swingBottomValue 0., var swingBottomTimestamp 0

    // Initialize variables for keeping track of the trailing maximum
    var trailingSwingHigh          high, var trailingSwingLow       low
    var trailingSwingHighTimestamp 0, var trailingSwingLowTimestamp 0

    // Initialize variables for keeping track of pivot crosses
    var topCrossCheck true, var bottomCrossCheck true

    // Call the "detectSwing" function to calculate the swing highs and lows
    [currentSwingTopcurrentSwingBottom] = detectSwing(swingLength)

    //Line Extend
    var line extendingTopLine    na // Initialize a line object for extending the recent top
    var line extendingBottomLine na // Initialize a line object for extending the recent bottom

    //End of Parameters
    //------------------------------\\
    //Pivot High Function
    //The calculation of pivot high is an important step in detecting bullish structures in the market
    if currentSwingTop
    // If a new top is found, set "topCrossCheck" to true
        
    topCrossCheck := true

        
    // Delete the previous extendingTopLine line
        
    line.delete(extendingTopLine[1])
        
    // Create a new extendingTopLine line from the recent top to the last bar
        
    extendingTopLine := line.new(bar_index-swingLengthcurrentSwingTopbar_indexcurrentSwingTopcolor swingcolorBullish)

        
    // Store the pivot high values
        
    swingTopValue := currentSwingTop
        swingTopTimestamp 
    := bar_index swingLength

        
    // Update the trailing maximum values
        
    trailingSwingHigh := currentSwingTop
        trailingSwingHighTimestamp 
    := bar_index swingLength
    //Update the trailing maximum values
    trailingSwingHigh           := math.max(hightrailingSwingHigh)
    trailingSwingHighTimestamp  := trailingSwingHigh == high bar_index trailingSwingHighTimestamp

    //Set the top extension line properties
    if barstate.islast
        line
    .set_xy1(extendingTopLinetrailingSwingHighTimestamptrailingSwingHigh)
        
    line.set_xy2(extendingTopLinebar_index 20trailingSwingHigh)
    //End of Pivot High Function
    //------------------------------\\
    //Pivot Low Function
    //the Pivot low is used to detect the presence of a bearish structure in the price movement and update the trend accordingly.
    if currentSwingBottom
        
    // If a new low is found, set "bottomCrossCheck" to true
        
    bottomCrossCheck := true
        
    //Extend recent bottom to last bar
        
    line.delete(extendingBottomLine[1])
        
    extendingBottomLine := line.new(bar_index swingLengthcurrentSwingBottombar_indexcurrentSwingBottomcolor swingcolorBearish)

        
    //Store the pivot low values
        
    swingBottomValue     := currentSwingBottom
        swingBottomTimestamp 
    := bar_index swingLength

        
    //Update the trailing minimum values
        
    trailingSwingLow          := currentSwingBottom
        trailingSwingLowTimestamp 
    := bar_index swingLength
    //Update the trailing minimum values
    trailingSwingLow          := math.min(lowtrailingSwingLow)
    trailingSwingLowTimestamp := trailingSwingLow == low bar_index trailingSwingLowTimestamp

        
    //Set the bottom extension line properties
    if barstate.islast
        line
    .set_xy1(extendingBottomLinetrailingSwingLowTimestamptrailingSwingLow)
        
    line.set_xy2(extendingBottomLinebar_index 20trailingSwingLow)

    // End of Pivot Low Function
    //------------------------------\\
    // You can use 'trendDirection' for your strategy to identify the uptrend or downtrend
    // This section of code checks if the close price crosses over the trailing maximum value (top_y). 
    // If it does, the top_cross boolean is set to false and the trend is set to 1, indicating a bullish trend.
    //Detect bullish Structure
    if ta.crossover(closeswingTopValue) and topCrossCheck
        topCrossCheck   
    := false
        trendDirection  
    := 1

    // This section of code checks if the close price crosses under the trailing minimum value (btm_y). 
    // If it does, the btm_cross boolean is set to false and the trend is set to -1, indicating a bearish trend.
    // Detect bearish Structure
    if ta.crossunder(closeswingBottomValue) and bottomCrossCheck
        bottomCrossCheck 
    := false
        trendDirection   
    := -1

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

    //@version=5

    // v1.1
    //     

    string  S01     =   'open'
    string  S02     =   'high'
    string  S03     =   'low'
    string  S04     =   'close'
    string  S11     =   'hl2'
    string  S12     =   'hlc3'
    string  S13     =   'ohlc4'
    string  S14     =   'hlcc4'

    string  S51     =   'oc2'
    string  S52     =   'hlc2-o2'
    string  S53     =   'hl-oc2'
    string  S54     =   'cc-ohlc4'

    string  S91     =   '*AUX 1'
    string  S92     =   '*AUX 2'
    string  S93     =   '*TRIGGER'


    string  M00     =   'none'

    string  M01     =   'SMA'
    string  M02     =   'EMA'
    string  M03     =   'WMA'
    string  M04     =   'RMA'
    string  M11     =   'VWMA'
    string  M12     =   'VWEMA'
    string  M13     =   'HMA'
    string  M41     =   'Median'
    string  M42     =   'Mid Range'



    // INPUTS

    auxSource_1     =   input.source    (close,     'Aux 1 ',                                                                                               inline='01')
    auxSource_2     =   input.source    (close,     'Aux 2 ',                                                                                               inline='01')

    triggerSource   =   input.string    ('close',   'Source',           [S01S02S03S04S11S12S13S14S51S52S53S54S91S92],             inline='11',    group='Trigger')
    triggerFilter   =   input.string    ('EMA',     'Filter ',          [M00M01M02M03M04M11M12M13M41M42],                                 inline='12',    group='Trigger')
    triggerLength   =   input.int       (12,         'Length',                   minval=1,                                                                   inline='12',    group='Trigger')

    centreSource    =   input.string    ('hl2',     'Source',           [S01S02S03S04S11S12S13S14S51S52S53S54S91S92S93],        inline='21',    group='Centre')
    centreFilter    =   input.string    ('EMA',     'Filter ',          [M00M01M02M03M04M11M12M13M41M42],                                 inline='22',    group='Centre')
    centreLength    =   input.int       (25,         'Length',                   minval=1,                                                                   inline='22',    group='Centre')


    tslActive       =   input.bool      (true,      'Trailing  ',                                                                                           inline='41',    group='Dynamics')
    tslPercent      =   input.float     (0,         '%',                                                            step=0.1,                               inline='41',    group='Dynamics')

    atrActive       =   input.bool      (true,      'ATR',                                                                                                  inline='42',    group='Dynamics')
    atrLength       =   input.int       (8,         'Length',                   minval=1,                                                                   inline='42',    group='Dynamics')
    atrMult         =   input.float     (1,         'Mult',                                                         step=0.1,                               inline='42',    group='Dynamics')

    iqrActive       =   input.bool      (true,      'IQR',                                                                                                  inline='43',    group='Dynamics')
    iqrLength       =   input.int       (12,        'Length',                   minval=1,                                                                   inline='43',    group='Dynamics')
    iqrMult         =   input.float     (0,         'Mult',                                                         step=0.1,                               inline='43',    group='Dynamics')

    filterSum       =   input.bool      (false,     'Filter Sum',                                                                                           inline='47',    group='Dynamics')

    loMult          =   input.float     (1,         'Side Mult:   Lo',          minval=0,                           step=0.05,                              inline='49',    group='Dynamics')
    hiMult          =   input.float     (1,         'Hi  ',                     minval=0,                           step=0.05,                              inline='49',    group='Dynamics')


    showLostop      =   input.bool      (true,      'LoStop',                                                                                               inline='71',    group='Visual')
    showHistop      =   input.bool      (true,      'HiStop',                                                                                               inline='71',    group='Visual')
    showCentre      =   input.bool      (false,     'Centre',                                                                                               inline='71',    group='Visual')
    showTrigger     =   input.bool      (false,     'Trigger',                                                                                              inline='71',    group='Visual')
    showBands       =   input.bool      (false,     'Bands',                                                                                                inline='71',    group='Visual')

    bullCol         =   input.color     (#5a6e30,   '',                                                                                                     inline='88',    group='Visual')
    bearCol         =   input.color     (#a11030,   '',                                                                                                     inline='88',    group='Visual')
    centreCol       =   input.color     (#58aeb1,   '',                                                                                                     inline='88',    group='Visual')
    triggerCol      =   input.color     (#ccc26d,   '',                                                                                                     inline='88',    group='Visual')
    bandCol         =   input.color     (#6d6969,   '',                                                                                                     inline='88',    group='Visual')

    stopsOpac       =   input.int       (100,       'Opacity: Stops',           minval=0,       maxval=100,         step=5,                                inline='89',    group='Visual')
    otherOpac       =   input.int       (40,        'Other',                    minval=0,       maxval=100,         step=5,                                inline='89',    group='Visual')




    // FUNCTIONS

    source_switch (srcaux1aux2) => 
        
    source          =   switch src
            
    'open'      =>  open
            
    'high'      =>  high
            
    'low'       =>  low
            
    'close'     =>  close
            
    'hl2'       =>  hl2
            
    'hlc3'      =>  hlc3
            
    'ohlc4'     =>  ohlc4
            
    'hlcc4'     =>  hlcc4
            
    'oc2'       =>  (open close) / 2
            
    'hlc2-o2'   =>  (high low close open) / 2
            
    'hl-oc2'    =>  high low - (open close) / 2
            
    'cc-ohlc4'  =>  close ohlc4
            
            
    '*AUX 1'    =>  aux1
            
    '*AUX 2'    =>  aux2
    //

    filter_switch (srclenmode) =>
        
    filter          =   switch mode
            
    'none'      =>  src
            
    'SMA'       =>  ta.sma      (srclen)
            
    'EMA'       =>  ta.ema      (srclen)
            
    'WMA'       =>  ta.wma      (srclen)
            
    'RMA'       =>  ta.rma      (srclen)
            
    'VWMA'      =>  ta.vwma     (srclen)

            
    'Median'    =>  ta.median   (srclen)
            
    'Mid Range' =>  ta.lowest   (srclen)      +   ta.range (srclen) / 2

            
    'VWEMA'     =>  ta.ema      (src volumelen)     /   ta.ema (volumelen)
            
    'HMA'       =>  len >= 2    ?   ta.hma    (srclen)    :   src
    //

    iqr_array (len) =>
        
    float[]   hiArray   =   array.new_float (0)
        
    float[]   loArray   =   array.new_float (0)
        
    float[]   cmArray   =   array.new_float (0)

        for 
    0 to len 1
            
    array.push  (hiArrayhigh[i])
            array.
    push  (loArraylow[i])
            array.
    push  (cmArrayhlcc4[i])

        
    hlArray     =   array.concat (hiArrayloArray)
        
    hlcmArray   =   array.concat (hlArraycmArray)
        
        
    q1          =   array.percentile_linear_interpolation (hlcmArray25)
        
    q3          =   array.percentile_linear_interpolation (hlcmArray75)

        
    iqr         =   (q3 q1) / 2
    //

    trail_blaze (srctsrcclofachifac) =>                                      
        
    lostop      =   0.0
        histop      
    =   0.0
        trend       
    =   0
        
        trend       
    :=  srct histop[1]    ?   1       :   srct lostop[1]        ?   -1      :   nz (trend[1], 1)
        
        
    lostop00    =   trend ==  and trend[1] == -1
        histop00    
    =   trend == -and trend[1] ==  1

        lostop      
    :=  lostop00    ?   srcc lofac    :   srct[1] > lostop[1]     ?   math.max (srcc lofaclostop[1])      :   srcc lofac
        histop      
    :=  histop00    ?   srcc hifac    :   srct[1] < histop[1]     ?   math.min (srcc hifachistop[1])      :   srcc hifac

        
    [lostophistoptrend]
    //



    // PROCESS

    triggerSwitch           =   source_switch (triggerSourceauxSource_1auxSource_2)
    trigger                 =   filter_switch (triggerSwitchtriggerLengthtriggerFilter)

    centreSwitch            =   centreSource == '*TRIGGER'      ?   trigger    :   source_switch (centreSourceauxSource_1auxSource_2)
    centre                  =   filter_switch (centreSwitchcentreLengthcentreFilter)

    tslFactor               =   tslActive       ?   centre  tslPercent 100              :   0
    atrFactor               
    =   atrActive       ?   atrMult ta.atr (atrLength)            :   0
    iqrFactor               
    =   iqrActive       ?   iqrMult iqr_array (iqrLength)         :   0

    sumFactor               
    =   filterSum       ?   ta.swma (nz (tslFactor) + nz (atrFactor) + nz (iqrFactor))      :   nz (atrFactor) + nz (iqrFactor) + nz (tslFactor)  

    loFactor                =   math.max (sumFactor0) * loMult
    hiFactor                
    =   math.max (sumFactor0) * hiMult


    [lostophistoptrend] =   trail_blaze (triggercentreloFactorhiFactor)





    // VISUALS AND ALERTS

    lostopColour    =   color.new (bullCol,     100 stopsOpac)
    histopColour    =   color.new (bearCol,     100 stopsOpac)

    centreColour    =   color.new (centreCol,   100 otherOpac)
    triggerColour   =   color.new (triggerCol,  100 otherOpac)
    bandColour      =   color.new (bandCol,     100 otherOpac)


    plotCentre      =   plot (showCentre    ?   centre                                      :   na,     'Centre',       centreColour,       2)
    plotTrigger     =   plot (showTrigger   ?   trigger                                     :   na,     'Trigger',      triggerColour,      2)

    plotLoband      =   plot (showBands     ?   centre loFactor                           :   na,     'Lo Band',      bandColour,         2)
    plotHiband      =   plot (showBands     ?   centre hiFactor                           :   na,     'Hi Band',      bandColour,         2)

    plotLostop      =   plot (showLostop    ?   trend == 1      ?   lostop  :   na          :   na,     'Lo Stop',      lostopColour,       2,      plot.style_linebr)
    plotHistop      =   plot (showHistop    ?   trend == 1      ?   na      :   histop      :   na,     'Hi Stop',      histopColour,       2,      plot.style_linebr)



    isNewTrend      =   trend != trend[1]
    isNewUp         =   trend ==  1     and trend[1] == -1
    isNewDown       
    =   trend == -1     and trend[1] ==  1

    plotshape       
    (isNewUp    ?   lostop  :   na,     'Long Start',       shape.circle,       location.absolute,      lostopColour,       size=size.tiny)
    plotshape       (isNewDown  ?   histop  :   na,     'Short Start',      shape.circle,       location.absolute,      histopColour,       size=size.tiny)

    alertcondition  (isNewTrend,    '00: Trail Blaze - Direction Change',   'Trail Blaze has changed direction!')
    alertcondition  (isNewDown,     '01: Trail Blaze - Sell',               'SELL SIGNAL:   Trail Blaze Down!')
    alertcondition  (isNewUp,       '02: Trail Blaze - Buy',                'BUY SIGNAL:    Trail Blaze Up!'

    görüntüler....
    https://www.tradingview.com/x/enQ4pcSW/
    https://www.tradingview.com/x/jXep6ehs/
    16.07.2024 - 10.12.2024

  4. strateji denemesi....


    PHP Code:
     // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © chervolino
    // Dynamic Reactor [CHE] indicator displays dynamic support and resistance levels.
    // Green lines represent resistance, red lines represent support, and gray lines represent areas of consolidation.
    // The length of the indicator can be adjusted with the lengthMA input.
    //@version=5
    strategy("Dynamic Reactor [CHE]"shorttitle="*"overlay=true)


    start input(0.1)
    increment input(0.1)
    maximum input(1"Max Value")
    out ta.sar(startincrementmaximum)
    //plot(out, "SAR", style=plot.style_cross, color=#f809ec)

    //Inputs
    lengthMA input(9'Length DR'inline='Inp'group='Input')
    color green input(#00e677f6, inline='Col', group='Color')
    color red input(#ff5252, inline='Col', group='Color')
    color gray =input(#787b86, inline='Col', group='Color')

    // Function
    dyn_rea(outlen) =>
        var 
    smma 0.0
        h 
    ta.sma(outlen)
        
    smma := na(smma[1]) ? : (smma[1] * (len 1) + out) / len
        smma

    // Calculation
    hi=dyn_rea(outlengthMA)
    lo=dyn_rea(outlengthMA)
    mi=(hi-lo)/2+lo

    // Plots
    c=plot(mi,""hlc3>hi?green:hlc3<lo?red:gray)


    start1 input(0.1)
    increment1 input(0.1)
    maximum1 input(1"Max Value")
    out1 ta.sar(start1increment1maximum1)

    //Inputs
    lengthMA1 input(27'Length DR'inline='Inp'group='Input')
    // Function
    dyn_rea1(out1len1) =>
        var 
    smma1 0.0
        h1 
    ta.sma(out1len1)
        
    smma1 := na(smma1[1]) ? h1 : (smma1[1] * (len1 1) + out1) / len1
        smma1

    // Calculation
    hi1=dyn_rea1(out1lengthMA1)
    lo1=dyn_rea1(out1lengthMA1)
    mi1=(hi1-lo1)/2+lo1


    c1
    =plot(mi1,""hlc3>hi?green:hlc3<lo?red:gray)

    xa = (close >mi) and  (close >mi1
    ys = (close <mi) and (close <mi1
    in_b ta.barssince(xa)[1] < ta.barssince(ys)[1]
    in_s ta.barssince(ys)[1] < ta.barssince(xa)[1]


    if 
    xa
        strategy
    .entry("Long",strategy.long)
    if 
    ys
        strategy
    .close("Long"
    16.07.2024 - 10.12.2024

  5. https://tr.tradingview.com/v/j5xkAKCL/
    belirleyeceğiniz 10 şeyi...ema kesişimleri ile
    bulunduğunuz periyotlarda tarama yapar....
    https://www.tradingview.com/x/agwTZNYn/
    16.07.2024 - 10.12.2024

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

    otomatik bayrak bulucu kod....kendi değerlerinizle....
    bayrağı ve direk uzunluğunu...
    belirleyeceğiniz periyot ve uzunlukta bulmanıza yardımcı olur...
    16.07.2024 - 10.12.2024


Sayfa 202/295 İlkİlk ... 102152192200201202203204212252 ... 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
  •