OPEN-SOURCE SCRIPT
BTC vs Net USD Liquidity 13W ROC Lead

BTC vs Net USD Liquidity — ROC, Lead & Correlation
This indicator compares Bitcoin’s medium-term price momentum with changes in U.S. net dollar liquidity.
Net USD liquidity is calculated as:
Federal Reserve Total Assets
− Overnight Reverse Repo
− U.S. Treasury General Account
Data sources:
• ECONOMICS:USCBBS — Federal Reserve total assets
• FRED:RRPONTTLD — Overnight Reverse Repurchase Agreements
• FRED:WTREGEN — U.S. Treasury General Account balance
• User-selected BTC/USD symbol
The indicator displays:
• Bitcoin’s percentage change over a selected number of weeks
• Net USD liquidity’s percentage change over the same period
• Liquidity data shifted by a configurable lead period
• Rolling correlation between BTC momentum and the lag-adjusted liquidity impulse
Settings:
Change Period
Defines the number of weeks used to calculate the rate of change. For example, 13 measures the percentage change over the previous 13 weeks.
Liquidity Lead
Tests whether changes in net USD liquidity tend to lead Bitcoin. For example, a setting of 8 compares Bitcoin’s current momentum with the liquidity impulse observed eight weeks earlier.
Correlation Window
Defines the number of weeks used to calculate the rolling correlation.
Correlation interpretation:
• Values closer to +1 indicate a stronger positive relationship
• Values near 0 indicate weak or inconsistent linear correlation
• Values closer to −1 indicate a stronger inverse relationship
Rising net USD liquidity may create a more supportive macro environment for Bitcoin and other risk assets. Falling liquidity may create a more restrictive environment.
However, this relationship is not stable across all market cycles. Bitcoin may react with a changing time lag, and other factors such as ETF flows, leverage, interest rates, market positioning and global liquidity may dominate price action.
The indicator is intended for macroeconomic, liquidity-cycle and market-cycle analysis. It is not a standalone buy or sell signal.
For best results, use it on the weekly timeframe and compare several lead settings, such as 0, 4, 8 and 12 weeks.
Disclaimer:
This indicator is provided for informational and educational purposes only. It does not constitute financial or investment advice. Past correlation does not guarantee future performance.
This indicator compares Bitcoin’s medium-term price momentum with changes in U.S. net dollar liquidity.
Net USD liquidity is calculated as:
Federal Reserve Total Assets
− Overnight Reverse Repo
− U.S. Treasury General Account
Data sources:
• ECONOMICS:USCBBS — Federal Reserve total assets
• FRED:RRPONTTLD — Overnight Reverse Repurchase Agreements
• FRED:WTREGEN — U.S. Treasury General Account balance
• User-selected BTC/USD symbol
The indicator displays:
• Bitcoin’s percentage change over a selected number of weeks
• Net USD liquidity’s percentage change over the same period
• Liquidity data shifted by a configurable lead period
• Rolling correlation between BTC momentum and the lag-adjusted liquidity impulse
Settings:
Change Period
Defines the number of weeks used to calculate the rate of change. For example, 13 measures the percentage change over the previous 13 weeks.
Liquidity Lead
Tests whether changes in net USD liquidity tend to lead Bitcoin. For example, a setting of 8 compares Bitcoin’s current momentum with the liquidity impulse observed eight weeks earlier.
Correlation Window
Defines the number of weeks used to calculate the rolling correlation.
Correlation interpretation:
• Values closer to +1 indicate a stronger positive relationship
• Values near 0 indicate weak or inconsistent linear correlation
• Values closer to −1 indicate a stronger inverse relationship
Rising net USD liquidity may create a more supportive macro environment for Bitcoin and other risk assets. Falling liquidity may create a more restrictive environment.
However, this relationship is not stable across all market cycles. Bitcoin may react with a changing time lag, and other factors such as ETF flows, leverage, interest rates, market positioning and global liquidity may dominate price action.
The indicator is intended for macroeconomic, liquidity-cycle and market-cycle analysis. It is not a standalone buy or sell signal.
For best results, use it on the weekly timeframe and compare several lead settings, such as 0, 4, 8 and 12 weeks.
Disclaimer:
This indicator is provided for informational and educational purposes only. It does not constitute financial or investment advice. Past correlation does not guarantee future performance.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.