traduzione codice Donchian Volatility

Forums ProRealTime forum Italiano Supporto ProBuilder traduzione codice Donchian Volatility

Viewing 3 posts - 1 through 3 (of 3 total)
  • #232658

    Buongiorno,

    sono a chiedere cortese traduzione del codice in oggetto che analizza la larghezza del canale di donchian come indicatore di volatilità dell’asset.

    Mi sembra interessante.

    Grazie dell’aiuto

    https://it.tradingview.com/script/UYVkIXD3-Donchian-Volatility-Indicator-Adaptive-Channel-Width/

    // 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(“Donchian Volatility Indicator – Adaptive Channel Width”, overlay=false)

    // Calculation Inputs
    length = input.int(50, “Lookback Period for Donchian Channel”)
    atrPeriod = input.int(14, “ATR Period”)
    atrMultiplier = input.float(2.0, “ATR Multiplier”)
    lookbackPeriod = input.int(250, “Lookback Period for Extremes”)
    signalPeriod = input.int(50, “Length of Signal Line”)

    // Calculate ATR
    atr = ta.atr(length = atrPeriod)

    // Calculate Upper and Lower Channels
    upperChannel = ta.highest(high, length) + atr * atrMultiplier
    lowerChannel = ta.lowest(low, length) – atr * atrMultiplier

    // Calculate Channel Width
    channelWidth = upperChannel – lowerChannel

    // Signal Line
    signalLine = ta.sma(channelWidth, signalPeriod)

    // Plotting
    plot(channelWidth, color=color.maroon, linewidth=4, title=”Channel Width”)
    plot(signalLine, color=color.aqua, linewidth=4, title=”Signal Line”)

    // Bar Color
    barC = channelWidth > signalLine ? color.lime : color.fuchsia
    barcolor(barC)

    // Background Color
    bgcolor(barC, transp=80)

    #232698

    Hola qui hai il codice:

    1 user thanked author for this post.
    #232703

    Grazie e mille!!!!

Viewing 3 posts - 1 through 3 (of 3 total)

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