PROTECTED SOURCE SCRIPT

ADX and DI by MiG

31
This Pine Script calculates and plots the ADX (Average Directional Index) and its components, DI+ and DI-, which are part of the Directional Movement Index (DMI) system. The indicator helps traders assess trend strength and direction.

len: the period used for smoothing calculations (default 14).
th: threshold line for ADX (default 20) to visually indicate weak vs. strong trends.
True Range (TR): Measures the most extreme price movement between consecutive bars.

Directional Movement Plus (DM+): Measures upward movement; non-zero only if the current high is higher than the previous high and exceeds downward movement.

Directional Movement Minus (DM-): Measures downward movement; non-zero only if the current low is lower than the previous low and exceeds upward movement.

• DIPlus and DIMinus are the smoothed Directional Indicators (percentage form).
• DX measures the relative difference between DI+ and DI- as a percentage.
• ADX is the smoothed average of DX, representing trend strength:
• ADX > threshold → strong trend
• ADX < threshold → weak or no trend

إخلاء المسؤولية

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