OPEN-SOURCE SCRIPT
Global Liquidity Sentiment (US / Europe / Asia)

# Global Liquidity Sentiment Dashboard (US / Europe / Asia) with Alerts
## Summary
Aggregates broad liquidity (M2 or proxies) from the **U.S., Europe, and Asia** into a normalized global index, compares it to Bitcoin price, and derives a heuristic **market sentiment** (Optimistic / Neutral / Pessimistic). Highlights imbalances via divergence detection and surfaces regime shifts with visual cues and alerts.
## Key Features
- Weighted composite **Global Liquidity Index** (US M2 + Europe + Asia).
- **BTC / Liquidity ratio** showing how stretched Bitcoin is relative to available liquidity.
- **Sentiment signal** combining liquidity trend and price-to-liquidity momentum.
- **Divergence detection** when BTC moves disproportionately vs liquidity.
- Colored summary table with metrics, regional weight breakdown, and trend emphasis.
- Alert conditions for sentiment flips and strong divergence events.
## Visual Output
- **Top-right table** displaying:
- Global Liquidity Index (normalized)
- BTC / Liquidity ratio
- Ratio momentum
- Divergence (%) from recent baseline
- Sentiment (Optimistic / Neutral / Pessimistic) with translucent color background
- Regional weights (US / EU / Asia)
- **Line plots**:
- Blue: Global Liquidity Index
- Orange: BTC / Liquidity
- Gray: Smoothed ratio baseline for divergence context
## Inputs
- **US M2 Money Stock:** Real US broad money (via `FRED:WM2NS`).
- **Europe / Asia:** Optionally use live symbol proxies (if available) or manual values.
- **FX rates:** Convert non-USD regional series into USD for aggregation.
- **Weights:** Adjust the relative contribution of US, Europe, and Asia to the composite index.
- **Liquidity SMA length:** Short-term smoothing for trend detection on liquidity.
- **Price/Liquidity momentum length:** Lookback for momentum of BTC-to-liquidity relationship.
- **Divergence SMA & threshold:** Baseline and sensitivity for flagging strong deviations.
## Interpretation
- **Optimistic:** Liquidity expanding and BTC gaining relative strength—risk-friendly environment.
- **Pessimistic:** Liquidity contracting while BTC weakens vs liquidity—potential fragility or correction risk.
- **Neutral:** Mixed or inconclusive signals.
- **High BTC / Liquidity ratio:** Bitcoin may be overextended relative to global liquidity support.
- **Strong Divergence:** Significant dislocation between BTC price and liquidity trend—possible precursor to mean reversion or continuation depending on context.
## Alerts
Built-in alert conditions:
- **Sentiment to Optimistic / Pessimistic / Neutral** — triggers when regime shifts.
- **Strong Divergence** — triggers when BTC/liquidity ratio deviates beyond the configured threshold from its recent smoothed average.
Suggested alert messages (preconfigured):
- “Sentiment changed to Optimistic”
- “Sentiment changed to Pessimistic”
- “Sentiment changed to Neutral”
- “Strong divergence between BTC and global liquidity detected”
## Usage Tips
- Use the sentiment as a macro liquidity backdrop to contextualize BTC moves.
- Monitor divergence to catch overextensions or early signs of trend exhaustion.
- Tweak regional weights to reflect evolving global liquidity influence (e.g., give more weight to Asia as its footprint grows).
- If regional proxies aren’t available, regularly update manual values from official sources (ECB, BOJ, PBOC) to keep the index relevant.
## Limitations
- Europe/Asia liquidity may rely on manual inputs or imperfect proxies (TradingView may not expose official M2 for all regions).
- Heuristic sentiment and divergence are not standalone trade signals—validate with price structure / other confirmations.
- Does not replace high-fidelity on-chain, order book, or institutional flow data.
## Example Scenario
Bitcoin rallies sharply while the Global Liquidity Index flattens. The BTC / Liquidity ratio spikes, divergence crosses threshold, and sentiment shifts toward **Pessimistic**—indicating the move may be running ahead of underlying liquidity support, signaling caution or a possible retracement.
## Summary
Aggregates broad liquidity (M2 or proxies) from the **U.S., Europe, and Asia** into a normalized global index, compares it to Bitcoin price, and derives a heuristic **market sentiment** (Optimistic / Neutral / Pessimistic). Highlights imbalances via divergence detection and surfaces regime shifts with visual cues and alerts.
## Key Features
- Weighted composite **Global Liquidity Index** (US M2 + Europe + Asia).
- **BTC / Liquidity ratio** showing how stretched Bitcoin is relative to available liquidity.
- **Sentiment signal** combining liquidity trend and price-to-liquidity momentum.
- **Divergence detection** when BTC moves disproportionately vs liquidity.
- Colored summary table with metrics, regional weight breakdown, and trend emphasis.
- Alert conditions for sentiment flips and strong divergence events.
## Visual Output
- **Top-right table** displaying:
- Global Liquidity Index (normalized)
- BTC / Liquidity ratio
- Ratio momentum
- Divergence (%) from recent baseline
- Sentiment (Optimistic / Neutral / Pessimistic) with translucent color background
- Regional weights (US / EU / Asia)
- **Line plots**:
- Blue: Global Liquidity Index
- Orange: BTC / Liquidity
- Gray: Smoothed ratio baseline for divergence context
## Inputs
- **US M2 Money Stock:** Real US broad money (via `FRED:WM2NS`).
- **Europe / Asia:** Optionally use live symbol proxies (if available) or manual values.
- **FX rates:** Convert non-USD regional series into USD for aggregation.
- **Weights:** Adjust the relative contribution of US, Europe, and Asia to the composite index.
- **Liquidity SMA length:** Short-term smoothing for trend detection on liquidity.
- **Price/Liquidity momentum length:** Lookback for momentum of BTC-to-liquidity relationship.
- **Divergence SMA & threshold:** Baseline and sensitivity for flagging strong deviations.
## Interpretation
- **Optimistic:** Liquidity expanding and BTC gaining relative strength—risk-friendly environment.
- **Pessimistic:** Liquidity contracting while BTC weakens vs liquidity—potential fragility or correction risk.
- **Neutral:** Mixed or inconclusive signals.
- **High BTC / Liquidity ratio:** Bitcoin may be overextended relative to global liquidity support.
- **Strong Divergence:** Significant dislocation between BTC price and liquidity trend—possible precursor to mean reversion or continuation depending on context.
## Alerts
Built-in alert conditions:
- **Sentiment to Optimistic / Pessimistic / Neutral** — triggers when regime shifts.
- **Strong Divergence** — triggers when BTC/liquidity ratio deviates beyond the configured threshold from its recent smoothed average.
Suggested alert messages (preconfigured):
- “Sentiment changed to Optimistic”
- “Sentiment changed to Pessimistic”
- “Sentiment changed to Neutral”
- “Strong divergence between BTC and global liquidity detected”
## Usage Tips
- Use the sentiment as a macro liquidity backdrop to contextualize BTC moves.
- Monitor divergence to catch overextensions or early signs of trend exhaustion.
- Tweak regional weights to reflect evolving global liquidity influence (e.g., give more weight to Asia as its footprint grows).
- If regional proxies aren’t available, regularly update manual values from official sources (ECB, BOJ, PBOC) to keep the index relevant.
## Limitations
- Europe/Asia liquidity may rely on manual inputs or imperfect proxies (TradingView may not expose official M2 for all regions).
- Heuristic sentiment and divergence are not standalone trade signals—validate with price structure / other confirmations.
- Does not replace high-fidelity on-chain, order book, or institutional flow data.
## Example Scenario
Bitcoin rallies sharply while the Global Liquidity Index flattens. The BTC / Liquidity ratio spikes, divergence crosses threshold, and sentiment shifts toward **Pessimistic**—indicating the move may be running ahead of underlying liquidity support, signaling caution or a possible retracement.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.