OPEN-SOURCE SCRIPT
Liquidity Layout

Liquidity Layout
The Liquidity Layout is a comprehensive macroeconomic indicator that tracks global liquidity conditions by aggregating multiple financial data streams from major economies (US, EU, China, Japan, UK, Canada, Switzerland). It provides traders with a macro view of market liquidity to help identify favorable conditions for risk assets
⚠️ Important: Timeframe Settings
This indicator is designed for the 1W (weekly) timeframe. If you use other timeframes, you must adjust the offset parameter in the settings to properly align the data with price action. The default offset of 12 is calibrated for weekly charts.
What It Measures
This indicator combines seven key components of global liquidity:
1. Global M2 Money Supply - Tracks broad money supply (M2) plus 10% of narrow money supply (M1) across major economies, weighted by currency strength. This represents the total amount of money circulating in the private sector.
2. Central Bank Balance Sheets (CBBS) - Monitors the combined balance sheets of major central banks (Fed, ECB, BoJ, PBoC, etc.), reflecting quantitative easing and monetary expansion policies.
3. Foreign Exchange Reserves (FER) - Aggregates forex reserves held by central banks, indicating international liquidity buffers and capital flows.
4. Current Account + Capital Flows (CA) - Combines current account balances with capital flows to measure cross-border money movement and trade liquidity.
5. Government Spending (GSP) - Tracks government expenditure minus a portion of federal expenses, representing fiscal stimulus and public sector liquidity injection.
6. World Currency Unit (WCU) - A custom forex composite that weights major and emerging market currencies to capture global currency strength dynamics.
7. Bond Market Conditions - Analyzes yield curves, spreads, and bond indices to assess credit conditions and risk appetite in fixed income markets.
The Formula
The indicator uses two main calculation modes:
ADJ Global Liquidity (Default):
[(M2/10 + CBBS×0.01 + FER/10 + CA/2 + GSP)] × [WCU + (Bond Yield×0.03 + Bonds×0.004)]
This multiplies liquidity components by currency and bond market factors to capture the interactive effects between monetary conditions and market sentiment.
TPI (Trend Power Index) Mode:
A normalized version that combines all components with optimized weights:
Global Liquidity Index: 10%
Bonds: 17.5%
Bond Yields: 25%
Currency Strength: 25%
Government Spending: 5%
Current Account: 5%
M2: 2.5%
Central Bank Balance Sheets: 2.5%
Forex Reserves: 5%
Oil (macro risk indicator): 2.5%
How to Use It
Visualization Modes:
Background Mode (default): Orange background appears when TPI is positive (favorable liquidity conditions)
Line Mode: Displays the indicator as an orange line with customizable offset
Interpreting the Signal:
Positive/Rising = Expanding liquidity, generally bullish for risk assets
Negative/Falling = Contracting liquidity, risk-off environment
TPI > 1 = Extremely favorable conditions (upper threshold)
TPI < -1 = Severe liquidity stress (lower threshold)
Best Practices:
Use on higher timeframes (daily, weekly) for macro trend analysis
Combine with price action - liquidity often leads market moves by weeks or months
Watch for divergences between liquidity and asset prices
Particularly relevant for Bitcoin, equities, and risk assets
Data Sources
The indicator pulls real-time economic data from TradingView's ECONOMICS database and major market indices, including central bank statistics, government reports, and forex rates across G7 and major emerging markets.
Settings
Data Plot: Choose which liquidity component to display
Plot Type: Switch between raw Index values or normalized TPI
Offset: Shift the plot forward/backward for alignment (default: 12 for weekly charts)
Style: Background shading or line plot
Notes
This is a macro-level indicator best suited for understanding the broader liquidity environment rather than short-term trading signals. It helps answer the question: "Is the global financial system expanding or contracting liquidity?"
The Liquidity Layout is a comprehensive macroeconomic indicator that tracks global liquidity conditions by aggregating multiple financial data streams from major economies (US, EU, China, Japan, UK, Canada, Switzerland). It provides traders with a macro view of market liquidity to help identify favorable conditions for risk assets
⚠️ Important: Timeframe Settings
This indicator is designed for the 1W (weekly) timeframe. If you use other timeframes, you must adjust the offset parameter in the settings to properly align the data with price action. The default offset of 12 is calibrated for weekly charts.
What It Measures
This indicator combines seven key components of global liquidity:
1. Global M2 Money Supply - Tracks broad money supply (M2) plus 10% of narrow money supply (M1) across major economies, weighted by currency strength. This represents the total amount of money circulating in the private sector.
2. Central Bank Balance Sheets (CBBS) - Monitors the combined balance sheets of major central banks (Fed, ECB, BoJ, PBoC, etc.), reflecting quantitative easing and monetary expansion policies.
3. Foreign Exchange Reserves (FER) - Aggregates forex reserves held by central banks, indicating international liquidity buffers and capital flows.
4. Current Account + Capital Flows (CA) - Combines current account balances with capital flows to measure cross-border money movement and trade liquidity.
5. Government Spending (GSP) - Tracks government expenditure minus a portion of federal expenses, representing fiscal stimulus and public sector liquidity injection.
6. World Currency Unit (WCU) - A custom forex composite that weights major and emerging market currencies to capture global currency strength dynamics.
7. Bond Market Conditions - Analyzes yield curves, spreads, and bond indices to assess credit conditions and risk appetite in fixed income markets.
The Formula
The indicator uses two main calculation modes:
ADJ Global Liquidity (Default):
[(M2/10 + CBBS×0.01 + FER/10 + CA/2 + GSP)] × [WCU + (Bond Yield×0.03 + Bonds×0.004)]
This multiplies liquidity components by currency and bond market factors to capture the interactive effects between monetary conditions and market sentiment.
TPI (Trend Power Index) Mode:
A normalized version that combines all components with optimized weights:
Global Liquidity Index: 10%
Bonds: 17.5%
Bond Yields: 25%
Currency Strength: 25%
Government Spending: 5%
Current Account: 5%
M2: 2.5%
Central Bank Balance Sheets: 2.5%
Forex Reserves: 5%
Oil (macro risk indicator): 2.5%
How to Use It
Visualization Modes:
Background Mode (default): Orange background appears when TPI is positive (favorable liquidity conditions)
Line Mode: Displays the indicator as an orange line with customizable offset
Interpreting the Signal:
Positive/Rising = Expanding liquidity, generally bullish for risk assets
Negative/Falling = Contracting liquidity, risk-off environment
TPI > 1 = Extremely favorable conditions (upper threshold)
TPI < -1 = Severe liquidity stress (lower threshold)
Best Practices:
Use on higher timeframes (daily, weekly) for macro trend analysis
Combine with price action - liquidity often leads market moves by weeks or months
Watch for divergences between liquidity and asset prices
Particularly relevant for Bitcoin, equities, and risk assets
Data Sources
The indicator pulls real-time economic data from TradingView's ECONOMICS database and major market indices, including central bank statistics, government reports, and forex rates across G7 and major emerging markets.
Settings
Data Plot: Choose which liquidity component to display
Plot Type: Switch between raw Index values or normalized TPI
Offset: Shift the plot forward/backward for alignment (default: 12 for weekly charts)
Style: Background shading or line plot
Notes
This is a macro-level indicator best suited for understanding the broader liquidity environment rather than short-term trading signals. It helps answer the question: "Is the global financial system expanding or contracting liquidity?"
Skrip sumber terbuka
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.
Penafian
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.
Skrip sumber terbuka
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.
Penafian
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.