Conversione indicatore TW Volatility Compression Breakout

Forums ProRealTime forum Italiano Supporto ProBuilder Conversione indicatore TW Volatility Compression Breakout

Viewing 14 posts - 1 through 14 (of 14 total)
  • #227253

    Buon pomeriggio a tutti.

    Vorrei proporre la conversione dell’indicatore in oggetto di cui riporto script e schermata che ne illustra il funzionamento.

    Mi sembra interessante e protrebbe essere utile.

    Grazie a chi vorrà aiutarmi.

     

     

     

    https://it.tradingview.com/script/Lc8WH9UF-Volatility-Compression-Breakout/

    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © LeafAlgo
    //@version=5
    indicator(“Volatility Compression Breakout”, overlay=true)
    // Volatility Compression Parameters
    compressionPeriod = input(20, “Compression Period”)
    compressionMultiplier = input(1.5, “Compression Multiplier”)
    // Trend Filter Parameters
    emaPeriod = input(50, “EMA Period”)
    // Calculate ATR and Keltner Channels
    atr = ta.atr(14)
    keltnerMiddle = ta.sma(close, compressionPeriod)
    keltnerUpper = keltnerMiddle + (compressionMultiplier * atr)
    keltnerLower = keltnerMiddle – (compressionMultiplier * atr)
    // Calculate Standard Deviation
    stdDev = ta.stdev(close, compressionPeriod)
    // Calculate Trend Filter
    ema = ta.ema(close, emaPeriod)
    // Determine Breakout Conditions
    breakoutUp = high > keltnerUpper + stdDev and close > ema and close[1] <= ema[1]
    breakoutDown = low < keltnerLower – stdDev and close < ema and close[1] >= ema[1]
    // Plot Breakout Shapes
    plotshape(breakoutUp, “Long Entry”, shape.triangleup, location.belowbar, color=color.green, size=size.large)
    plotshape(breakoutDown, “Short Entry”, shape.triangledown, location.abovebar, color=color.red, size=size.large)
    // Color
    kcColor = close > keltnerMiddle ? color.lime : color.fuchsia
    emaColor = close > ema ? color.lime : color.fuchsia
    barC = close > ema and close > keltnerMiddle ? color.lime : close > keltnerMiddle and close < ema ? color.yellow : close < keltnerMiddle and close > ema ? color.yellow : color.fuchsia
    barcolor(barC)
    // Plot Keltner Channels
    plot(keltnerUpper, color=color.aqua, linewidth=2, title=”Keltner Upper”)
    plot(keltnerLower, color=color.aqua, linewidth=2, title=”Keltner Lower”)
    plot(keltnerMiddle, color=kcColor, linewidth=4, title=”Keltner Middle”)
    plot(keltnerUpper + stdDev, color=color.aqua, linewidth=2, title=”Keltner Upper StdDev”)
    plot(keltnerLower – stdDev, color=color.aqua, linewidth=2, title=”Keltner Lower StdDev”)
    // Plot Trend Filter
    plot(ema, color=emaColor, linewidth=4, title=”Trend Filter”)
    // Alerts
    alertcondition(breakoutUp, ‘Long’, “Long”)
    alertcondition(breakoutDown, ‘Short’, ‘Short’)

     

    #227267

     

    1 user thanked author for this post.
    #227292

    Grazie e mille!!!!

    Gentilissimo.

     

    #227293

    Buongiorno

    in allegato una revisione con le stesse varianti colore dell’originale

     

    1 user thanked author for this post.
    #227360

    Ancora grazie!

    #227362

    Credo che le candele verdi siano assenti dal codice?

    #227363

    graphe

    #227367

    buona osservazione! quindi ecco la correzione allegata

    #227375

    Hola Jacques

    Molto meglio, grazie e buona domenica.

    #231490

     

    Bonjour Jacques,

    Est-il possible de créer les screeners UP and DOWN de cet excellent code quand les closes cassent la MA et que dans le même temps apparait le triangle vert ou rouge.

    je joins une image de Forvia avec l’elipse qui correspond à mon souhait.

    bon WE à tous.

     

    #231492

    //Bonjour Voici ce screener :

    CapitaLisationMini=10000
    timeframe (monthly)
    c1=average[20](close*volume)>(CapitaLisationMini*21)
    timeframe (weekly)
    c1=average[20](close*volume)>(CapitaLisationMini*5)
    TIMEFRAME(4 HOUR)
    c1=average[20](close*volume)>(CapitaLisationMini/2.14)
    TIMEFRAME(1 HOUR)
    c1=average[20](close*volume)>(CapitaLisationMini/8.5)
    TIMEFRAME(30 minutes)
    c1=average[20](close*volume)>(CapitaLisationMini/17)
    TIMEFRAME(15 minutes)
    c1=average[20](close*volume)>(CapitaLisationMini/34)
    TIMEFRAME(5 minutes)
    c1=average[20](close*volume)>(CapitaLisationMini/102)
    TIMEFRAME(2 minutes)
    c1=average[20](close*volume)>(CapitaLisationMini/255)
    Timeframe(default)
    c1=average[20](close*volume)>(CapitaLisationMini)
    c1a=high>low
    compressionPeriod =14
    compressionMultiplier = 1.5
    emaPeriod = 50
    atr =AverageTrueRange[14]
    keltnerMiddle = KeltnerBandCenter[compressionPeriod]
    keltnerUpper = keltnerMiddle + (compressionMultiplier * atr)
    keltnerLower = keltnerMiddle – (compressionMultiplier * atr)
    // Calculer l’écart type
    stdDev = STD[compressionPeriod](close)
    // Calculer le filtre de tendance
    ema = ExponentialAverage[emaPeriod](close)
    // Déterminer les conditions de rupture
    Up =(high > (keltnerUpper + stdDev)) and close > ema and close[1] <= ema[1]
    Down = (low < (keltnerLower – stdDev)) and close < ema and close[1] >= ema[1]

    SCREENER[c1 and c1a and (Up or Down)] (up as “up”,down as “down”)

    #231494

    bonjour Jacques,

    Il y a un soucis avec la commande TIMEFRAME ? je travaille en mode “fin de journée” , alors que dois je faire ?

    merci de ton aide

    Bon dimanche

    #231495

    Si je met des // devant les timeframe en minutes et heures j’ai Accor qui ressort, c’est bon comme ça peut-être ?

    #231496

    J’ai testé avec ce code sur le Nasdaq ,  j’ai 23 retours correct en fin de journée, ça marche, merci Jacques

    // VOLATILITY COMPRESSION TRIANGLE UP DW by Jacques Germain 13.04.2024

    CapitaLisationMini=10000

    timeframe (monthly)

    c1=average[20](close*volume)>(CapitaLisationMini*21)

    timeframe (weekly)

    c1=average[20](close*volume)>(CapitaLisationMini*5)

    //TIMEFRAME(4 HOUR)

    //c1=average[20](close*volume)>(CapitaLisationMini/2.14)

    //TIMEFRAME(1 HOUR)

    //c1=average[20](close*volume)>(CapitaLisationMini/8.5)

    //TIMEFRAME(30 minutes)

    //c1=average[20](close*volume)>(CapitaLisationMini/17)

    //TIMEFRAME(15 minutes)

    //c1=average[20](close*volume)>(CapitaLisationMini/34)

    //TIMEFRAME(5 minutes)

    //c1=average[20](close*volume)>(CapitaLisationMini/102)

    //TIMEFRAME(2 minutes)

    //c1=average[20](close*volume)>(CapitaLisationMini/255)

    Timeframe(default)

    c1=average[20](close*volume)>(CapitaLisationMini)

    c1a=high>low

    compressionPeriod =14

    compressionMultiplier = 1.5

    emaPeriod = 50

    atr =AverageTrueRange[14]

    keltnerMiddle = KeltnerBandCenter[compressionPeriod]

    keltnerUpper = keltnerMiddle + (compressionMultiplier * atr)

    keltnerLower = keltnerMiddle – (compressionMultiplier * atr)

    // Calculer l’écart type

    stdDev = STD[compressionPeriod](close)

    // Calculer le filtre de tendance

    ema = ExponentialAverage[emaPeriod](close)

    // Déterminer les conditions de rupture

    Up =(high > (keltnerUpper + stdDev)) and close > ema and close[1] <= ema[1]

    Down = (low < (keltnerLower – stdDev)) and close < ema and close[1] >= ema[1]

    SCREENER[c1 and c1a and (Up or Down)] (up as “up”,down as “down”)

     

    1 user thanked author for this post.
Viewing 14 posts - 1 through 14 (of 14 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login