OPEN-SOURCE SCRIPT
ATK/DEF MACD Momentum Context Inctor

MACD Momentum Context is a momentum analysis indicator designed to help traders visualize MACD behavior, momentum changes, and market context through a structured dashboard.
This indicator focuses on analyzing the relationship between the MACD line, signal line, and histogram to provide a clearer view of momentum direction, momentum strength, and changes in market pressure.
Instead of displaying only traditional MACD values, this tool organizes multiple momentum conditions into an easy-to-read context view, allowing users to better understand how momentum is developing over time.
Features
📊 MACD Momentum Analysis
The indicator analyzes:
• MACD Line behavior
• Sign Line relationship
• Histogram direction
• Histogram expansion and contraction
• Momentum acceleration and slowdown
The histogram is evaluated based on its position and movement to help visualize whether momentum is increasing, weakening, or remaining balanced.
📈 Momentum Direction Context
The dashboard categorizes momentum conditions into different states:
• Bullish acceleration
• Bullish slowdown
• Bearish acceleration
• Bearish slowdown
• Sideways / balanced momentum
These states are based on MACD histogram behavior and are designed to help users quickly understand current momentum conditions.
🔥 Momentum Strength Measurement
The indicator compares current histogram strength with recent historical momentum range.
This helps visualize whether current momentum is:
• Moderate
• Strong
• Extreme
Strength classification is based on relative momentum expansion rather than fixed pric movement.
🔄 MACD Trend Context
The indicator evaluates the relationship between:
• MACD position above or below zero
• Histogram direction
• Sign line interaction
This creates a broader momentum context such as:
• Bullish momentum environment
• Bearish momentum environment
• Momentum transition area
• Neutral conditions
⚡ Momentum Change Tracking
The tool monitors changes in histogram behavior:
• Increasing momentum
• Decreasing momentum
• Stable momentum
This helps users observe whether current momentum is gaining strength or losing energy.
🔍 Divergence Observation
The indicator includes divergence detection based on price movement and MACD behavior.
It highlights situations where:
• Pric reaches a new high while MACD momentum does not confirm
• Pric reaches a new low while MACD momentum does not confirm
Divergence information is provided as a visual reference for studying momentum differences.
📋 Information Dashboard
The built-in table provides a structured overview of recent MACD conditions, including:
• Historical bar reference
• Momentum direction
• Momentum change
• Momentum strength
• MACD behavior
• Momentum edge
• MACD events and context
This allows users to review recent momentum development without manually interpreting multiple MACD components.
⚙️ Customization
Users can adjust:
• MACD fast length
• MACD slow length
• Sign length
• Number of bars displayed
• Table starting position
Different parameter settings can be used to study different market environments and timeframes.
Intended Use
MACD Momentum Context is designed as a market analysis and visualization tool.
It can be used to study:
• Momentum behavior
• Trend strength changes
• MACD structure
• Histogram development
• Potential momentum shifts
This indicator does not provide finan advice, trading recommendations, or guaranteed market outcomes. Users should combine this tool with their own analysis, risk management, and trading approach.
Notes
MACD Momentum Context is based on the traditional MACD concept with additional visualization and contextual analysis layers.
The indicator is intended to improve readability and understanding of momentum conditions by presenting multiple MACD measurements in a structured format.
This indicator focuses on analyzing the relationship between the MACD line, signal line, and histogram to provide a clearer view of momentum direction, momentum strength, and changes in market pressure.
Instead of displaying only traditional MACD values, this tool organizes multiple momentum conditions into an easy-to-read context view, allowing users to better understand how momentum is developing over time.
Features
📊 MACD Momentum Analysis
The indicator analyzes:
• MACD Line behavior
• Sign Line relationship
• Histogram direction
• Histogram expansion and contraction
• Momentum acceleration and slowdown
The histogram is evaluated based on its position and movement to help visualize whether momentum is increasing, weakening, or remaining balanced.
📈 Momentum Direction Context
The dashboard categorizes momentum conditions into different states:
• Bullish acceleration
• Bullish slowdown
• Bearish acceleration
• Bearish slowdown
• Sideways / balanced momentum
These states are based on MACD histogram behavior and are designed to help users quickly understand current momentum conditions.
🔥 Momentum Strength Measurement
The indicator compares current histogram strength with recent historical momentum range.
This helps visualize whether current momentum is:
• Moderate
• Strong
• Extreme
Strength classification is based on relative momentum expansion rather than fixed pric movement.
🔄 MACD Trend Context
The indicator evaluates the relationship between:
• MACD position above or below zero
• Histogram direction
• Sign line interaction
This creates a broader momentum context such as:
• Bullish momentum environment
• Bearish momentum environment
• Momentum transition area
• Neutral conditions
⚡ Momentum Change Tracking
The tool monitors changes in histogram behavior:
• Increasing momentum
• Decreasing momentum
• Stable momentum
This helps users observe whether current momentum is gaining strength or losing energy.
🔍 Divergence Observation
The indicator includes divergence detection based on price movement and MACD behavior.
It highlights situations where:
• Pric reaches a new high while MACD momentum does not confirm
• Pric reaches a new low while MACD momentum does not confirm
Divergence information is provided as a visual reference for studying momentum differences.
📋 Information Dashboard
The built-in table provides a structured overview of recent MACD conditions, including:
• Historical bar reference
• Momentum direction
• Momentum change
• Momentum strength
• MACD behavior
• Momentum edge
• MACD events and context
This allows users to review recent momentum development without manually interpreting multiple MACD components.
⚙️ Customization
Users can adjust:
• MACD fast length
• MACD slow length
• Sign length
• Number of bars displayed
• Table starting position
Different parameter settings can be used to study different market environments and timeframes.
Intended Use
MACD Momentum Context is designed as a market analysis and visualization tool.
It can be used to study:
• Momentum behavior
• Trend strength changes
• MACD structure
• Histogram development
• Potential momentum shifts
This indicator does not provide finan advice, trading recommendations, or guaranteed market outcomes. Users should combine this tool with their own analysis, risk management, and trading approach.
Notes
MACD Momentum Context is based on the traditional MACD concept with additional visualization and contextual analysis layers.
The indicator is intended to improve readability and understanding of momentum conditions by presenting multiple MACD measurements in a structured format.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.