Momentum Lifecycle Detector [BullByte]Momentum Lifecycle Detector
An early trend detection oscillator that tracks momentum through five lifecycle phases - from birth to death - using DI spread acceleration analysis . Designed to identify momentum ignition before traditional ADX signals, and warn of trend exhaustion before it becomes obvious.
WHAT THIS INDICATOR DOES
The Momentum Lifecycle Detector (MLD) is a momentum oscillator with integrated trend phase classification. It answers the question every trend trader needs answered: "Where in its life is this momentum right now?"
Most trend strength indicators tell you a trend exists after the move is already underway. ADX crossing above 25 is a lagging confirmation. MLD solves this by detecting the birth of momentum at the earliest mathematically identifiable point, then tracking that momentum through five distinct lifecycle phases until it dies.
The indicator displays:
An ATR-normalized momentum oscillator (the main line you follow)
A signal line for crossover analysis
A histogram showing momentum-signal divergence
A colored lifecycle band showing the current phase
Consolidation zone boxes marking coiled energy before breakouts
A reversal atmosphere glow when momentum curvature suggests reversal
A dashboard summarizing momentum conditions at a glance
Adaptive dead zone and choppy market warnings
THE PROBLEM THIS SOLVES - WHY TRADERS NEED EARLY TREND DETECTION
Traditional ADX tells you a trend is strong when it crosses above 25. By that point, the optimal entry window has often closed. Conversely, ADX gives no clear warning when a trend is dying - it just slowly rolls over after the move has already reversed.
The core innovation in MLD is measuring the acceleration of the gap between +DI and -DI. Here is the mathematical logic:
Spread = |+DI minus -DI| - How far apart are bullish and bearish pressure?
Velocity = Spread minus Spread - Is that gap widening or narrowing?
Acceleration = Velocity minus Velocity - Is the widening itself speeding up?
When acceleration is positive and velocity is positive while ADX is still low, a new trend is actively forming. This is the mathematical fingerprint of momentum at birth - detectable bars before ADX would give any signal.
WHY THESE SPECIFIC COMPONENTS - JUSTIFICATION FOR THE INTEGRATION
This indicator combines several analytical methods into a unified lifecycle detection framework. Each component serves a specific, non-redundant purpose. Here is why each exists:
Zero-Lag EMA Momentum Oscillator
Purpose : The primary visual output traders watch and trade.
Method : Difference between fast ZLEMA (default 9) and slow ZLEMA (default 21), divided by ATR, multiplied by 100.
Why ZLEMA : Standard EMA lags behind price. ZLEMA compensates by adding the difference between the current price and its lagged value before smoothing. This produces earlier momentum readings without adding noise.
Why ATR normalization: Raw price differences are not comparable across instruments. A 5-point move means something different on a $10 stock versus Bitcoin. Dividing by ATR makes oscillator readings universal - a reading of +50 represents the same relative momentum strength on any chart, any timeframe.
Gaussian-Weighted Directional Indicators
Purpose : Feed responsive directional data into the lifecycle detection engine.
Method : Instead of standard Wilder smoothing for +DI and -DI, a Gaussian (bell-curve) decay function applies exponentially more weight to recent bars. The formula is exp(-(n/len)^2).
Why Gaussian weighting : Standard DI treats all bars in the lookback equally. A directional move from 14 bars ago counts the same as one happening now. Gaussian decay makes DI inherently more responsive to fresh moves without shortening the period (which would increase noise).
ZLEMA-Smoothed ADX
Purpose : Trend strength measurement for phase classification.
Method : DX calculated from Gaussian-weighted DI values, smoothed with ZLEMA instead of traditional Wilder smoothing.
Why ZLEMA-smoothed: Standard Wilder-smoothed ADX is deliberately sluggish by design. For lifecycle detection, we need ADX that responds faster to "waking up" and "rolling over" behaviors that define phase transitions.
DI Spread Acceleration Engine
Purpose : The core innovation - detects momentum birth before ADX confirms.
Method : Calculates the absolute spread between +DI and -DI, derives its velocity (first derivative) and acceleration (second derivative), smooths both with 3-period EMA.
Why this matters: This is what differentiates MLD from existing ADX-based tools. Acceleration of the DI spread is a leading indicator. By the time ADX crosses a threshold, spread acceleration has already been positive for multiple bars. This enables IGNITION detection before traditional signals fire.
Kaufman Efficiency Ratio
Purpose : Regime filter that warns when conditions are choppy.
Method : ER = net price movement divided by total price movement. Values near 1.0 mean efficient directional movement. Values near 0.0 mean price went back and forth without progress.
Why included: Momentum oscillators generate false signals in ranging markets. When ER is low, ADX is weak, and momentum sits inside the dead zone, the background turns gray - warning traders that conditions do not support directional strategies.
Momentum Curvature Analysis
Purpose : Early warning of potential reversals via oscillator curvature.
Method : Second derivative of momentum (how the slope is changing). When momentum is negative but curving upward (positive curvature with positive slope), bullish pressure is building from underneath before the trend visibly reverses. Strength is normalized against 30-bar standard deviation of curvature.
Important : This is purely mathematical curvature of the plotted oscillator. It does not use order flow, volume profile, bid/ask data, or any external source. The term "atmosphere" is a visual metaphor for the glow effect.
These components form an integrated pipeline - they are not independent indicators placed on the same pane. The oscillator provides visual momentum reading, Gaussian DI and ZLEMA ADX feed the lifecycle engine, spread acceleration detects phase transitions, ER provides regime context, and curvature adds reversal awareness. Each output feeds downstream components.
THE FIVE LIFECYCLE PHASES - DETECTION LOGIC EXPLAINED
The lifecycle band at the bottom displays one of five phases. Each has specific mathematical conditions that must all be true simultaneously. A state machine with configurable inertia prevents rapid flickering.
IGNITION - Cyan Band
Conditions : DI crossover within last N bars (default 4), spread acceleration above threshold (default 0.2), spread velocity above threshold (default 0.3), ADX rising for two consecutive bars.
Meaning : Momentum is being born. DI lines just crossed, the gap is accelerating open, ADX is waking. This is the earliest actionable signal. ADX may still be below 20.
State machine : IGNITION transitions instantly (1-bar inertia) because early detection speed matters.
THRUST - Green or Red Band (direction-coded)
Conditions : Past ignition window but within 3x that window, spread velocity above threshold (default 0.5), ADX surged more than threshold (default 1.5) over 3 bars.
Meaning : Young trend gaining real power. Spread velocity is high, ADX is confirming with a surge. The trend is no longer hypothesis - it is building strength.
State machine : THRUST transitions instantly.
PRIME - Deeper Green or Red Band (direction-coded)
Conditions : ADX above strong threshold (default 20), ADX either rising or above its signal line, DI spread above minimum (default 10).
Meaning : Mature, established trend. Maximum directional strength. Most productive phase - but also where exhaustion can begin. Use trailing stops.
State machine : Requires configured inertia (default 2 bars) before transition.
FADING - Orange Band
Conditions : ADX above strong threshold BUT falling AND below its signal line, OR ADX strong but spread velocity sharply negative (below -0.5).
Meaning : Trend is dying. ADX rolling over, DI gap closing. Time to tighten stops, take partials, prepare for next cycle.
State machine: Requires configured inertia before transition.
DEAD - Dark Gray Band
Conditions : None of the above active.
Meaning : No meaningful directional momentum. Market ranging, consolidating, or in transition. Directional strategies unlikely to perform well.
HOW TO READ THE OSCILLATOR PLOT
Momentum Line (thick, color-coded)
Bright green : Momentum positive and rising (bullish, strengthening)
Faded green : Momentum positive but falling (bullish, weakening)
Bright red: Momentum negative and falling (bearish, strengthening)
Faded red : Momentum negative but rising (bearish, weakening)
Gray : Momentum inside dead zone (noise, not signal)
Signal Line (thin orange)
EMA of momentum. Crossovers between momentum and signal highlight directional shifts, similar to MACD signal line usage.
Momentum-Signal Fill (shaded area between the two lines)
Teal shading: Momentum above signal (bullish bias)
Maroon shading: Momentum below signal (bearish bias)
This fill provides instant visual recognition of which line is dominant.
Histogram (vertical columns at zero line)
Shows the gap between momentum and signal.
Bright columns: Gap expanding (momentum pulling away, trend strengthening)
Faded columns: Gap contracting (momentum converging, trend weakening)
Green: Momentum above signal. Red: Momentum below signal.
Dead Zone (gray horizontal band around zero)
Dynamically calculated as a multiple (default 0.5x) of momentum's 50-bar standard deviation.
When momentum is inside this zone, directional signals are unreliable - the reading is within normal noise range.
Zero Line (dotted horizontal)
Momentum above zero: Net bullish pressure
Momentum below zero: Net bearish pressure
Zero line crosses represent directional bias shifts.
CONSOLIDATION ZONES - COILED ENERGY BEFORE BREAKOUTS
Yellow boxes appear on the oscillator when momentum energy is coiling - a potential precursor to a strong directional move.
Detection Logic
Two conditions must be simultaneously true:
Histogram (momentum-signal gap) is unusually tight relative to its recent 50-bar standard deviation.
Momentum slope is unusually flat relative to its recent 50-bar standard deviation.
Both thresholds are adaptive - they automatically adjust to each instrument's typical behavior. This means the indicator detects relative consolidation, not absolute levels, making it equally effective on volatile crypto and stable bonds.
Zone Lifecycle
New zone starts as dotted-border, light yellow box.
If it persists for minimum bar count (default 5), it upgrades to solid-border, brighter yellow - a validated zone.
If momentum drifts too far from where zone started (exceeds drift tolerance relative to zone height), the zone is invalidated and deleted. This prevents slow trends from being falsely labeled as consolidation.
When zone breaks (convergence conditions end), box color changes based on breakout direction: teal for bullish breakout, maroon for bearish breakout.
Only one active zone exists at a time to keep the chart clean.
How to Trade It
Validated consolidation zones (solid border) represent coiled momentum. Breakouts from these zones, especially when accompanied by IGNITION or THRUST phase, often produce strong directional moves. The breakout color immediately tells you the direction.
REVERSAL ATMOSPHERE - CURVATURE-BASED REVERSAL WARNING
A soft colored glow appears around the momentum line when mathematical curvature suggests a reversal is forming.
How It Works
The indicator calculates the second derivative of momentum (curvature - how the slope itself is changing).
Bullish reversal detection: Momentum is below zero (bearish), but slope has turned positive (rising), and curvature is positive (the rise is accelerating). This is the mathematical signature of a bottom forming - momentum is still negative but fighting back.
Bearish reversal detection: Mirror image. Momentum is above zero, but slope is negative and curvature is negative. A top is forming.
Visual Output
Green glow: Bullish reversal pressure building
Red glow: Bearish reversal pressure building
Glow intensity increases with curvature strength, normalized against 30-bar standard deviation
Glow width is configurable (default 8 units)
Important Clarification
This is purely mathematical analysis of the oscillator's own curvature. It does not incorporate order flow data, market depth, bid/ask spreads, or any external data source. The term "atmosphere" is a visual metaphor describing the glow effect, not a claim about market microstructure.
CHOPPY MARKET BACKGROUND - REGIME WARNING
When three conditions are all simultaneously true, the pane background turns gray:
Efficiency Ratio below choppy threshold (default 0.30)
ADX below choppy threshold (default 18)
Momentum inside dead zone
This gray background is a visual warning: "Market conditions are choppy. Momentum signals here are statistically less reliable. Consider waiting for cleaner conditions."
DASHBOARD - THE MOMENTUM WEATHER REPORT
A compact panel (position and size configurable) displaying five key readings:
PHASE
Current lifecycle phase name in corresponding color. Instantly shows where momentum is in its lifecycle.
BIRTH
DI spread acceleration status - is new momentum being created?
ACCELERATING (cyan) : Strong positive acceleration, momentum actively being born
BUILDING (green) : Moderate positive acceleration
QUIET (gray): No significant acceleration
DECELERATING (red): Negative acceleration, momentum creation slowing or reversing
FLOW
Directional bias with magnitude.
BULL : Bullish DI dominance. Number is DI spread (gap between +DI and -DI)
BEAR : Bearish DI dominance
FLAT : Momentum in dead zone, no meaningful directional bias
WEATHER
Overall assessment combining phase and vitality.
FAVORABLE (green): Active phase (IGNITION/THRUST/PRIME) with momentum outside dead zone. Conditions support directional trading.
CAUTION (orange): FADING phase, or PRIME with negative spread velocity. Trend may be exhausting.
UNFAVORABLE (red): DEAD phase or momentum in dead zone. Avoid directional strategies.
PRESSURE
Reversal pressure from curvature analysis.
BULLISH REV (green): Strong bullish reversal curvature
BEARISH REV (red): Strong bearish reversal curvature
BUILDING (cyan): Moderate reversal curvature forming
NONE (gray): No significant reversal pressure
COMPLETE SETTINGS REFERENCE
Core Momentum Oscillator
Fast ZLEMA Length (default 9): Fast moving average responsiveness. Lower = faster, noisier.
Slow ZLEMA Length (default 21): Baseline moving average. Gap between fast and slow produces momentum.
Signal Line Length (default 5): Smoothing period for signal line.
Momentum Smoothing (default 3): Additional noise reduction on raw momentum.
ATR Period (default 14): Normalization period for cross-instrument comparability.
Consolidation Zones
Show Consolidation Zones (default true): Toggle zone detection.
Histogram Sensitivity (default 1.0): How tight momentum-signal gap must be. Lower = stricter.
Slope Sensitivity (default 1.0): How flat momentum must be. Lower = stricter.
Minimum Bars (default 5): Shortest valid consolidation duration.
Drift Tolerance (default 0.4): Maximum directional drift before zone invalidation.
Regime Detection
Efficiency Ratio Period (default 10): Lookback for price efficiency calculation.
ER Smoothing (default 5): Smoothing to prevent rapid regime flipping.
Trend Threshold (default 0.4): ER above this = trending market.
Dead Zone Multiplier (default 0.5): Standard deviations defining the noise band.
Choppy ER Threshold (default 0.30): ER below this contributes to choppy warning.
Choppy ADX Threshold (default 18): ADX below this contributes to choppy warning.
Momentum Lifecycle
Show Lifecycle Band (default true): Toggle the colored phase band.
DI Calculation Length (default 14): Period for Gaussian-weighted +DI/-DI.
ADX Smoothing (default 14): ZLEMA smoothing on DX.
ADX Signal Length (default 5): EMA of ADX for crossover detection.
Ignition Window (default 4): Bars after DI cross qualifying for IGNITION.
State Inertia (default 2): Bars a phase must persist before official transition.
Ignition Accel Threshold (default 0.2): Minimum spread acceleration for IGNITION.
Ignition Velocity Threshold (default 0.3): Minimum spread velocity for IGNITION.
Thrust Velocity Threshold (default 0.5): Minimum spread velocity for THRUST.
ADX Surge Threshold (default 1.5): Minimum ADX rise over 3 bars for THRUST.
ADX Strong Threshold (default 20): ADX above this = strong trend (PRIME/FADING).
DI Spread Minimum (default 10): Minimum DI gap for PRIME confirmation.
Reversal Atmosphere
Show Reversal Atmosphere (default true): Toggle the curvature glow effect.
Glow Width (default 8): Visual width of atmospheric glow. Cosmetic only.
Display
Show Histogram (default true): Toggle momentum-signal histogram.
Show Momentum-Signal Fill (default true): Toggle shaded area between lines.
Show Choppy Background (default true): Toggle gray background warning.
Dashboard
Show Dashboard (default true): Toggle the weather report panel.
Dashboard Position (default Top Right): Panel location on chart.
Dashboard Size (default Small): Text size in panel.
Alerts
Alert on Ignition (default true): Notify when entering IGNITION phase.
Alert on Fading (default true): Notify when entering FADING phase.
Confirm on Bar Close (default true): Wait for bar close before firing alerts. Prevents false signals from intra-bar noise.
ALERTS
Two alert conditions target the most actionable lifecycle transitions:
IGNITION Onset
Fires when lifecycle enters IGNITION phase. Alert message includes directional bias (Bullish/Bearish), current ADX value, and how many bars since DI cross.
FADING Onset
Fires when lifecycle enters FADING phase. Alert message includes ADX value and current spread velocity.
Bar Close Confirmation
When enabled (default), alerts only fire after the bar closes. This prevents false alerts triggered by intra-bar price spikes that later reverse. Recommended to keep enabled for reliable signals.
RECOMMENDED TIMEFRAMES AND INSTRUMENTS
MLD works across all timeframes and instruments due to ATR normalization.
Default settings optimized for: Daily and 4-hour charts.
For lower timeframes (15m, 5m): Consider increasing Momentum Smoothing to 5 and State Inertia to 3 to filter noise.
For weekly charts: Default settings work without adjustment.
For highly volatile instruments (crypto, small caps): The adaptive thresholds automatically adjust. No manual tuning typically required.
For low-volatility instruments (bonds, some forex pairs): Consider reducing Dead Zone Multiplier to 0.3 for more sensitivity.
PRACTICAL EXAMPLE - MOMENTUM LIFECYCLE IN ACTION
Consider a stock range-bound for weeks. ADX reads 12. Traditional trend tools show nothing actionable.
Then +DI crosses above -DI. ADX is still 12. No traditional signal. But MLD detects that the DI spread is accelerating - the gap is not just opening, it is opening faster each bar. ADX has risen for two consecutive bars (waking up). The lifecycle band turns cyan: IGNITION. The dashboard shows BIRTH: ACCELERATING, WEATHER: FAVORABLE.
Over the next few bars, spread velocity increases. ADX surges upward. The band turns green: THRUST. The trend is confirmed and building.
ADX crosses above 20, continues rising, spread stays wide. Band turns deeper green: PRIME. This is the productive phase.
Eventually ADX peaks, starts falling, drops below its signal line. Spread velocity turns negative. Band turns orange: FADING. Dashboard shows WEATHER: CAUTION. Time to trail stops tightly.
ADX falls back below 20, momentum enters dead zone. Band turns gray: DEAD. The lifecycle is complete.
The value: MLD flagged IGNITION several bars before ADX would have signaled anything. It flagged FADING while ADX was still technically strong but deteriorating. This is the early detection advantage.
Chart Example 1:
BTC/USDT 5-minute is showing a classic FADING lifecycle : a bullish thrust peaked around 13:00–14:00, entered a validated consolidation zone, and is now visibly breaking down. The momentum line is curving sharply downward inside the yellow box, the band is orange (FADING), and FLOW has flipped to BEAR 17.9 : confirming the consolidation resolved bearishly, not bullishly. The earlier cyan IGNITION flash (~14:30) failed to sustain, overwhelmed by the dominant fading structure. The dashboard reads WEATHER: CAUTION, PRESSURE: NONE : no reversal energy building yet.
Chart Example 2:
BTC/USDT 15-minute is in DEAD phase with WEATHER: UNFAVORABLE : no tradeable momentum present. The dashboard tells the complete story: FLOW is FLAT meaning neither bulls nor bears have directional control, and PRESSURE is NONE meaning no reversal energy is building beneath the surface either. Despite BIRTH showing ACCELERATING, without flow direction or reversal pressure to back it up, the acceleration has no confirmed destination yet. Stand aside and wait for the lifecycle band to shift out of DEAD before committing.
WHAT MAKES THIS INDICATOR ORIGINAL
The originality lies in three specific innovations not present in standard ADX/DI implementations or common momentum oscillators:
DI Spread Acceleration Analysis
Standard tools measure the DI spread itself or track ADX thresholds. MLD applies derivative analysis - velocity and acceleration - to the spread, transforming a traditionally lagging measurement into a leading indicator of trend formation.
Gaussian-Weighted DI Calculation
Standard DI uses Wilder smoothing with equal weight to all bars. Gaussian decay weighting makes DI inherently more responsive to recent directional moves without the noise penalty of shorter periods.
Five-Phase Lifecycle Classification with Inertia-Gated State Machine
Rather than binary trend/no-trend output, MLD maps momentum onto a lifecycle model with distinct phases and specific mathematical criteria. The state machine prevents flickering while allowing speed-critical states (IGNITION, THRUST) to transition immediately.
These are integrated innovations, not independent indicators on the same pane. Each feeds into the lifecycle engine or provides context for its output.
DISCLAIMER
This indicator performs mathematical calculations on price data (open, high, low, close) only. It does not use order flow data, volume profile, market depth, bid/ask information, institutional positioning data, or any external data source.
Terms like "momentum birth," "reversal atmosphere," "weather," and " lifecycle " are descriptive metaphors for mathematical concepts (derivatives, curvature, efficiency ratios, state classification). They are not claims about market microstructure or participant behavior.
No indicator predicts future price movement. MLD identifies mathematical conditions historically associated with specific momentum behaviors. These conditions may or may not produce expected outcomes in any given instance.
This tool supplements - it does not replace - a complete trading plan including risk management, position sizing, and multiple forms of analysis. Always use proper risk management. Past indicator behavior does not guarantee future results.
Pine Script® インジケーター
















