Traduzione codice TW Dtosc MTF support
Forums › ProRealTime forum Italiano › Supporto ProBuilder › Traduzione codice TW Dtosc MTF support
- This topic has 2 replies, 2 voices, and was last updated 1 week ago by
Msport71.
Viewing 3 posts - 1 through 3 (of 3 total)
-
-
04/14/2025 at 10:08 AM #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/
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647//@version=3study(title = “Dynamic Time Oscillator”, shorttitle=”DTosc”)// Traditional Candlestick ValuessClose = security(tickerid, period, close)// Inputs// RSI – Current Timeframint_RSIPeriod = input(type = integer, defval = 13, title = “Current Timeframe RSI Period”)// Stoch – Current Timeframeint_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 Selectionbool_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 Timeframeint_HTFRSIPeriod = input(type = integer, defval = 13, title = “Higher Timeframe RSI Period”)// Stoch – Higher Timeframeint_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 Periodint_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 PeriodHTF_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 Outhline(75, color = red, title = “Overbought Level”)hline(25, color = green, title = “Oversold Level”)// Current Chart Periodplot(ma_StochK, color = aqua, transp = 0, title = “Stoch Fast”)plot(ma_StochD, linewidth = 2, color = purple, transp = 0, title = “Stoch Slow”)// HTF Chart Periodplot(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)04/18/2025 at 9:19 AM #246062Ecco qui:
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647// Traditional Candlestick ValuessClose = close// Inputs// RSI - Current TimeframintRSIPeriod = 13//"Current Timeframe RSI Period"// Stoch - Current TimeframeintStochPeriod = 8//"Current Timeframe Stoch Period"intSmoothK = 5//"Current Timeframe SmoothK Period"intSmoothD = 5//"Current Timeframe SmoothD Period"// MTF Switch and Timeframe SelectionboolMTFUse = 1//"Use MTF Timeframe Overlay?"intHTFRSIPeriod = 13//"Higher Timeframe RSI Period"// Stoch - Higher TimeframeintHTFStochPeriod = 8//"Higher Timeframe Stoch Period"intHTFSmoothK = 5//"Higher Timeframe SmoothK Period"intHTFSmoothD = 5//"Higher Timeframe SmoothD Period"// Calculationstimeframe(daily,updateonclose)// HTF Chart PeriodHTFClose = closeintHTFRSI = rsi[intHTFRSIPeriod](HTFClose)maxHTFrsi=highest[intHTFStochPeriod](intHTFRSI)minHTFrsi=lowest[intHTFStochPeriod](intHTFRSI)intHTFStochRSI=(intHTFRSI-minHTFrsi)/(maxHTFrsi-minHTFrsi)*100maHTFStochK=average[intHTFSmoothK](intHTFStochRSI)maHTFStochD=average[intHTFSmoothD](maHTFStochK)if maHTFStochK>maHTFStochD thenr=0g=255elser=255g=0endiftimeframe(default)// Current Chart PeriodintRSI=rsi[intRSIPeriod](sClose)maxrsi=highest[intStochPeriod](intRSI)minrsi=lowest[intStochPeriod](intRSI)intStochRSI=(intRSI-minrsi)/(maxrsi-minrsi)*100maStochK=average[intSmoothK](intStochRSI)maStochD=average[intSmoothD](maStochK)return maHTFStochK as "Higher TF"style(histogram)coloured(r,g,0,255*boolMTFUse),25 as "Oversold level", 75 as "Overbought level", maStochK as "Stoch Fast"coloured("aqua"),maStochD as "Stoch Slow" coloured("purple")style(line,2)04/18/2025 at 11:46 AM #246067 -
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
Find exclusive trading pro-tools on
Similar topics: