Traduzione codice TW Dtosc MTF support

Forums ProRealTime forum Italiano Supporto ProBuilder Traduzione codice TW Dtosc MTF support

Viewing 1 post (of 1 total)
  • #245873

    Buongiorno,

     

    mi piacerebbe testare indicatore in oggetto, ovvero una versione Dtosc (presente in libreria) a cui è stato implementato un indicatore a istogramma che sembra molto utile a filtrare i vari incroci, essendo se ho capito bene settato su un timefrime diverso .

     

    Grazie come sempre.

    https://www.tradingview.com/script/Buc4eho6-Dynamic-Time-Oscillator-W-MTF-Support/

    //@version=3
    study(title = “Dynamic Time Oscillator”, shorttitle=”DTosc”)

    // Traditional Candlestick Values
    sClose = security(tickerid, period, close)

    // Inputs
    // RSI – Current Timefram
    int_RSIPeriod = input(type = integer, defval = 13, title = “Current Timeframe RSI Period”)
    // Stoch – Current Timeframe
    int_StochPeriod = input(type = integer, defval = 8, title = “Current Timeframe Stoch Period”)
    int_SmoothK = input(type = integer, defval = 5, title = “Current Timeframe SmoothK Period”)
    int_SmoothD = input(type = integer, defval = 5, title = “Current Timeframe SmoothD Period”)

    // MTF Switch and Timeframe Selection
    bool_MTFUse = input(type = bool, defval = true, title = “Use MTF Timeframe Overlay?”)
    resolution_MTFPeriod = input(type = resolution, defval = “D”, title = “Higher Timeframe Resoltion (Use higher timefram than your main chart)”)
    // RSI – Higher Timeframe
    int_HTFRSIPeriod = input(type = integer, defval = 13, title = “Higher Timeframe RSI Period”)
    // Stoch – Higher Timeframe
    int_HTFStochPeriod = input(type = integer, defval = 8, title = “Higher Timeframe Stoch Period”)
    int_HTFSmoothK = input(type = integer, defval = 5, title = “Higher Timeframe SmoothK Period”)
    int_HTFSmoothD = input(type = integer, defval = 5, title = “Higher Timeframe SmoothD Period”)

    // Calculations
    // Current Chart Period
    int_RSI = rsi(sClose, int_RSIPeriod)
    int_StochRSI = stoch(int_RSI, int_RSI, int_RSI, int_StochPeriod)
    ma_StochK = sma(int_StochRSI, int_SmoothK)
    ma_StochD = sma(ma_StochK, int_SmoothD)
    // HTF Chart Period
    HTF_Close = security(tickerid, resolution_MTFPeriod, close)
    int_HTFRSI = security(tickerid, resolution_MTFPeriod, rsi(HTF_Close, int_HTFRSIPeriod))
    int_HTFStochRSI = security(tickerid, resolution_MTFPeriod, stoch(int_HTFRSI, int_HTFRSI, int_HTFRSI, int_HTFStochPeriod))
    ma_HTFStochK = security(tickerid, resolution_MTFPeriod, sma(int_HTFStochRSI, int_HTFSmoothK))
    ma_HTFStochD = security(tickerid, resolution_MTFPeriod, sma(ma_HTFStochK, int_HTFSmoothD))

    // Draw Out
    hline(75, color = red, title = “Overbought Level”)
    hline(25, color = green, title = “Oversold Level”)

    // Current Chart Period
    plot(ma_StochK, color = aqua, transp = 0, title = “Stoch Fast”)
    plot(ma_StochD, linewidth = 2, color = purple, transp = 0, title = “Stoch Slow”)
    // HTF Chart Period
    plot(bool_MTFUse == true ? ma_HTFStochK : na, style = columns, color = ma_HTFStochK > ma_HTFStochD ? green : red, transp = 70, title = “Higher TimeFrame”)
    //plot(ma_HTFStochK, style = linebr, color = white, transp = 0)

     

Viewing 1 post (of 1 total)

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