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에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.