INVITE-ONLY SCRIPT
EGX30 Advance/Decline Line

🇪🇬 EGX30 Advance/Decline & Market Breadth Suite
This comprehensive indicator provides a deep dive into the market breadth of the EGX30 index, allowing traders and analysts to monitor underlying buying and selling pressure across its constituents. It offers five distinct metrics for a holistic view of market health, ranging from traditional Advance/Decline analysis to advanced McClellan Oscillators and TRIN (Arms Index) readings.
Key Features and Metrics
The indicator is selectable via the 'Select Metric' input and can display the following on your chart:
1. Advance/Decline Line: A cumulative measure of the difference between the number of advancing stocks and declining stocks (Advancing Stocks−Declining Stocks). It helps confirm the market's trend strength.
2. McClellan Oscillator: Calculated using the Advance/Decline Ratio (AD Ratio) smoothed by two Exponential Moving Averages (EMAs). It acts as a momentum measure of the A/D Line, highlighting potential overbought/oversold conditions and trend turns.
Climax Levels: Horizontal lines are plotted at +0.1 (Buy Climax) and −0.1 (Sell Climax).
3. Arms Index (TRIN): A volume-based indicator that measures the ratio of the Advance/Decline Ratio to the Advancing Volume/Declining Volume Ratio. A value above 1.0 is generally bearish (more volume in declining stocks), while a value below 1.0 is bullish.
Bands: Upper and Lower deviation bands are calculated and plotted for advanced analysis of extremes.
4. Total Volume: The raw, aggregated volume of all EGX30 constituent stocks.
5. Total Liquidity (Total Traded Value): The sum of (Price × Volume) for all EGX30 constituent stocks, giving a more accurate representation of capital flow.
⚙️ Customizable & Smart Configuration
The indicator is designed for maximum flexibility and accuracy across different chart timeframes:
Automatic Timeframe Configuration: When enabled (default), the script automatically selects optimized lookback periods for the Moving Average (MA), McClellan EMAs, and TRIN Lookback based on whether the chart is Intraday, Daily, Weekly, or other.
Manual Overrides: Disable the auto-configuration to manually set the MA Length, McClellan Fast/Slow EMAs, and TRIN Lookback/StdDev Multiplier for custom analysis.
📊 Advanced Data Table (Market Breakdown)
When the 'Show Table' input is toggled ON, a detailed statistics table appears on the chart's top-right corner, providing real-time market insights.
Top Performance (Contributors): Ranks and displays the Top N (customizable) stocks that are contributing the most to the index's movement, calculated as Weight × Percentage Change.
Top Liquidity: Ranks and displays the Top N stocks by their current-bar traded value (Price×Volume), expressed as a percentage of the Total Traded Value.
Horizontal Stats (Row 3): Provides a comprehensive summary of the current market state:
Adv, Decl, Unch: Count of advancing, declining, and unchanged stocks.
Net Adv: The difference between advancing and declining stocks.
Net Vol / Net Liq: Net Volume/Liquidity as a percentage of Total Volume/Liquidity.
Primary Metric/Volume Stats: Depending on the selected metric, it displays the current value of TRIN or the raw Total Volume and Total Liquidity.
This tool is indispensable for traders needing a clear, quantified understanding of the EGX30's underlying market dynamics.
EGX30 Advance/Decline v1.1
In this improved version, the relative weights of the index components have been adjusted, some stocks have been removed from the index, and new stocks have been added based on the latest update of the Egyptian Exchange's EGX30 index. Some visual improvements have also been made.
This comprehensive indicator provides a deep dive into the market breadth of the EGX30 index, allowing traders and analysts to monitor underlying buying and selling pressure across its constituents. It offers five distinct metrics for a holistic view of market health, ranging from traditional Advance/Decline analysis to advanced McClellan Oscillators and TRIN (Arms Index) readings.
Key Features and Metrics
The indicator is selectable via the 'Select Metric' input and can display the following on your chart:
1. Advance/Decline Line: A cumulative measure of the difference between the number of advancing stocks and declining stocks (Advancing Stocks−Declining Stocks). It helps confirm the market's trend strength.
2. McClellan Oscillator: Calculated using the Advance/Decline Ratio (AD Ratio) smoothed by two Exponential Moving Averages (EMAs). It acts as a momentum measure of the A/D Line, highlighting potential overbought/oversold conditions and trend turns.
Climax Levels: Horizontal lines are plotted at +0.1 (Buy Climax) and −0.1 (Sell Climax).
3. Arms Index (TRIN): A volume-based indicator that measures the ratio of the Advance/Decline Ratio to the Advancing Volume/Declining Volume Ratio. A value above 1.0 is generally bearish (more volume in declining stocks), while a value below 1.0 is bullish.
Bands: Upper and Lower deviation bands are calculated and plotted for advanced analysis of extremes.
4. Total Volume: The raw, aggregated volume of all EGX30 constituent stocks.
5. Total Liquidity (Total Traded Value): The sum of (Price × Volume) for all EGX30 constituent stocks, giving a more accurate representation of capital flow.
⚙️ Customizable & Smart Configuration
The indicator is designed for maximum flexibility and accuracy across different chart timeframes:
Automatic Timeframe Configuration: When enabled (default), the script automatically selects optimized lookback periods for the Moving Average (MA), McClellan EMAs, and TRIN Lookback based on whether the chart is Intraday, Daily, Weekly, or other.
Manual Overrides: Disable the auto-configuration to manually set the MA Length, McClellan Fast/Slow EMAs, and TRIN Lookback/StdDev Multiplier for custom analysis.
📊 Advanced Data Table (Market Breakdown)
When the 'Show Table' input is toggled ON, a detailed statistics table appears on the chart's top-right corner, providing real-time market insights.
Top Performance (Contributors): Ranks and displays the Top N (customizable) stocks that are contributing the most to the index's movement, calculated as Weight × Percentage Change.
Top Liquidity: Ranks and displays the Top N stocks by their current-bar traded value (Price×Volume), expressed as a percentage of the Total Traded Value.
Horizontal Stats (Row 3): Provides a comprehensive summary of the current market state:
Adv, Decl, Unch: Count of advancing, declining, and unchanged stocks.
Net Adv: The difference between advancing and declining stocks.
Net Vol / Net Liq: Net Volume/Liquidity as a percentage of Total Volume/Liquidity.
Primary Metric/Volume Stats: Depending on the selected metric, it displays the current value of TRIN or the raw Total Volume and Total Liquidity.
This tool is indispensable for traders needing a clear, quantified understanding of the EGX30's underlying market dynamics.
EGX30 Advance/Decline v1.1
In this improved version, the relative weights of the index components have been adjusted, some stocks have been removed from the index, and new stocks have been added based on the latest update of the Egyptian Exchange's EGX30 index. Some visual improvements have also been made.
仅限邀请脚本
只有作者授权的用户才能访问此脚本。您需要申请并获得使用许可。通常情况下,付款后即可获得许可。更多详情,请按照下方作者的说明操作,或直接联系MarkitTick。
TradingView不建议您付费购买或使用任何脚本,除非您完全信任其作者并了解其工作原理。您也可以在我们的社区脚本找到免费的开源替代方案。
作者的说明
The indicator is currently available for trial access. Please send me a private message to request activation.
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
仅限邀请脚本
只有作者授权的用户才能访问此脚本。您需要申请并获得使用许可。通常情况下,付款后即可获得许可。更多详情,请按照下方作者的说明操作,或直接联系MarkitTick。
TradingView不建议您付费购买或使用任何脚本,除非您完全信任其作者并了解其工作原理。您也可以在我们的社区脚本找到免费的开源替代方案。
作者的说明
The indicator is currently available for trial access. Please send me a private message to request activation.
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。