OPEN-SOURCE SCRIPT
ATC MACD Evolved

What It Is
ATC MACD Evolved is a precision-engineered rebuild of the classic Moving Average Convergence Divergence indicator. It keeps the familiar MACD structure traders already know — fast EMA, slow EMA, signal line, histogram — and replaces every weak link in that structure with a cleaner, more reliable equivalent. The result is a MACD that reads momentum more clearly, lies less often, and tells you not just what is happening but how significant it actually is.
This is not a MACD with extra features stacked on top. It is a MACD built the right way from the foundation up.
________________________________________
Who It's Built For
ATC MACD Evolved is built for the active retail trader who already knows what MACD is, has probably used it before, and has run into its most common frustrations — late crossovers, noisy histogram readings, and signal lines that lag at the worst possible moment. If you have ever watched a MACD crossover fire and then immediately reverse, this indicator was built in response to exactly that experience.
________________________________________
Core Concept
MACD measures the distance between two exponential moving averages of price — a faster one (default 12 periods) and a slower one (default 26 periods). When the fast EMA pulls ahead of the slow EMA, momentum is building. When it falls behind, momentum is fading. The gap between the two is the MACD line. The signal line smooths that gap to make crossovers more readable. The histogram is the gap between the MACD line and the signal line — it expands when momentum is accelerating and compresses when it is slowing.
That is the retail MACD. It works. But it has three structural problems. The signal line uses EMA smoothing, which lags and causes late crossovers. The histogram has no scale reference, so you cannot tell whether a reading is large or small for the instrument you are trading. And the divergence logic, when it exists at all in retail tools, is not filtered — it fires constantly and most of those signals are noise.
ATC MACD Evolved solves all three.
________________________________________
The Upgrades
HMA Signal Line
The signal line is replaced with a Hull Moving Average of the same default length. HMA is specifically designed to reduce lag while maintaining smoothness. In practice this means crossovers occur closer to the actual momentum shift rather than well after it has already occurred. The MACD line itself remains a standard EMA-based calculation — the HMA is applied only to the signal line, which is the part of the system most responsible for late signals.
Standard-Deviation-Normalized Histogram
Every histogram print is measured against the instrument's own historical standard deviation over the last 200 bars. This produces a normalized strength score — call it the histogram Z-score — that tells you objectively whether the current histogram reading is strong, moderate, or weak relative to what this instrument normally produces at this timeframe. A histogram bar that looks big might actually be ordinary. A histogram bar that looks small might be historically significant. The normalization removes that ambiguity.
The histogram is then rendered in one of eight visual states based on direction, strength, and whether momentum is accelerating or fading. Strong bullish prints glow at full opacity. Weak prints render faded. Fading momentum mid-trend is visually distinct from genuine weakness. You can read the state of momentum at a glance without needing to interpret numbers.
Conservative Pivot-Confirmed Divergence Engine
Divergence is off by default. When enabled, it does not fire on every wiggle. It requires confirmed price pivots — actual swing highs and lows — before comparing histogram behavior at those pivots. The pivot confirmation is hard: the engine waits for the required number of bars on both sides of the pivot to confirm before flagging anything. It also enforces minimum and maximum bar separation between pivots, rejecting micro-divergences that form on adjacent bars and stale divergences where the pivots are too far apart to be meaningful. There is also an optional same-side-of-zero filter, which requires both histogram pivots to be on the same side of the zero line — bear divergence requires both readings above zero, bull divergence requires both below. This filter alone eliminates a large category of false divergence signals that retail tools produce constantly.
________________________________________
Chart Visuals
MACD Line — Electric Blue The core momentum line. Tracks the spread between the fast and slow EMA.
Signal Line — Gold The HMA-smoothed signal. Crossovers between the MACD line and signal line are primary signals.
Histogram Columns The gap between the MACD line and signal line, rendered in color-coded columns with a visual scale multiplier applied for readability (default 1.75x). This multiplier is display-only and does not affect any calculations, alerts, or HUD values. The columns use eight visual states driven by direction, normalized strength, and slope:
• Bright green, full opacity — bullish, accelerating, strong
• Green, slightly faded — bullish, accelerating, moderate strength
• Green, heavily faded — bullish but statistically weak (watch for stall)
• Green, partial fade — bullish but decelerating (momentum losing steam)
• Bright red, full opacity — bearish, accelerating, strong
• Red, slightly faded — bearish, accelerating, moderate
• Red, heavily faded — bearish but weak (bear pressure fading)
• Red, partial fade — bearish but decelerating (recovery building)
MACD / Signal Cloud A filled region between the MACD line and signal line that changes color and opacity based on the combined state of both lines relative to each other and to the zero line. Darker and more saturated when both are on the same side and in agreement. Lighter and more transparent during transitional phases.
Momentum Background A subtle background tint across the full panel — green when MACD is above signal, red when below. The tint is stronger when the MACD line is also above zero (bull control) and lighter when it is below (recovery or transition). This gives you an immediate panel-level read on regime without needing to look at individual lines.
Zero-Line Glow The zero line is rendered with a colored glow that reflects the current histogram direction — green when histogram is positive, red when negative. This provides a subtle but consistent reference point for zero-line crossover events.
Crossover Dots At every signal-line crossover, a dot and surrounding glow appear on the MACD line. The glow renders first so the sharp dot remains visually dominant. Bull crossovers are green, bear crossovers are red.
Divergence Labels (optional) When divergence is enabled and a confirmed pivot-to-pivot divergence is detected, a BULL DIV or BEAR DIV label appears on the histogram at the pivot bar. Labels are placed on the visually scaled histogram so they align with the displayed columns.
________________________________________
The HUD
The HUD is a live data panel rendered in the corner of the indicator panel. It updates on every bar close and gives you a structured summary of the indicator's current state without needing to read individual lines and columns manually.
MACD — The raw MACD line value at four decimal places.
Signal — The HMA signal line value at four decimal places.
Hist Strength — The normalized Z-score of the current histogram print. Positive values indicate bullish histogram, negative bearish. The magnitude tells you how significant the print is relative to this instrument's normal range. A value above +1.5 or below -1.5 is statistically strong.
Strength — A plain-language classification of the Z-score reading: Strong, Moderate, or Weak. Strong means the current histogram print is beyond 1.5 standard deviations from zero. Moderate is between 0.5 and 1.5. Weak is below 0.5 and is the zone where momentum signals should be treated with caution.
State — A four-state momentum classification based on the position of the MACD line relative to signal and relative to zero:
• Bull Control — MACD above signal AND above zero. Full bullish regime.
• Bull Recovery — MACD above signal but below zero. Recovering from bearish territory.
• Bear Pressure — MACD below signal but above zero. Weakening from bullish territory.
• Bear Control — MACD below signal AND below zero. Full bearish regime.
Divergence — When the divergence engine is enabled, this field shows the current status: Watching (monitoring for pivots), Bull Div @ Pivot (confirmed bullish divergence at last pivot), or Bear Div @ Pivot (confirmed bearish divergence at last pivot). When the engine is off, this field shows Off.
Hist Visual — The current histogram visual scale multiplier. Displayed as a reminder that the histogram is scaled for readability only. All calculations use the true unscaled histogram values.
________________________________________
Alerts
ATC MACD Evolved includes eight configurable alert conditions:
MACD Bull Cross — Fires when the MACD line crosses above the HMA signal line.
MACD Bear Cross — Fires when the MACD line crosses below the HMA signal line.
MACD Zero Cross Up — Fires when the MACD line crosses above the zero line.
MACD Zero Cross Down — Fires when the MACD line crosses below the zero line.
Strong Bull Histogram — Fires on the first bar where the normalized histogram strength enters the strong zone on the positive side. This is a momentum acceleration alert, not a crossover.
Strong Bear Histogram — Fires on the first bar where normalized histogram strength enters the strong zone on the negative side.
Bear Divergence — Fires when the divergence engine confirms a bearish pivot-to-pivot divergence. Requires divergence to be enabled in settings.
Bull Divergence — Fires when the divergence engine confirms a bullish pivot-to-pivot divergence. Requires divergence to be enabled in settings.
________________________________________
How to Trade With ATC MACD Evolved
ATC MACD Evolved is a momentum and trend-following tool. It measures momentum quality, not price targets. Use it to confirm conditions that support entry, to gauge how much conviction exists behind a move, and to identify early signs of momentum exhaustion before a reversal becomes obvious.
Step 1 — Read the State first
Before looking at any crossover or histogram reading, check the HUD State field. Bull Control and Bear Control are the regimes where signals from this indicator carry the most weight. Bull Recovery and Bear Pressure are transitional — signals are valid but require more supporting evidence from price action or other tools.
Step 2 — Read the Histogram Strength
Check the Strength field in the HUD. A Strong reading means the histogram print is statistically significant for this instrument. A Weak reading means momentum is not confirmed — crossovers in weak histogram territory are lower conviction and should be weighted accordingly. Do not trade crossovers in Weak zones the same way you trade them in Strong zones.
Step 3 — Confirm the crossover
When the MACD line crosses the HMA signal line, a crossover dot and glow appear on the chart. The most reliable crossovers occur when the histogram is transitioning from a faded state (decelerating) to an accelerating state on the opposite side — you will see the histogram columns shift from a partial-opacity color to a full-opacity color in the new direction. Crossovers that occur with immediately Strong normalized readings are the cleanest setups.
Step 4 — Check the zero-line position
A bullish crossover above the zero line (Bull Control state) is generally stronger than one below zero (Bull Recovery). Both are valid, but the zero-line position tells you whether you are trading with the prevailing macro momentum or against it. Trade Bull Control crossovers with more size or fewer confirmations required. Trade Bull Recovery crossovers as potential turning-point setups that still need price structure support.
Step 5 — Use zero-line crossovers as trend confirmation
When the MACD line itself crosses the zero line, it marks a shift in the medium-term trend relationship between the fast and slow EMAs. Zero cross up, combined with a MACD-above-signal condition, is a two-layer confirmation of a building trend. Zero cross alerts are most useful as trend-start confirmation rather than entry triggers on their own.
Step 6 — If divergence is enabled, treat it as a caution flag
A divergence label on ATC MACD Evolved is not a buy or sell signal. It is a structural warning. Bearish divergence — price making a higher high while the histogram makes a lower high — means upside momentum is not confirming price action. This creates a fragile structure. Bullish divergence is the mirror: price making a lower low while histogram makes a higher low, indicating selling pressure is not accelerating with price. In both cases, wait for a crossover or a failed new extreme in price to act on the divergence flag.
Step 7 — Watch the histogram fade for exits
When you are in a trade and the histogram shifts from a Strong or Moderate state to a Weak state — visible as the column opacity dropping and the Strength field reading Weak — that is a warning that momentum is stalling. It is not an exit trigger by itself, but it is a cue to tighten your stop or reduce exposure. When the histogram then begins fading (decelerating) in the current direction, watch for a crossover as confirmation of a regime shift.
________________________________________
Recommended Instruments and Timeframes
ATC MACD Evolved is validated and performs well on liquid instruments with consistent volume profiles. Futures markets including ES, NQ, MES, MNQ, CL, and GC are the primary intended instruments. It is equally well-suited to major equity ETFs such as SPY and QQQ, and to major forex pairs including EURUSD, GBPUSD, and USDJPY. The normalization engine adapts to the volatility characteristics of each instrument, so the same threshold settings can be used across markets without manual adjustment.
Recommended timeframes are 5-minute through 4-hour for active trading and 1-hour through Daily for trend context and confirmation. The 200-bar normalization lookback is calibrated for these timeframes. On very short timeframes below 5 minutes, consider increasing the normalization lookback to maintain statistical stability. On weekly or monthly charts, the tool still functions correctly but is better used as a macro context layer than an entry trigger.
ATC MACD Evolved is a precision-engineered rebuild of the classic Moving Average Convergence Divergence indicator. It keeps the familiar MACD structure traders already know — fast EMA, slow EMA, signal line, histogram — and replaces every weak link in that structure with a cleaner, more reliable equivalent. The result is a MACD that reads momentum more clearly, lies less often, and tells you not just what is happening but how significant it actually is.
This is not a MACD with extra features stacked on top. It is a MACD built the right way from the foundation up.
________________________________________
Who It's Built For
ATC MACD Evolved is built for the active retail trader who already knows what MACD is, has probably used it before, and has run into its most common frustrations — late crossovers, noisy histogram readings, and signal lines that lag at the worst possible moment. If you have ever watched a MACD crossover fire and then immediately reverse, this indicator was built in response to exactly that experience.
________________________________________
Core Concept
MACD measures the distance between two exponential moving averages of price — a faster one (default 12 periods) and a slower one (default 26 periods). When the fast EMA pulls ahead of the slow EMA, momentum is building. When it falls behind, momentum is fading. The gap between the two is the MACD line. The signal line smooths that gap to make crossovers more readable. The histogram is the gap between the MACD line and the signal line — it expands when momentum is accelerating and compresses when it is slowing.
That is the retail MACD. It works. But it has three structural problems. The signal line uses EMA smoothing, which lags and causes late crossovers. The histogram has no scale reference, so you cannot tell whether a reading is large or small for the instrument you are trading. And the divergence logic, when it exists at all in retail tools, is not filtered — it fires constantly and most of those signals are noise.
ATC MACD Evolved solves all three.
________________________________________
The Upgrades
HMA Signal Line
The signal line is replaced with a Hull Moving Average of the same default length. HMA is specifically designed to reduce lag while maintaining smoothness. In practice this means crossovers occur closer to the actual momentum shift rather than well after it has already occurred. The MACD line itself remains a standard EMA-based calculation — the HMA is applied only to the signal line, which is the part of the system most responsible for late signals.
Standard-Deviation-Normalized Histogram
Every histogram print is measured against the instrument's own historical standard deviation over the last 200 bars. This produces a normalized strength score — call it the histogram Z-score — that tells you objectively whether the current histogram reading is strong, moderate, or weak relative to what this instrument normally produces at this timeframe. A histogram bar that looks big might actually be ordinary. A histogram bar that looks small might be historically significant. The normalization removes that ambiguity.
The histogram is then rendered in one of eight visual states based on direction, strength, and whether momentum is accelerating or fading. Strong bullish prints glow at full opacity. Weak prints render faded. Fading momentum mid-trend is visually distinct from genuine weakness. You can read the state of momentum at a glance without needing to interpret numbers.
Conservative Pivot-Confirmed Divergence Engine
Divergence is off by default. When enabled, it does not fire on every wiggle. It requires confirmed price pivots — actual swing highs and lows — before comparing histogram behavior at those pivots. The pivot confirmation is hard: the engine waits for the required number of bars on both sides of the pivot to confirm before flagging anything. It also enforces minimum and maximum bar separation between pivots, rejecting micro-divergences that form on adjacent bars and stale divergences where the pivots are too far apart to be meaningful. There is also an optional same-side-of-zero filter, which requires both histogram pivots to be on the same side of the zero line — bear divergence requires both readings above zero, bull divergence requires both below. This filter alone eliminates a large category of false divergence signals that retail tools produce constantly.
________________________________________
Chart Visuals
MACD Line — Electric Blue The core momentum line. Tracks the spread between the fast and slow EMA.
Signal Line — Gold The HMA-smoothed signal. Crossovers between the MACD line and signal line are primary signals.
Histogram Columns The gap between the MACD line and signal line, rendered in color-coded columns with a visual scale multiplier applied for readability (default 1.75x). This multiplier is display-only and does not affect any calculations, alerts, or HUD values. The columns use eight visual states driven by direction, normalized strength, and slope:
• Bright green, full opacity — bullish, accelerating, strong
• Green, slightly faded — bullish, accelerating, moderate strength
• Green, heavily faded — bullish but statistically weak (watch for stall)
• Green, partial fade — bullish but decelerating (momentum losing steam)
• Bright red, full opacity — bearish, accelerating, strong
• Red, slightly faded — bearish, accelerating, moderate
• Red, heavily faded — bearish but weak (bear pressure fading)
• Red, partial fade — bearish but decelerating (recovery building)
MACD / Signal Cloud A filled region between the MACD line and signal line that changes color and opacity based on the combined state of both lines relative to each other and to the zero line. Darker and more saturated when both are on the same side and in agreement. Lighter and more transparent during transitional phases.
Momentum Background A subtle background tint across the full panel — green when MACD is above signal, red when below. The tint is stronger when the MACD line is also above zero (bull control) and lighter when it is below (recovery or transition). This gives you an immediate panel-level read on regime without needing to look at individual lines.
Zero-Line Glow The zero line is rendered with a colored glow that reflects the current histogram direction — green when histogram is positive, red when negative. This provides a subtle but consistent reference point for zero-line crossover events.
Crossover Dots At every signal-line crossover, a dot and surrounding glow appear on the MACD line. The glow renders first so the sharp dot remains visually dominant. Bull crossovers are green, bear crossovers are red.
Divergence Labels (optional) When divergence is enabled and a confirmed pivot-to-pivot divergence is detected, a BULL DIV or BEAR DIV label appears on the histogram at the pivot bar. Labels are placed on the visually scaled histogram so they align with the displayed columns.
________________________________________
The HUD
The HUD is a live data panel rendered in the corner of the indicator panel. It updates on every bar close and gives you a structured summary of the indicator's current state without needing to read individual lines and columns manually.
MACD — The raw MACD line value at four decimal places.
Signal — The HMA signal line value at four decimal places.
Hist Strength — The normalized Z-score of the current histogram print. Positive values indicate bullish histogram, negative bearish. The magnitude tells you how significant the print is relative to this instrument's normal range. A value above +1.5 or below -1.5 is statistically strong.
Strength — A plain-language classification of the Z-score reading: Strong, Moderate, or Weak. Strong means the current histogram print is beyond 1.5 standard deviations from zero. Moderate is between 0.5 and 1.5. Weak is below 0.5 and is the zone where momentum signals should be treated with caution.
State — A four-state momentum classification based on the position of the MACD line relative to signal and relative to zero:
• Bull Control — MACD above signal AND above zero. Full bullish regime.
• Bull Recovery — MACD above signal but below zero. Recovering from bearish territory.
• Bear Pressure — MACD below signal but above zero. Weakening from bullish territory.
• Bear Control — MACD below signal AND below zero. Full bearish regime.
Divergence — When the divergence engine is enabled, this field shows the current status: Watching (monitoring for pivots), Bull Div @ Pivot (confirmed bullish divergence at last pivot), or Bear Div @ Pivot (confirmed bearish divergence at last pivot). When the engine is off, this field shows Off.
Hist Visual — The current histogram visual scale multiplier. Displayed as a reminder that the histogram is scaled for readability only. All calculations use the true unscaled histogram values.
________________________________________
Alerts
ATC MACD Evolved includes eight configurable alert conditions:
MACD Bull Cross — Fires when the MACD line crosses above the HMA signal line.
MACD Bear Cross — Fires when the MACD line crosses below the HMA signal line.
MACD Zero Cross Up — Fires when the MACD line crosses above the zero line.
MACD Zero Cross Down — Fires when the MACD line crosses below the zero line.
Strong Bull Histogram — Fires on the first bar where the normalized histogram strength enters the strong zone on the positive side. This is a momentum acceleration alert, not a crossover.
Strong Bear Histogram — Fires on the first bar where normalized histogram strength enters the strong zone on the negative side.
Bear Divergence — Fires when the divergence engine confirms a bearish pivot-to-pivot divergence. Requires divergence to be enabled in settings.
Bull Divergence — Fires when the divergence engine confirms a bullish pivot-to-pivot divergence. Requires divergence to be enabled in settings.
________________________________________
How to Trade With ATC MACD Evolved
ATC MACD Evolved is a momentum and trend-following tool. It measures momentum quality, not price targets. Use it to confirm conditions that support entry, to gauge how much conviction exists behind a move, and to identify early signs of momentum exhaustion before a reversal becomes obvious.
Step 1 — Read the State first
Before looking at any crossover or histogram reading, check the HUD State field. Bull Control and Bear Control are the regimes where signals from this indicator carry the most weight. Bull Recovery and Bear Pressure are transitional — signals are valid but require more supporting evidence from price action or other tools.
Step 2 — Read the Histogram Strength
Check the Strength field in the HUD. A Strong reading means the histogram print is statistically significant for this instrument. A Weak reading means momentum is not confirmed — crossovers in weak histogram territory are lower conviction and should be weighted accordingly. Do not trade crossovers in Weak zones the same way you trade them in Strong zones.
Step 3 — Confirm the crossover
When the MACD line crosses the HMA signal line, a crossover dot and glow appear on the chart. The most reliable crossovers occur when the histogram is transitioning from a faded state (decelerating) to an accelerating state on the opposite side — you will see the histogram columns shift from a partial-opacity color to a full-opacity color in the new direction. Crossovers that occur with immediately Strong normalized readings are the cleanest setups.
Step 4 — Check the zero-line position
A bullish crossover above the zero line (Bull Control state) is generally stronger than one below zero (Bull Recovery). Both are valid, but the zero-line position tells you whether you are trading with the prevailing macro momentum or against it. Trade Bull Control crossovers with more size or fewer confirmations required. Trade Bull Recovery crossovers as potential turning-point setups that still need price structure support.
Step 5 — Use zero-line crossovers as trend confirmation
When the MACD line itself crosses the zero line, it marks a shift in the medium-term trend relationship between the fast and slow EMAs. Zero cross up, combined with a MACD-above-signal condition, is a two-layer confirmation of a building trend. Zero cross alerts are most useful as trend-start confirmation rather than entry triggers on their own.
Step 6 — If divergence is enabled, treat it as a caution flag
A divergence label on ATC MACD Evolved is not a buy or sell signal. It is a structural warning. Bearish divergence — price making a higher high while the histogram makes a lower high — means upside momentum is not confirming price action. This creates a fragile structure. Bullish divergence is the mirror: price making a lower low while histogram makes a higher low, indicating selling pressure is not accelerating with price. In both cases, wait for a crossover or a failed new extreme in price to act on the divergence flag.
Step 7 — Watch the histogram fade for exits
When you are in a trade and the histogram shifts from a Strong or Moderate state to a Weak state — visible as the column opacity dropping and the Strength field reading Weak — that is a warning that momentum is stalling. It is not an exit trigger by itself, but it is a cue to tighten your stop or reduce exposure. When the histogram then begins fading (decelerating) in the current direction, watch for a crossover as confirmation of a regime shift.
________________________________________
Recommended Instruments and Timeframes
ATC MACD Evolved is validated and performs well on liquid instruments with consistent volume profiles. Futures markets including ES, NQ, MES, MNQ, CL, and GC are the primary intended instruments. It is equally well-suited to major equity ETFs such as SPY and QQQ, and to major forex pairs including EURUSD, GBPUSD, and USDJPY. The normalization engine adapts to the volatility characteristics of each instrument, so the same threshold settings can be used across markets without manual adjustment.
Recommended timeframes are 5-minute through 4-hour for active trading and 1-hour through Daily for trend context and confirmation. The 200-bar normalization lookback is calibrated for these timeframes. On very short timeframes below 5 minutes, consider increasing the normalization lookback to maintain statistical stability. On weekly or monthly charts, the tool still functions correctly but is better used as a macro context layer than an entry trigger.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Visit AscendTradingConcepts.com for extensive FREE trading education and access to our Premium Exclusive Indicators.
Visit in your browser (Edge/Chrome/Safari) — TradingView's built-in browser does not support our site's latest security protocols.
Visit in your browser (Edge/Chrome/Safari) — TradingView's built-in browser does not support our site's latest security protocols.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Visit AscendTradingConcepts.com for extensive FREE trading education and access to our Premium Exclusive Indicators.
Visit in your browser (Edge/Chrome/Safari) — TradingView's built-in browser does not support our site's latest security protocols.
Visit in your browser (Edge/Chrome/Safari) — TradingView's built-in browser does not support our site's latest security protocols.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.