OPEN-SOURCE SCRIPT
Bitcoin Relative Macro Strength

BTC Relative Macro Strength
Overview
The BTC Relative Macro Strength indicator measures Bitcoin's price strength relative to the global macro environment. By tracking deviations from the macro trend, it identifies potentially overvalued and undervalued market phases.
The global macro trend is derived by multiplying the ISM PMI (a widely-used proxy for the business cycle) by a simplified measure of global liquidity.
Calculations
Global Liquidity = Fed Balance Sheet − Reverse Repo − Treasury General Account + U.S. M2 + China M2
Global Macro Trend = ISM PMI × Global Liquidity
Understanding the Global Macro Trend
The global macro trend plot combines the ebb and flow of global liquidity with the cyclical patterns of the business cycle. The resulting composite exhibits strong directional correlation with Bitcoin—or more precisely, Bitcoin appears to move in lockstep with liquidity conditions and business cycle phases.
This relationship has strengthened notably since COVID, likely because Bitcoin's growing market capitalization has increased its exposure to macro forces.
The takeaway is that Bitcoin is acutely sensitive to growth in the money supply (it trends with liquidity expansion) and oscillates with the phases of the business cycle.

Indicator Components
📊 Histogram: BTC/Macro Change
Displays the rolling percentage change of Bitcoin's price relative to the global macro trend.
High values: Bitcoin is outpacing macro conditions (potentially overvalued)
Low values: Bitcoin is underperforming macro conditions (potentially undervalued)
Color scheme:
🟢 Green = Positive deviation
🔴 Red = Negative deviation
📈 Macro Slope Line
Plots the scaled percentage change of the global macro trend itself.
Color scheme:
🔵 Teal = BULLISH (slope positive and rising)
⚪ Gray = NEUTRAL (slope and trend disagree)
🟣 Pink = BEARISH (slope negative and falling)
FieldDescription
BTC/Macro Change: Percentage change of Bitcoin's price vs. the Global Macro Trend (default: 21-bar average)
Macro Trend: Composite assessment combining slope direction and trend momentum. Reads BULLISH when both align upward, BEARISH when both align downward, NEUTRAL when they disagree
Macro Slope: The global macro trend's average slope expressed as a percentage
BTC Valuation: Relative valuation category based on BTC/Macro deviation (Extreme Premium → Extreme Discount)
BTC Price: Current Bitcoin price
How to Use
This indicator is primarily useful for identifying market phases where Bitcoin's price has diverged from the global macro trend.
Identify extremes: Look for periods when the histogram reaches elevated positive or negative levels
Assess valuation: Use the BTC Valuation reading to gauge relative over/undervaluation
Confirm with trend: Check whether macro conditions support or contradict the current price level
Mean reversion: Consider that significant deviations from trend historically tend to revert
Note: This indicator identifies relative valuation based on macro conditions—it does not predict price direction or timing.
Settings
Lookback Period - 21 bars - Number of bars for calculating rolling averages
Macro Slope Scale - 3.0 - Multiplier for macro slope line visibility
Overview
The BTC Relative Macro Strength indicator measures Bitcoin's price strength relative to the global macro environment. By tracking deviations from the macro trend, it identifies potentially overvalued and undervalued market phases.
The global macro trend is derived by multiplying the ISM PMI (a widely-used proxy for the business cycle) by a simplified measure of global liquidity.
Calculations
Global Liquidity = Fed Balance Sheet − Reverse Repo − Treasury General Account + U.S. M2 + China M2
Global Macro Trend = ISM PMI × Global Liquidity
Understanding the Global Macro Trend
The global macro trend plot combines the ebb and flow of global liquidity with the cyclical patterns of the business cycle. The resulting composite exhibits strong directional correlation with Bitcoin—or more precisely, Bitcoin appears to move in lockstep with liquidity conditions and business cycle phases.
This relationship has strengthened notably since COVID, likely because Bitcoin's growing market capitalization has increased its exposure to macro forces.
The takeaway is that Bitcoin is acutely sensitive to growth in the money supply (it trends with liquidity expansion) and oscillates with the phases of the business cycle.
Indicator Components
📊 Histogram: BTC/Macro Change
Displays the rolling percentage change of Bitcoin's price relative to the global macro trend.
High values: Bitcoin is outpacing macro conditions (potentially overvalued)
Low values: Bitcoin is underperforming macro conditions (potentially undervalued)
Color scheme:
🟢 Green = Positive deviation
🔴 Red = Negative deviation
📈 Macro Slope Line
Plots the scaled percentage change of the global macro trend itself.
Color scheme:
🔵 Teal = BULLISH (slope positive and rising)
⚪ Gray = NEUTRAL (slope and trend disagree)
🟣 Pink = BEARISH (slope negative and falling)
FieldDescription
BTC/Macro Change: Percentage change of Bitcoin's price vs. the Global Macro Trend (default: 21-bar average)
Macro Trend: Composite assessment combining slope direction and trend momentum. Reads BULLISH when both align upward, BEARISH when both align downward, NEUTRAL when they disagree
Macro Slope: The global macro trend's average slope expressed as a percentage
BTC Valuation: Relative valuation category based on BTC/Macro deviation (Extreme Premium → Extreme Discount)
BTC Price: Current Bitcoin price
How to Use
This indicator is primarily useful for identifying market phases where Bitcoin's price has diverged from the global macro trend.
Identify extremes: Look for periods when the histogram reaches elevated positive or negative levels
Assess valuation: Use the BTC Valuation reading to gauge relative over/undervaluation
Confirm with trend: Check whether macro conditions support or contradict the current price level
Mean reversion: Consider that significant deviations from trend historically tend to revert
Note: This indicator identifies relative valuation based on macro conditions—it does not predict price direction or timing.
Settings
Lookback Period - 21 bars - Number of bars for calculating rolling averages
Macro Slope Scale - 3.0 - Multiplier for macro slope line visibility
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。