TradingView
Peter_O
May 2, 2019 2:32 PM

ADX+DMI MTF byPeterO 

Euro Fx/U.S. DollarFXCM

Description

The goal of this study was to use ADX from Higher Timeframe - to determine trend direction

Why? Because ADX is very sensitive, able to show trend ending without any delay, but not in the middle of it.
Being able to see such immediate trend change on higher timeframe, is a great indicator of trend direction.
Adding just security() calls to 'highest', 'lowest' and 'close' didn't seem right, because it produced some ugly ADX, D+ and D- plotlines.
I wanted to see plotlines, which look exactly like those on actual higher timeframe. Therefore I modified the calculations.

You can read more about my take on (not) using security() calls in my other source code indicator RSI MTF: link in comments.

On top of all that, I added interpretation of DMI readings, because it is not as simple as plus>minus + ADXrising = uptrend.
So GREEN background means higher timeframe uptrend and RED background means downtrend.
Comments
Peter_O
You can read more about my take on (not) using security() calls in my other source code indicator RSI MTF: tradingview.com/script/JwWWwZOD-RSI-MTF-by-PeterO/
akafnf
@Peter_O thanks for this script )) just could u pls suggest how to put alert when background color change ? Appreciate
joan241
Well done! Can I use for crypto?
Kelvys
Awesome! Thank you so much for sharing and explaining.
didaskein
Thank you very much ! very nice indicator ! ;-)
Squeaker
In my opinion it should be called an Alternate Time Frame (ATF), not a multi time frame because it is only displaying the TF that is chosen for the MTF value with no comparison view or calculations with other TFs. To improve upon your work I would remove the line plots of the ATF (you call MTF) and add the current ADX-DI and it's line plots. Using a static 50 bar lookback to define trend could be improved by making the lookback =user defined number. I think your use of 20 as the signal line could be improved upon too. According to Investopedia: "If DI+ is above DI-, an ADX reading of 25 or higher indicates a strong uptrend. If DI- is above DI+, an ADX reading of 25 or higher indicates a strong downtrend. Irrespective of whether the trader takes a long or short position, the ADX should be over 25 when the crossover occurs to confirm the trend’s strength. When the ADX is below 20, traders could use trading strategies that exploit range bound or choppier conditions. For example, a trader might find that an ADX reading of 20 provides an earlier indication that the price of a security is trending. Conservative traders may want to wait for readings of 30 or above before employing trend following strategies." For this reason, I would add colors <30=yellow, <25=orange, <20=red or employ a more complicated method of calculating the choppiness of the pair and letting that calculation determine when to change. Still, there are degrees of choppiness so a multi color output may be the best visual. And again, the lookback used in calculating is subjective, but I suppose it could be tied to the user defined lookback of trend. Thank you for the work put into this.

I will put the modifications on my indicator "to-do-list" if one isnt already available but I am a newbie when it comes to coding. I could never have figured out the directional calculations you used! I cant even comprehend them to confirm if they are correct or not.
MadMoto29
Exactly what I was looking for (don't you love it when that happens?). Thanks so much for sharing! =)
misterstealyourgirl
great idea
More