OPEN-SOURCE SCRIPT
已更新 Hussman Motherlode Approximation

█ OVERVIEW
This indicator approximates John Hussman's "Motherlode" composite, which flags conditions historically present at intermediate market peaks: overextended price action coinciding with deteriorating internal breadth. The composite draws red vertical lines when multiple breadth-divergence signals fire within a configurable lookback window.
The core composite requires joint occurrence of a confirmed Hindenburg Omen (Miekka two-phase method) and a Titanic Syndrome within 20 trading sessions. An optional Phase Transition proxy can be toggled on for a stricter three-signal requirement.
█ SIGNALS
Hindenburg Omen (Miekka Two-Phase)
Implements Jim Miekka's original two-phase methodology using NYSE breadth data:
• Phase 1 (Trigger): Both NYSE new 52-week highs and new 52-week lows exceed a threshold
percentage of total issues (advancing + declining), while the index is trading at or above its
level from N bars ago (uptrend filter). Both conditions must be true on the same bar.
• Phase 2 (Activation): Once triggered, a signal window opens for 30 bars. Within that window,
the omen is ACTIVE when the McClellan Oscillator (computed via the Ratio-Adjusted Net Advances
method from NYSE breadth) is negative, and INACTIVE when the MCO turns positive.
This two-phase approach reduces false signals relative to single-bar implementations by requiring
sustained breadth deterioration after the initial divergence.
Titanic Syndrome
Fires when NYSE new 52-week lows exceed NYSE new 52-week highs within 7 trading days of the chart
instrument making a 52-week high. This captures the specific condition of declining breadth beneath
a surface of index-level strength, often driven by narrow leadership.
Phase Transition Proxy (Optional)
Hussman's Phase Transition condition combines overvaluation, overbought price action, overbullish
sentiment, and rising yields. Since TradingView lacks direct feeds for valuation metrics and
Investors Intelligence sentiment data, this indicator approximates the condition using RSI
(overbought threshold) combined with an elevated 10-period smoothed NYSE advances ratio.
This proxy will overfire relative to Hussman's actual model. It is disabled in the composite by
default and should be treated as a rough filter, not a faithful reproduction. Enable it via the
"Require Phase Transition proxy" toggle in the Composite input group.
█ WHAT IS NOT INCLUDED
Hussman's full Motherlode composite also requires at least one instance of his proprietary
Syndrome 63 or Syndrome 74 within the lookback window. These syndromes are referenced in his
weekly commentaries but their exact formulas have never been published. This indicator does not
attempt to fabricate them. The info table on the chart displays "Not Available" for this component
as a permanent reminder.
This means the indicator will produce more signals than Hussman's published charts. Treat it as a
superset: every Hussman signal would appear here, but not every signal here would appear in
Hussman's version.
█ HOW TO USE
1 — Apply the indicator to a daily chart. It is designed for the S&P 500 (
SPX)
but will function on any instrument since breadth data is pulled independently via
`request.security()`. The uptrend filter and 52-week high detection use the chart instrument's
own price data.
2 — Red vertical lines mark bars where the composite condition is active. The first bar of each
new cluster draws a full-opacity line; sustained signal bars draw thinner, partially transparent
lines so you can distinguish onset from continuation.
3 — Use the info table (top-right corner) to see which components are currently active and their
raw values: McClellan Oscillator level, new highs/lows percentages, and Hindenburg Omen window
status.
4 — For component-level debugging, enable the optional background shading toggles in the Display
input group. These shade the chart background when individual signals are active:
• Orange: Hindenburg Omen active (within window, MCO negative)
• Purple: Titanic Syndrome firing
• Blue: Phase Transition proxy firing
█ INPUTS
Hindenburg Omen (Miekka)
• NH/NL Threshold (%): Minimum percentage of total NYSE issues that both new highs and new
lows must exceed. Default 2.8%.
• Uptrend Lookback (bars): The index must be at or above its close this many bars ago for the
trigger to fire. Default 50 (roughly 10 weeks).
• Signal Window (bars): After a trigger, the MCO gate remains active for this many bars.
Default 30.
Titanic Syndrome
• Days from 52wk High: How recently the chart instrument must have made a 52-week high for the
syndrome to be valid. Default 7.
Phase Transition Proxy
• RSI Length / Overbought: Standard RSI parameters for the overbought condition. Defaults 14 / 70.
• Bull% Threshold: The 10-bar smoothed NYSE advances ratio must exceed this level. Default 55%.
Composite
• Joint Signal Lookback: All required signals must have fired within this many bars. Default 20.
• Require Phase Transition proxy: Off by default. When enabled, the Phase Transition proxy must
also fire within the lookback for the composite to activate.
Display
• Vertical line color and width.
• Optional background shading for each individual component (all off by default).
█ DATA FEEDS
The indicator pulls four NYSE breadth series via `request.security()`:
• HHIGN — NYSE New 52-Week Highs
• LLOWN — NYSE New 52-Week Lows
• AADVN — NYSE Advancing Issues
• DDECN — NYSE Declining Issues
These feeds require a TradingView plan that includes access to NYSE breadth indices. If they
resolve to `NaN`, the indicator will not produce signals.
█ ALERTS
Four alert conditions are available:
• Motherlode Onset: Fires on the first bar of a new composite signal cluster.
• Hindenburg Trigger: Fires when Phase 1 trigger conditions are met.
• Hindenburg Active: Fires on every bar where the omen is active (within window, MCO negative).
• Titanic Syndrome: Fires when new lows exceed new highs near a 52-week high.
█ LIMITATIONS
• The Phase Transition proxy is a rough approximation. It lacks valuation data, Investors
Intelligence survey data, and yield curve inputs that Hussman's actual model uses.
• Syndromes 63 and 74 are not implemented. The composite will produce more signals than Hussman's
published version.
• The McClellan Oscillator is computed from NYSE breadth even when the chart instrument is not an
NYSE-based index. This is by design (the MCO measures broad market internals) but worth noting.
• The indicator draws `line` objects. TradingView limits these to 500 per indicator. On a daily
chart with default settings this is unlikely to be a constraint, but very long histories or
aggressive threshold settings could hit it.
• Vertical lines render correctly on both arithmetic and logarithmic scale charts.
█ REFERENCES
• Hussman, J. "The Motherlode." Weekly Market Comment, November 20, 2021.
hussmanfunds.com
• Hussman, J. "The Phase Transition." Weekly Market Comment, July 30, 2007.
hussmanfunds.com
• Miekka, J. The Hindenburg Omen. Documented in the Sudbury Bull & Bear Report.
█ DISCLAIMER
This indicator is an independent approximation. It is not affiliated with, endorsed by, or derived
from proprietary code of Hussman Strategic Advisors. Published signal history will not match
Hussman's charts exactly due to the omission of Syndromes 63/74 and the use of a Phase Transition
proxy rather than his actual model. Use at your own discretion as one input among many. This is not
financial advice.
This indicator approximates John Hussman's "Motherlode" composite, which flags conditions historically present at intermediate market peaks: overextended price action coinciding with deteriorating internal breadth. The composite draws red vertical lines when multiple breadth-divergence signals fire within a configurable lookback window.
The core composite requires joint occurrence of a confirmed Hindenburg Omen (Miekka two-phase method) and a Titanic Syndrome within 20 trading sessions. An optional Phase Transition proxy can be toggled on for a stricter three-signal requirement.
█ SIGNALS
Hindenburg Omen (Miekka Two-Phase)
Implements Jim Miekka's original two-phase methodology using NYSE breadth data:
• Phase 1 (Trigger): Both NYSE new 52-week highs and new 52-week lows exceed a threshold
percentage of total issues (advancing + declining), while the index is trading at or above its
level from N bars ago (uptrend filter). Both conditions must be true on the same bar.
• Phase 2 (Activation): Once triggered, a signal window opens for 30 bars. Within that window,
the omen is ACTIVE when the McClellan Oscillator (computed via the Ratio-Adjusted Net Advances
method from NYSE breadth) is negative, and INACTIVE when the MCO turns positive.
This two-phase approach reduces false signals relative to single-bar implementations by requiring
sustained breadth deterioration after the initial divergence.
Titanic Syndrome
Fires when NYSE new 52-week lows exceed NYSE new 52-week highs within 7 trading days of the chart
instrument making a 52-week high. This captures the specific condition of declining breadth beneath
a surface of index-level strength, often driven by narrow leadership.
Phase Transition Proxy (Optional)
Hussman's Phase Transition condition combines overvaluation, overbought price action, overbullish
sentiment, and rising yields. Since TradingView lacks direct feeds for valuation metrics and
Investors Intelligence sentiment data, this indicator approximates the condition using RSI
(overbought threshold) combined with an elevated 10-period smoothed NYSE advances ratio.
This proxy will overfire relative to Hussman's actual model. It is disabled in the composite by
default and should be treated as a rough filter, not a faithful reproduction. Enable it via the
"Require Phase Transition proxy" toggle in the Composite input group.
█ WHAT IS NOT INCLUDED
Hussman's full Motherlode composite also requires at least one instance of his proprietary
Syndrome 63 or Syndrome 74 within the lookback window. These syndromes are referenced in his
weekly commentaries but their exact formulas have never been published. This indicator does not
attempt to fabricate them. The info table on the chart displays "Not Available" for this component
as a permanent reminder.
This means the indicator will produce more signals than Hussman's published charts. Treat it as a
superset: every Hussman signal would appear here, but not every signal here would appear in
Hussman's version.
█ HOW TO USE
1 — Apply the indicator to a daily chart. It is designed for the S&P 500 (
but will function on any instrument since breadth data is pulled independently via
`request.security()`. The uptrend filter and 52-week high detection use the chart instrument's
own price data.
2 — Red vertical lines mark bars where the composite condition is active. The first bar of each
new cluster draws a full-opacity line; sustained signal bars draw thinner, partially transparent
lines so you can distinguish onset from continuation.
3 — Use the info table (top-right corner) to see which components are currently active and their
raw values: McClellan Oscillator level, new highs/lows percentages, and Hindenburg Omen window
status.
4 — For component-level debugging, enable the optional background shading toggles in the Display
input group. These shade the chart background when individual signals are active:
• Orange: Hindenburg Omen active (within window, MCO negative)
• Purple: Titanic Syndrome firing
• Blue: Phase Transition proxy firing
█ INPUTS
Hindenburg Omen (Miekka)
• NH/NL Threshold (%): Minimum percentage of total NYSE issues that both new highs and new
lows must exceed. Default 2.8%.
• Uptrend Lookback (bars): The index must be at or above its close this many bars ago for the
trigger to fire. Default 50 (roughly 10 weeks).
• Signal Window (bars): After a trigger, the MCO gate remains active for this many bars.
Default 30.
Titanic Syndrome
• Days from 52wk High: How recently the chart instrument must have made a 52-week high for the
syndrome to be valid. Default 7.
Phase Transition Proxy
• RSI Length / Overbought: Standard RSI parameters for the overbought condition. Defaults 14 / 70.
• Bull% Threshold: The 10-bar smoothed NYSE advances ratio must exceed this level. Default 55%.
Composite
• Joint Signal Lookback: All required signals must have fired within this many bars. Default 20.
• Require Phase Transition proxy: Off by default. When enabled, the Phase Transition proxy must
also fire within the lookback for the composite to activate.
Display
• Vertical line color and width.
• Optional background shading for each individual component (all off by default).
█ DATA FEEDS
The indicator pulls four NYSE breadth series via `request.security()`:
• HHIGN — NYSE New 52-Week Highs
• LLOWN — NYSE New 52-Week Lows
• AADVN — NYSE Advancing Issues
• DDECN — NYSE Declining Issues
These feeds require a TradingView plan that includes access to NYSE breadth indices. If they
resolve to `NaN`, the indicator will not produce signals.
█ ALERTS
Four alert conditions are available:
• Motherlode Onset: Fires on the first bar of a new composite signal cluster.
• Hindenburg Trigger: Fires when Phase 1 trigger conditions are met.
• Hindenburg Active: Fires on every bar where the omen is active (within window, MCO negative).
• Titanic Syndrome: Fires when new lows exceed new highs near a 52-week high.
█ LIMITATIONS
• The Phase Transition proxy is a rough approximation. It lacks valuation data, Investors
Intelligence survey data, and yield curve inputs that Hussman's actual model uses.
• Syndromes 63 and 74 are not implemented. The composite will produce more signals than Hussman's
published version.
• The McClellan Oscillator is computed from NYSE breadth even when the chart instrument is not an
NYSE-based index. This is by design (the MCO measures broad market internals) but worth noting.
• The indicator draws `line` objects. TradingView limits these to 500 per indicator. On a daily
chart with default settings this is unlikely to be a constraint, but very long histories or
aggressive threshold settings could hit it.
• Vertical lines render correctly on both arithmetic and logarithmic scale charts.
█ REFERENCES
• Hussman, J. "The Motherlode." Weekly Market Comment, November 20, 2021.
hussmanfunds.com
• Hussman, J. "The Phase Transition." Weekly Market Comment, July 30, 2007.
hussmanfunds.com
• Miekka, J. The Hindenburg Omen. Documented in the Sudbury Bull & Bear Report.
█ DISCLAIMER
This indicator is an independent approximation. It is not affiliated with, endorsed by, or derived
from proprietary code of Hussman Strategic Advisors. Published signal history will not match
Hussman's charts exactly due to the omission of Syndromes 63/74 and the use of a Phase Transition
proxy rather than his actual model. Use at your own discretion as one input among many. This is not
financial advice.
發行說明
v4: Selectable momentum gate for the Phase Transition proxy
The Phase Transition proxy momentum condition is now selectable via the new Momentum Gate input:
RSI (default): the original condition, RSI above the overbought threshold. Default behavior is unchanged from the previous version; existing settings reproduce prior output exactly.
MACD-V: the volatility normalised momentum measure by Alex Spiroglou, computed as (EMA 12 minus EMA 26) divided by ATR 26, multiplied by 100, gated above a configurable threshold (default 150). Because momentum is expressed in units of the instrument's own volatility, the overbought condition is regime stable rather than fixed scale.
New inputs: MACD-V Fast EMA (12), MACD-V Slow EMA (26), MACD-V ATR Length (26, keep equal to the slow length per Spiroglou), MACD-V Overbought (150).
The info table adds a PT Gate row showing the active gate's current value against its threshold.
Usage note: the MACD-V gate is a stricter filter and fires roughly three times less often than the RSI gate. In historical review it did not activate ahead of every episode the RSI gate flagged. Treat it as a confirmation grade setting, not a more sensitive detector. The composite is unaffected unless Require Phase Transition proxy is enabled.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。