OPEN-SOURCE SCRIPT
Hindenburg Omen [Severity]

Hindenburg Omen [Miekka Method] - Severity Weighted
Most Hindenburg Omen implementations give you a binary answer: the omen fired or it didn't. This version tells you how alarmed to be. It replaces the binary trigger with a continuous divergence intensity score that measures how far above the threshold both new highs and new lows have pushed, while preserving Miekka's original two-phase methodology in every other respect.
A bar where 8% of stocks are hitting new highs and 6% are hitting new lows is a fundamentally more alarming signal than one barely crossing 2.8% on both sides. This indicator makes that distinction visible.
This is the fourth in a series of Hindenburg Omen indicators built on Miekka's original specification. The first corrects the widely misimplemented NYSE version. The second adapts it to the S&P 500 to avoid ETF noise. The third combines multiple universes into a consensus framework. This version adds severity grading to the base NYSE indicator.
═══════════════════════════════════════════════════════════════════
DIVERGENCE INTENSITY SCORE
The core addition is a single number:
Divergence Intensity = min(new_highs_%, new_lows_%) / threshold
• 1.0x means the weaker side is exactly at the threshold. Barely qualifying.
• 1.5x means the weaker side is 50% above the threshold. Notable.
• 2.0x means the weaker side is double the threshold. Severe.
• 2.5x+ is historically rare and indicates extreme breadth divergence.
The formula uses the lesser of the two percentages (new highs % and new lows %) because the omen requires BOTH to exceed the threshold. The weaker side is the binding constraint. If new highs are at 8% but new lows are at 3%, the intensity is 3% / 2.8% = 1.07x. The extreme highs reading does not compensate for a barely qualifying lows reading.
═══════════════════════════════════════════════════════════════════
HOW IT WORKS
The indicator preserves Miekka's two-phase structure exactly. Severity grading is layered on top without changing the underlying methodology.
Phase 1: Trigger
A trigger fires when divergence intensity reaches 1.0x or higher (both new highs % and new lows % exceed the threshold) AND the NYSE Composite is in an uptrend (at or above its value from 50 trading days ago). This opens a 30-trading-day signal window, identical to the base indicator.
Phase 2: Activation
Within the signal window, the omen is active when the McClellan Oscillator is negative and deactivated when it turns positive. The MCO is computed from NYSE advances and declines and acts as a sentiment gate, not a co-equal trigger condition.
Severity Layer
The trigger is classified into tiers based on intensity at the moment it fires:
• TRIGGER (1.0x to 1.5x) — Threshold met. Standard Hindenburg signal.
• ELEVATED (1.5x to 2.0x) — Meaningfully above threshold on both sides.
• SEVERE (2.0x+) — Double the threshold or more. Historically uncommon.
The indicator also tracks the peak intensity seen during each 30-day signal window. A window opened by a barely qualifying trigger that later sees a second, stronger trigger within the same window will reflect the higher reading. This matters because Miekka emphasized that clusters of signals within a window are stronger warnings than single occurrences.
═══════════════════════════════════════════════════════════════════
HOW TO READ THE CHART
Trigger Markers
• Yellow triangle "TRIGGER" — Intensity 1.0x to 1.5x. Standard threshold crossing.
• Orange triangle "ELEVATED" — Intensity 1.5x to 2.0x. Both sides meaningfully above threshold.
• Red triangle "SEVERE" — Intensity 2.0x or higher. Extreme breadth divergence.
Background Shading
• Graded maroon/red background: The omen is active (signal window open, MCO negative). The background intensity varies by the peak divergence score recorded during the current window. A window opened by a severe trigger has a deeper, more visible background than one opened by a marginal trigger. Per Miekka, this is the state where traders should consider going short or exiting long positions.
• Light orange background: A signal window is open but the MCO has turned positive, temporarily deactivating the omen. If the MCO dips negative again before the 30 days expire, the omen reactivates.
• No background: No active signal window.
Info Label
The floating label on the last bar shows:
• Current divergence intensity and its severity classification
• Raw new highs and new lows percentages with issue counts
• Uptrend condition status with index values
• McClellan Oscillator reading and gate status
• Signal window status with bars remaining
• Peak intensity recorded during the current window
═══════════════════════════════════════════════════════════════════
PRACTICAL INTERPRETATION
Not all Hindenburg Omen triggers are equal. Here is how to think about the severity tiers:
TRIGGER (1.0x to 1.5x): The threshold has been crossed, but not by much. This is the most common case and has the highest false positive rate. Worth noting, not worth panicking over. Watch for follow-up triggers within the 30-day window (cluster confirmation).
ELEVATED (1.5x to 2.0x): Both new highs and new lows are meaningfully above the threshold. The market is showing real internal disagreement. Pay closer attention. If this clusters with other signals in the same window, the warning carries significantly more weight.
SEVERE (2.0x+): Both sides are at double the threshold or beyond. This is historically uncommon and indicates extreme breadth divergence. When this coincides with a negative MCO, treat it as a high-priority risk management signal.
The intensity score also helps with near-misses. A reading of 0.9x means the market nearly triggered but fell just short. That context is useful even without a formal trigger.
═══════════════════════════════════════════════════════════════════
INPUTS
• New Highs/Lows Threshold % — The baseline threshold for new 52-week highs and lows as a percentage of NYSE advances + declines. Default 2.8% per Miekka. The intensity score is computed relative to this value.
• Positive Trend Lookback — Number of trading days used to confirm the NYSE Composite is in an uptrend. Default 50.
• Signal Window — Number of trading days the signal window remains open after a trigger. Default 30.
═══════════════════════════════════════════════════════════════════
ALERTS
Four alert conditions are available, allowing different notification urgencies for different severity levels:
• Severe Trigger: Fires only when intensity reaches 2.0x or higher.
• Elevated Trigger: Fires when intensity is between 1.5x and 2.0x.
• Any Trigger: Fires on any trigger at 1.0x or above.
• Omen Active: Fires when the omen is active (signal window open, MCO negative), regardless of the severity tier that opened the window.
═══════════════════════════════════════════════════════════════════
METHODOLOGY NOTES
This indicator preserves all corrections from the base Hindenburg Omen [Miekka Method] indicator:
• Threshold: Default 2.8% per Miekka's specification, not the widely misreported 2.2%.
• Denominator: Advances + declines, not total issues traded (which includes unchanged).
• MCO role: Two-phase gating mechanism within a 30-day signal window, not a co-equal trigger condition.
• NH/NL ratio filter: Removed. Not in Miekka's published methodology.
The severity grading is an analytical enhancement layered on top of Miekka's structure. It does not add, remove, or modify any of his conditions. It simply measures how far above the threshold the trigger has pushed, information that was always present in the data but discarded by binary implementations.
═══════════════════════════════════════════════════════════════════
DATA FEEDS
• `INDEX:MAHN` — NYSE new 52-week highs count
• `INDEX:MALN` — NYSE new 52-week lows count
• `USI:ADV` — NYSE advancing issues
• `USI:DECL` — NYSE declining issues
• `NYA` — NYSE Composite Index
═══════════════════════════════════════════════════════════════════
LIMITATIONS
• False positives: Even severe triggers can occur without subsequent declines. Severity grading reduces but does not eliminate false positives. Use as one input in a broader risk assessment framework.
• NYSE noise: This version runs against the full NYSE, which includes ETFs and structured products. For a cleaner universe, see the S&P 500 variant or the Multi-Universe Consensus variant in this series.
• Intensity is relative to threshold: Changing the threshold input changes all intensity readings. A 1.5x reading at a 2.8% threshold (4.2% actual) represents different market conditions than a 1.5x reading at a 2.2% threshold (3.3% actual). Be aware of this when comparing across different threshold settings.
• Data availability: The NYSE breadth feeds have limited historical depth on TradingView. The indicator will not produce signals prior to the start of these feeds (approximately 2015).
• Not investment advice: This indicator is a technical analysis tool. It does not constitute financial advice. Always conduct your own research and consult qualified professionals before making investment decisions.
═══════════════════════════════════════════════════════════════════
BACKGROUND
The Hindenburg Omen was developed by James R. Miekka in 1995 as a modified and restricted version of work originally published by Martin Zweig and later tweaked by Gerald Appel. It also draws on Norman G. Fosback's High Low Logic Index. Miekka was a high-school physics teacher who lost his eyesight after a laboratory explosion and worked almost entirely with formulas rather than charts. He published the indicator through his newsletter, the Sudbury Bull and Bear Report. The name was suggested by Kennedy Gammage, publisher of The Richland Report. Miekka passed away in 2014.
Claims that the Hindenburg Omen "predicted the crash of 1987" are retroactive backtests. Miekka did not develop the indicator until 1995.
═══════════════════════════════════════════════════════════════════
CREDITS
Part of the Hindenburg Omen [Miekka Method] series. Originally based on QuantNomad's Hindenburg Omen v4 indicator. Rewritten for Pine Script v6 with structural corrections to align with Miekka's published methodology.
Primary sources:
• Greg Morris, The Complete Guide to Market Breadth Indicators (contains material written directly by Miekka)
• Adaptiv Investments writeup documenting Miekka's original formula
• Tom McClellan's commentary at McClellan Financial Publications
Most Hindenburg Omen implementations give you a binary answer: the omen fired or it didn't. This version tells you how alarmed to be. It replaces the binary trigger with a continuous divergence intensity score that measures how far above the threshold both new highs and new lows have pushed, while preserving Miekka's original two-phase methodology in every other respect.
A bar where 8% of stocks are hitting new highs and 6% are hitting new lows is a fundamentally more alarming signal than one barely crossing 2.8% on both sides. This indicator makes that distinction visible.
This is the fourth in a series of Hindenburg Omen indicators built on Miekka's original specification. The first corrects the widely misimplemented NYSE version. The second adapts it to the S&P 500 to avoid ETF noise. The third combines multiple universes into a consensus framework. This version adds severity grading to the base NYSE indicator.
═══════════════════════════════════════════════════════════════════
DIVERGENCE INTENSITY SCORE
The core addition is a single number:
Divergence Intensity = min(new_highs_%, new_lows_%) / threshold
• 1.0x means the weaker side is exactly at the threshold. Barely qualifying.
• 1.5x means the weaker side is 50% above the threshold. Notable.
• 2.0x means the weaker side is double the threshold. Severe.
• 2.5x+ is historically rare and indicates extreme breadth divergence.
The formula uses the lesser of the two percentages (new highs % and new lows %) because the omen requires BOTH to exceed the threshold. The weaker side is the binding constraint. If new highs are at 8% but new lows are at 3%, the intensity is 3% / 2.8% = 1.07x. The extreme highs reading does not compensate for a barely qualifying lows reading.
═══════════════════════════════════════════════════════════════════
HOW IT WORKS
The indicator preserves Miekka's two-phase structure exactly. Severity grading is layered on top without changing the underlying methodology.
Phase 1: Trigger
A trigger fires when divergence intensity reaches 1.0x or higher (both new highs % and new lows % exceed the threshold) AND the NYSE Composite is in an uptrend (at or above its value from 50 trading days ago). This opens a 30-trading-day signal window, identical to the base indicator.
Phase 2: Activation
Within the signal window, the omen is active when the McClellan Oscillator is negative and deactivated when it turns positive. The MCO is computed from NYSE advances and declines and acts as a sentiment gate, not a co-equal trigger condition.
Severity Layer
The trigger is classified into tiers based on intensity at the moment it fires:
• TRIGGER (1.0x to 1.5x) — Threshold met. Standard Hindenburg signal.
• ELEVATED (1.5x to 2.0x) — Meaningfully above threshold on both sides.
• SEVERE (2.0x+) — Double the threshold or more. Historically uncommon.
The indicator also tracks the peak intensity seen during each 30-day signal window. A window opened by a barely qualifying trigger that later sees a second, stronger trigger within the same window will reflect the higher reading. This matters because Miekka emphasized that clusters of signals within a window are stronger warnings than single occurrences.
═══════════════════════════════════════════════════════════════════
HOW TO READ THE CHART
Trigger Markers
• Yellow triangle "TRIGGER" — Intensity 1.0x to 1.5x. Standard threshold crossing.
• Orange triangle "ELEVATED" — Intensity 1.5x to 2.0x. Both sides meaningfully above threshold.
• Red triangle "SEVERE" — Intensity 2.0x or higher. Extreme breadth divergence.
Background Shading
• Graded maroon/red background: The omen is active (signal window open, MCO negative). The background intensity varies by the peak divergence score recorded during the current window. A window opened by a severe trigger has a deeper, more visible background than one opened by a marginal trigger. Per Miekka, this is the state where traders should consider going short or exiting long positions.
• Light orange background: A signal window is open but the MCO has turned positive, temporarily deactivating the omen. If the MCO dips negative again before the 30 days expire, the omen reactivates.
• No background: No active signal window.
Info Label
The floating label on the last bar shows:
• Current divergence intensity and its severity classification
• Raw new highs and new lows percentages with issue counts
• Uptrend condition status with index values
• McClellan Oscillator reading and gate status
• Signal window status with bars remaining
• Peak intensity recorded during the current window
═══════════════════════════════════════════════════════════════════
PRACTICAL INTERPRETATION
Not all Hindenburg Omen triggers are equal. Here is how to think about the severity tiers:
TRIGGER (1.0x to 1.5x): The threshold has been crossed, but not by much. This is the most common case and has the highest false positive rate. Worth noting, not worth panicking over. Watch for follow-up triggers within the 30-day window (cluster confirmation).
ELEVATED (1.5x to 2.0x): Both new highs and new lows are meaningfully above the threshold. The market is showing real internal disagreement. Pay closer attention. If this clusters with other signals in the same window, the warning carries significantly more weight.
SEVERE (2.0x+): Both sides are at double the threshold or beyond. This is historically uncommon and indicates extreme breadth divergence. When this coincides with a negative MCO, treat it as a high-priority risk management signal.
The intensity score also helps with near-misses. A reading of 0.9x means the market nearly triggered but fell just short. That context is useful even without a formal trigger.
═══════════════════════════════════════════════════════════════════
INPUTS
• New Highs/Lows Threshold % — The baseline threshold for new 52-week highs and lows as a percentage of NYSE advances + declines. Default 2.8% per Miekka. The intensity score is computed relative to this value.
• Positive Trend Lookback — Number of trading days used to confirm the NYSE Composite is in an uptrend. Default 50.
• Signal Window — Number of trading days the signal window remains open after a trigger. Default 30.
═══════════════════════════════════════════════════════════════════
ALERTS
Four alert conditions are available, allowing different notification urgencies for different severity levels:
• Severe Trigger: Fires only when intensity reaches 2.0x or higher.
• Elevated Trigger: Fires when intensity is between 1.5x and 2.0x.
• Any Trigger: Fires on any trigger at 1.0x or above.
• Omen Active: Fires when the omen is active (signal window open, MCO negative), regardless of the severity tier that opened the window.
═══════════════════════════════════════════════════════════════════
METHODOLOGY NOTES
This indicator preserves all corrections from the base Hindenburg Omen [Miekka Method] indicator:
• Threshold: Default 2.8% per Miekka's specification, not the widely misreported 2.2%.
• Denominator: Advances + declines, not total issues traded (which includes unchanged).
• MCO role: Two-phase gating mechanism within a 30-day signal window, not a co-equal trigger condition.
• NH/NL ratio filter: Removed. Not in Miekka's published methodology.
The severity grading is an analytical enhancement layered on top of Miekka's structure. It does not add, remove, or modify any of his conditions. It simply measures how far above the threshold the trigger has pushed, information that was always present in the data but discarded by binary implementations.
═══════════════════════════════════════════════════════════════════
DATA FEEDS
• `INDEX:MAHN` — NYSE new 52-week highs count
• `INDEX:MALN` — NYSE new 52-week lows count
• `USI:ADV` — NYSE advancing issues
• `USI:DECL` — NYSE declining issues
• `NYA` — NYSE Composite Index
═══════════════════════════════════════════════════════════════════
LIMITATIONS
• False positives: Even severe triggers can occur without subsequent declines. Severity grading reduces but does not eliminate false positives. Use as one input in a broader risk assessment framework.
• NYSE noise: This version runs against the full NYSE, which includes ETFs and structured products. For a cleaner universe, see the S&P 500 variant or the Multi-Universe Consensus variant in this series.
• Intensity is relative to threshold: Changing the threshold input changes all intensity readings. A 1.5x reading at a 2.8% threshold (4.2% actual) represents different market conditions than a 1.5x reading at a 2.2% threshold (3.3% actual). Be aware of this when comparing across different threshold settings.
• Data availability: The NYSE breadth feeds have limited historical depth on TradingView. The indicator will not produce signals prior to the start of these feeds (approximately 2015).
• Not investment advice: This indicator is a technical analysis tool. It does not constitute financial advice. Always conduct your own research and consult qualified professionals before making investment decisions.
═══════════════════════════════════════════════════════════════════
BACKGROUND
The Hindenburg Omen was developed by James R. Miekka in 1995 as a modified and restricted version of work originally published by Martin Zweig and later tweaked by Gerald Appel. It also draws on Norman G. Fosback's High Low Logic Index. Miekka was a high-school physics teacher who lost his eyesight after a laboratory explosion and worked almost entirely with formulas rather than charts. He published the indicator through his newsletter, the Sudbury Bull and Bear Report. The name was suggested by Kennedy Gammage, publisher of The Richland Report. Miekka passed away in 2014.
Claims that the Hindenburg Omen "predicted the crash of 1987" are retroactive backtests. Miekka did not develop the indicator until 1995.
═══════════════════════════════════════════════════════════════════
CREDITS
Part of the Hindenburg Omen [Miekka Method] series. Originally based on QuantNomad's Hindenburg Omen v4 indicator. Rewritten for Pine Script v6 with structural corrections to align with Miekka's published methodology.
Primary sources:
• Greg Morris, The Complete Guide to Market Breadth Indicators (contains material written directly by Miekka)
• Adaptiv Investments writeup documenting Miekka's original formula
• Tom McClellan's commentary at McClellan Financial Publications
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.