OPEN-SOURCE SCRIPT
ADX - Globx Options & Futures 2.0

The ADX Globx Options & Futures is a custom-built trend strength indicator designed to replicate and enhance the classic Average Directional Index (ADX) model, commonly used in professional trading platforms such as IQ Option.
This version is optimized for options and futures trading, providing precise directional strength readings through adaptive smoothing and configurable parameters.
Concept and Logic
This indicator measures the strength of the current trend, regardless of its direction (bullish or bearish), by comparing directional movement between price highs and lows over a defined period.
It uses three main components:
+DI (Positive Directional Indicator): represents bullish strength.
–DI (Negative Directional Indicator): represents bearish strength.
ADX (Average Directional Index): measures the intensity of the prevailing trend, independent of direction.
The script follows the original logic proposed by J. Welles Wilder Jr., but introduces enhanced smoothing flexibility.
Users can choose between EMA (Exponential Moving Average) and Wilder’s RMA (Running Moving Average) for both DI and ADX calculations, allowing closer alignment with various platform implementations (IQ Option, MetaTrader, etc.).
How It Works
Directional Movement Calculation
The script computes upward and downward movements (+DM and –DM) by comparing the differences in highs and lows between consecutive candles.
Only positive directional changes that exceed the opposite side are considered.
This ensures each bar contributes only one valid directional movement.
True Range and Smoothing
The True Range (TR) is calculated using ta.tr(true) to include price gaps—replicating how professional derivatives platforms account for volatility jumps.
Both TR and DM values are smoothed using the selected averaging method (EMA or Wilder).
Directional Index and ADX
The smoothed +DI and –DI values are normalized over the True Range to form the Directional Index (DX), which measures the percentage difference between the two.
The ADX is then derived by smoothing the DX values, providing a stable reading of overall market strength.
Visual Representation
The ADX (white line) indicates the overall trend strength.
The +DI (dark blue) and –DI (dark red) lines show which side (bullish or bearish) is currently dominant.
Reference levels at 20 and 25 serve as strength thresholds:
Below 20 → Weak or sideways market.
Above 25 → Strong and directional trend.
Usage and Interpretation
When ADX rises above 25, the market shows a strong trend — use +DI > –DI for bullish confirmation, or the opposite for bearish momentum.
A falling ADX suggests decreasing trend strength and potential consolidation.
The default parameters (ADX Length = 34, DI Length = 34, both smoothed by EMA) match IQ Option’s internal ADX configuration, ensuring consistency between platforms.
Works on any timeframe or asset class, but is especially tuned for futures and options volatility dynamics.
Originality and Improvements
Unlike many open-source ADX indicators, this version:
Recreates IQ Option’s 34-length EMA-based ADX calculation with exact parameter alignment.
Provides selectable smoothing algorithms (EMA or Wilder) to switch between modern and classic formulations.
Uses dark-theme-optimized visuals with fine line weight and subtle contrast for clean visibility.
Maintains constant guide levels (20/25) rendered globally for precision and style compliance in Pine Script v6.
Is fully rewritten for Pine Script v6, ensuring compatibility and optimized execution.
Recommended Use
Combine with trend-following systems or breakout strategies.
Ideal for identifying market strength before engaging in options directionals or futures entries.
Use the ADX to confirm breakout momentum or filter sideways markets.
Disclaimer
This script is for educational and analytical purposes. It does not constitute financial advice or a trading signal. Users are encouraged to validate the indicator within their own trading strategies and risk frameworks.
This version is optimized for options and futures trading, providing precise directional strength readings through adaptive smoothing and configurable parameters.
Concept and Logic
This indicator measures the strength of the current trend, regardless of its direction (bullish or bearish), by comparing directional movement between price highs and lows over a defined period.
It uses three main components:
+DI (Positive Directional Indicator): represents bullish strength.
–DI (Negative Directional Indicator): represents bearish strength.
ADX (Average Directional Index): measures the intensity of the prevailing trend, independent of direction.
The script follows the original logic proposed by J. Welles Wilder Jr., but introduces enhanced smoothing flexibility.
Users can choose between EMA (Exponential Moving Average) and Wilder’s RMA (Running Moving Average) for both DI and ADX calculations, allowing closer alignment with various platform implementations (IQ Option, MetaTrader, etc.).
How It Works
Directional Movement Calculation
The script computes upward and downward movements (+DM and –DM) by comparing the differences in highs and lows between consecutive candles.
Only positive directional changes that exceed the opposite side are considered.
This ensures each bar contributes only one valid directional movement.
True Range and Smoothing
The True Range (TR) is calculated using ta.tr(true) to include price gaps—replicating how professional derivatives platforms account for volatility jumps.
Both TR and DM values are smoothed using the selected averaging method (EMA or Wilder).
Directional Index and ADX
The smoothed +DI and –DI values are normalized over the True Range to form the Directional Index (DX), which measures the percentage difference between the two.
The ADX is then derived by smoothing the DX values, providing a stable reading of overall market strength.
Visual Representation
The ADX (white line) indicates the overall trend strength.
The +DI (dark blue) and –DI (dark red) lines show which side (bullish or bearish) is currently dominant.
Reference levels at 20 and 25 serve as strength thresholds:
Below 20 → Weak or sideways market.
Above 25 → Strong and directional trend.
Usage and Interpretation
When ADX rises above 25, the market shows a strong trend — use +DI > –DI for bullish confirmation, or the opposite for bearish momentum.
A falling ADX suggests decreasing trend strength and potential consolidation.
The default parameters (ADX Length = 34, DI Length = 34, both smoothed by EMA) match IQ Option’s internal ADX configuration, ensuring consistency between platforms.
Works on any timeframe or asset class, but is especially tuned for futures and options volatility dynamics.
Originality and Improvements
Unlike many open-source ADX indicators, this version:
Recreates IQ Option’s 34-length EMA-based ADX calculation with exact parameter alignment.
Provides selectable smoothing algorithms (EMA or Wilder) to switch between modern and classic formulations.
Uses dark-theme-optimized visuals with fine line weight and subtle contrast for clean visibility.
Maintains constant guide levels (20/25) rendered globally for precision and style compliance in Pine Script v6.
Is fully rewritten for Pine Script v6, ensuring compatibility and optimized execution.
Recommended Use
Combine with trend-following systems or breakout strategies.
Ideal for identifying market strength before engaging in options directionals or futures entries.
Use the ADX to confirm breakout momentum or filter sideways markets.
Disclaimer
This script is for educational and analytical purposes. It does not constitute financial advice or a trading signal. Users are encouraged to validate the indicator within their own trading strategies and risk frameworks.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.