OPEN-SOURCE SCRIPT

[ALERTS] ADX and DI

Updated
The average directional index (ADX) is a technical analysis metric. Analysts use it to determine the relative strength of a trend, with the direction of the trend either upwards or downwards.

The Average Directional Index (ADX) along with the Negative Directional Indicator (-DI) and the Positive Directional Indicator (+DI) are momentum strength indicators that evolved for use in stock trading. Commodities trader J. Welles Wilder pioneered their use. Technical traders who use charting techniques want to know when first spotting a shifting trend how strong that trend is and how likely it is to sustain itself over time. The ADX helps investors determine trend strength as they plan their investment strategies.

Confirmation on a chart and other momentum indicators help investors spot trend reversals. But some trends are more potent than others and investors want to better understand the strength of a trend. The ADX identifies a strong positive trend when the ADX is over 25 and a weak trend when the ADX is below 20. Investors can determine directional movement by analyzing the difference between two consecutive low prices and their correlated highs. The movement is +DM when the current high price, less the previous high price, is greater than the previous low price less the current low. The opposite applies in determining the negative or –DI.

When analyzing charts, stock price is the single most important variable to follow. ADX and other indicators are supplementary to price movements in providing additional directional information and support. For example, some of the best trends come about from price range consolidation. It is those tugs of war between buying and selling volumes that lead to breakouts and other trading opportunities.
The Inventor of the Average Directional Index

J. Welles Wilder, Jr. is a former American engineer and real estate developer who went on to revolutionize trading analysis by applying mathematical systems to the world of investing. In addition to developing the ADX, Wilder is also responsible for several other commonly used technical analysis tools including the Average True Range (ATR), the Relative Strength Index (RSI) and the Parabolic SAR.

https://www.investopedia.com/terms/a/adx.asp

This script has alerts and includes the filter for markets with no trend defined.

Green Alert --> Long
Red Alert --> Short
Yellow Area --> Weak trend. ADX below threshold

Green candles --> Bullish Market
Red Candles --> Bearish Market
Orange candles --> No defined trend


Enjoy!
Release Notes
Made of love
ADXalertautoviewOscillatorsTrend AnalysisVolatility

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer