MYNAMEISBRANDON

Average Directional Index Pro

The Average Directional Index (ADX) is a moving average of a range, usually 14 days, that's used to quantify the strength and direction of a trend. ADX values are significant in that lower values indicate a weak to non-existent trend, i.e. ADX=14, whereas an ADX=40 is indicative of a strong trend. Additionally, a weak trend could signal that price has entered in to a consolidation phase. A trader could wait for price to rise or fall out of a supply zone while simultaneously looking for ADX values to climb up and over the 25 level, since the ADX could be strong enough for price to trend after the breakout. As a result, this type of setup could be an excellent entry for a trade. Keep in mind that price is the signal most important value on a chart so it's important to use an indicator like this to confirm a particular bias that you may have.

💥💥💥💥💥

Instead of using a single line as most ADX indicators do, I thought that showing the values in terms of histogram bars would be highly intuitive and provide an interesting visual that would illustrate with varying degrees of color where the strength (or lack thereof) lies at any given time. The following are some of the characteristics that I feel make this script stand out from the pack.

💡Histogram plots. ADX values range from 0-100 and it may seem counterintuitive to see an ADX value below a 0 line. With this approach, I've divided up the ADX values between "bull" and "bear", meaning if an ADX histogram bar is above the 0 line (no matter if the value is 5 or 50), it's because the DMI+ value is ABOVE the DMI- value. Conversely, if the ADX histogram bar is below the 0 line, it's because the DMI- value is ABOVE the DMI+ value. DMI and ADX go hand-in-hand and while DMI values do not play a prominent role here, you'll see their values in the Main Label.

💡Main label. The main label's color will correspond to that of the histogram bar. The DMI and ADX values are listed along with the current price of the asset. Whichever DMI value is higher will be listed ahead of the lower value. In other words, from left to right, you'll see the ADX value followed by the higher of the 2 DMI values followed by the lesser of the 2 DMI values. The ADX value will be followed by an icon showing you if the value is rising or falling. Additionally, the main label has some extras: both buy/sell % on the current chart as well as daily chart along with total volume and average volume for the respective time frames. You can also change the MA lengths for the chart and daily TF averages. Both buy/sell % and total/avg volume values come with their own significant values inputs.

💡Color coded histogram bars dependent on ADX values. A few examples: an ADX value between 30 and 40 when DI+ > DI-, you'll see a dark green bar. Conversely, if the ADX value is > 70 and DI- > DI+, you'll get a dark purple bar. All in all, there's 18 possible colors denoted within the histogram.

💡Momentum arrows. There's 4 colors for the up/down arrows that populate above the histogram bar when DI+ and DI- combined with ADX values are showing extreme values. An example would be when DI+ is between 30 and 50 and ADX is greater than 30, you'll get a green arrow. On the flipside, when DI- is greater than -50 and ADX is greater than 40, you'll see a dark red arrow.

💡ADX and price shown on the histogram. You can choose to have the price and ADX values side by side or on top of one another as well as change the decimal value with a "significant figure" input. You can also opt to have neither value shown. The values will show above or below their respective bar dependent upon if DMI+ or DMI- is the dominant value, which in turn determines if the histogram is above or below the 0 line.

💡Weak trend colors. Any ADX values between 0 to 23 will give varying degrees of black to light gray indicating a weak or no trend. An ADX value of 17 could indicate a weak trend but the value could be rising as buyers push price higher. As the ADX approaches 25, wait for price confirmation (and volume) to validate if momentum could continue.

💡Threshold lines. ADX values above +/- 25-30 tend to show a strengthening of trend and you can choose to include these lines or not in your charts.

💡ADX value follow line. Determined by DMI+ being > or < than DMI-. For instance, if the trend changes and DMI- crosses over DMI+, the follow line will switch to follow the ADX histogram bar as it falls below 0. You can choose to enable/disable this line.

💡Colored bars. You can choose to enable the ADX color schemes to your candles further providing an easy view of the current trend.

💥💥💥💥💥

Remember to use any indicator together with price action to confirm a particular bias you may have! You could also use this indicator in confluence with my Directional Movement Pro script for an extra visual on trend direction and strength.


💥💥💥💥💥

Should you have any questions, feedback etc, please do not hesitate to contact the script's author. My hope is that this indicator becomes an invaluable resource to you and you're able to integrate it in to your everyday trading tool bag to make more informed decisions.

SimpleCryptoLife helped me code up this script and he's been an incredible source of knowledge in my trading journey. Without his patience and pine script expertise, this script would not have been possible!

🆓 Free scripts:
⚡ Pro scripts: www.tradingview.com/script/hESCvPuH-Predictive-Volume-MTF-Pro/
🙋‍♂️ Get help with Pinescript: simplecrypto.life/get-help-with-pinescript
نص برمجي محمي
تم نشر هذا النص البرمجي بمصدر غير مفتوح ويمكنك استخدامه بحرية. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني. لا يمكنك مشاهدة أو تعديل كود المصدر الخاص به.
إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟