OPEN-SOURCE SCRIPT
已更新 Money Flow Divergence Indicator

Overview
The Money Flow Divergence Indicator is designed to help traders and investors identify key macroeconomic turning points by analyzing the relationship between U.S. M2 money supply growth and the S&P 500 Index (SPX). By comparing these two crucial economic indicators, the script highlights periods where market liquidity is outpacing or lagging behind stock market growth, offering potential buy and sell signals based on macroeconomic trends.
How It Works
1. Data Sources
2. Growth Rate Calculation
3. Visualization
How to Use It
✅ Bullish Signal: When green bars appear consistently, indicating that liquidity is outpacing stock market growth. This suggests a favorable environment for buying or holding positions.
❌ Bearish Signal: When red bars appear consistently, meaning stock market growth outpaces liquidity expansion, signaling potential overvaluation or a market correction.
Best Timeframes for Analysis
This indicator works best on monthly timeframes (M) since it is designed for long-term investors and macro traders who focus on broad economic cycles.
Who Should Use This Indicator?
📈 Long-term investors looking for macroeconomic trends.
📊 Swing traders who incorporate liquidity analysis in their strategies.
💰 Portfolio managers assessing market liquidity conditions.
🚀 Use this indicator to stay ahead of market trends and make informed investment decisions based on macroeconomic liquidity shifts! 🚀
The Money Flow Divergence Indicator is designed to help traders and investors identify key macroeconomic turning points by analyzing the relationship between U.S. M2 money supply growth and the S&P 500 Index (SPX). By comparing these two crucial economic indicators, the script highlights periods where market liquidity is outpacing or lagging behind stock market growth, offering potential buy and sell signals based on macroeconomic trends.
How It Works
1. Data Sources
- S&P 500 Index (SPX500USD): Tracks the stock market performance.
- U.S. M2 Money Supply (M2SL - Federal Reserve Economic Data): Represents available liquidity in the economy.
2. Growth Rate Calculation
- SPX Growth: Percentage change in the S&P 500 index over time.
- M2 Growth: Percentage change in M2 money supply over time.
- Growth Gap (Delta): The difference between M2 growth and SPX growth, showing whether liquidity is fueling or lagging behind market performance.
3. Visualization
- A histogram displays the growth gap over time:
- Green Bars: M2 growth exceeds SPX growth (potential bullish signal).
- Red Bars: SPX growth exceeds M2 growth (potential bearish signal).
- A zero line helps distinguish between positive and negative growth gaps.
How to Use It
✅ Bullish Signal: When green bars appear consistently, indicating that liquidity is outpacing stock market growth. This suggests a favorable environment for buying or holding positions.
❌ Bearish Signal: When red bars appear consistently, meaning stock market growth outpaces liquidity expansion, signaling potential overvaluation or a market correction.
Best Timeframes for Analysis
This indicator works best on monthly timeframes (M) since it is designed for long-term investors and macro traders who focus on broad economic cycles.
Who Should Use This Indicator?
📈 Long-term investors looking for macroeconomic trends.
📊 Swing traders who incorporate liquidity analysis in their strategies.
💰 Portfolio managers assessing market liquidity conditions.
🚀 Use this indicator to stay ahead of market trends and make informed investment decisions based on macroeconomic liquidity shifts! 🚀
發行說明
OverviewThe Money Flow Divergence Indicator is designed to help traders and investors identify key macroeconomic turning points by analyzing the relationship between U.S.
M2 money supply growth and the S&P 500 Index (SPX). By comparing these two crucial economic indicators, the script highlights periods where market liquidity is outpacing or lagging behind stock market growth, offering potential buy and sell signals based on macroeconomic trends.
How It Works
1. Data Sources
S&P 500 Index (SPX500USD): Tracks the stock market performance.
U.S. M2 Money Supply (M2SL - Federal Reserve Economic Data): Represents available liquidity in the economy.
2. Growth Rate Calculation
- SPX Growth: Percentage change in the S&P 500 index over time.
- M2 Growth: Percentage change in M2 money supply over time.
- Growth Gap (Delta): The difference between M2 growth and SPX growth, showing whether liquidity is fueling or lagging behind market performance.
3. Visualization
A histogram displays the growth gap over time:
🟢 Green Bars: M2 growth exceeds SPX growth (potential bullish signal).
🔴 Red Bars: SPX growth exceeds M2 growth (potential bearish signal).
How to Use It
✅ Bullish Signal:
When green bars appear consistently, indicating that liquidity is outpacing stock market growth. This suggests a favorable environment for buying or holding positions.
❌ Bearish Signal:
When red bars appear consistently, meaning stock market growth outpaces liquidity expansion, signaling potential overvaluation or a market correction.
Best Timeframes for Analysis
This indicator works on Weekly (W) or Monthly (M) timeframes.
Works best on monthly (M) since it is designed for long-term investors and macro traders who focus on broad economic cycles.
Who Should Use This Indicator?
📈 Long-term investors looking for macroeconomic trends.
📊 Swing traders who incorporate liquidity analysis in their strategies.
💰 Portfolio managers assessing market liquidity conditions.
🚀 Use this indicator to stay ahead of market trends and make informed investment decisions based on macroeconomic liquidity shifts! 🚀
發行說明
...開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。