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, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.
Скрипт с открытым кодом
В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения.
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.