OPEN-SOURCE SCRIPT
Smart Money Flow - Exchange & TVL Composite

# Smart Money Flow - Exchange & TVL Composite Indicator
## Overview
The **Smart Money Flow (SMF)** indicator combines two powerful on-chain metrics - **Exchange Flows** and **Total Value Locked (TVL)** - to create a composite index that tracks institutional and "smart money" movement in the cryptocurrency market. This indicator helps traders identify accumulation and distribution phases by analyzing where capital is flowing.
## What It Does
This indicator normalizes and combines:
- **Exchange Net Flow** (from IntoTheBlock): Tracks Bitcoin/Ethereum movement to and from exchanges
- **Total Value Locked** (from DefiLlama): Measures capital locked in DeFi protocols
The composite index is displayed on a 0-100 scale with clear zones for overbought/oversold conditions.
## Core Concept
### Exchange Flows
- **Negative Flow (Outflows)** = Bullish Signal
- Coins moving OFF exchanges → Long-term holding/accumulation
- Indicates reduced selling pressure
- **Positive Flow (Inflows)** = Bearish Signal
- Coins moving TO exchanges → Preparation for selling
- Indicates potential distribution phase
### Total Value Locked (TVL)
- **Rising TVL** = Bullish Signal
- Capital flowing into DeFi protocols
- Increased ecosystem confidence
- **Falling TVL** = Bearish Signal
- Capital exiting DeFi protocols
- Decreased ecosystem confidence
### Combined Signals
**🟢 Strong Bullish (70-100):**
- Exchange outflows + Rising TVL
- Smart money accumulating and deploying capital
**🔴 Strong Bearish (0-30):**
- Exchange inflows + Falling TVL
- Smart money preparing to sell and exiting positions
**⚪ Neutral (40-60):**
- Mixed or balanced flows
## Key Features
### ✅ Auto-Detection
- Automatically detects chart symbol (BTC/ETH)
- Uses appropriate exchange flow data for each asset
### ✅ Weighted Composite
- Customizable weights for Exchange Flow and TVL components
- Default: 50/50 balance
### ✅ Normalized Scale
- 0-100 index scale
- Configurable lookback period for normalization (default: 90 days)
### ✅ Signal Zones
- **Overbought**: 70+ (Strong bullish pressure)
- **Oversold**: 30- (Strong bearish pressure)
- **Extreme**: 85+ / 15- (Very strong signals)
### ✅ Clean Interface
- Minimal visual clutter by default
- Only main index line and MA visible
- Optional elements can be enabled:
- Background color zones
- Divergence signals
- Trend change markers
- Info table with detailed metrics
### ✅ Divergence Detection
- Identifies when price diverges from smart money flows
- Potential reversal warning signals
### ✅ Alerts
- Extreme overbought/oversold conditions
- Trend changes (crossing 50 line)
- Bullish/bearish divergences
## How to Use
### 1. Trend Confirmation
- Index above 50 = Bullish trend
- Index below 50 = Bearish trend
- Use with price action for confirmation
### 2. Reversal Signals
- **Extreme readings** (>85 or <15) suggest potential reversal
- Look for divergences between price and indicator
### 3. Accumulation/Distribution
- **70+**: Accumulation phase - smart money buying/holding
- **30-**: Distribution phase - smart money selling
### 4. DeFi Health
- Monitor TVL component for DeFi ecosystem strength
- Combine with exchange flows for complete picture
## Settings
### Data Sources
- **Exchange Flow**: IntoTheBlock real-time data
- **TVL**: DefiLlama aggregated DeFi TVL
- **Manual Mode**: For testing or custom data
### Indicator Settings
- **Smoothing Period (MA)**: Default 14 periods
- **Normalization Lookback**: Default 90 days
- **Exchange Flow Weight**: Adjustable 0-100%
- **Overbought/Oversold Levels**: Customizable thresholds
### Visual Options
- Show/Hide Moving Average
- Show/Hide Zone Lines
- Show/Hide Background Colors
- Show/Hide Divergence Signals
- Show/Hide Trend Markers
- Show/Hide Info Table
## Data Requirements
⚠️ **Important Notes:**
- Uses **daily data** from IntoTheBlock and DefiLlama
- Works on any chart timeframe (data updates daily)
- Auto-switches between BTC and ETH based on chart
- All other crypto charts default to BTC exchange flow data
## Best Practices
1. **Use on Daily+ Timeframes**
- On-chain data is daily, most effective on D/W/M charts
2. **Combine with Price Action**
- Use as confirmation, not standalone signals
3. **Watch for Divergences**
- Price making new highs while indicator falling = warning
4. **Monitor Extreme Zones**
- Sustained readings >85 or <15 indicate strong conviction
5. **Context Matters**
- Consider broader market conditions and fundamentals
## Calculation
1. **Exchange Net Flow** = Inflows - Outflows (inverted for index)
2. **TVL Rate of Change** = % change over smoothing period
3. **Normalize** both metrics to 0-100 scale
4. **Composite Index** = (ExchangeFlow × Weight) + (TVL × Weight)
5. **Smooth** with moving average
## Disclaimer
This indicator uses on-chain data for analysis. While valuable, it should not be used as the sole basis for trading decisions. Always combine with other technical analysis tools, fundamental analysis, and proper risk management.
On-chain data reflects blockchain activity but may lag price action. Use this indicator as part of a comprehensive trading strategy.
---
## Credits
**Data Sources:**
- IntoTheBlock: Exchange flow metrics
- DefiLlama: Total Value Locked data
**Indicator by:** iCD_creator
**Version:** 1.0
**Pine Script™ Version:** 6
---
## Updates & Support
For questions, suggestions, or bug reports, please comment below or message the author.
**Like this indicator? Leave a 👍 and share your feedback!**
## Overview
The **Smart Money Flow (SMF)** indicator combines two powerful on-chain metrics - **Exchange Flows** and **Total Value Locked (TVL)** - to create a composite index that tracks institutional and "smart money" movement in the cryptocurrency market. This indicator helps traders identify accumulation and distribution phases by analyzing where capital is flowing.
## What It Does
This indicator normalizes and combines:
- **Exchange Net Flow** (from IntoTheBlock): Tracks Bitcoin/Ethereum movement to and from exchanges
- **Total Value Locked** (from DefiLlama): Measures capital locked in DeFi protocols
The composite index is displayed on a 0-100 scale with clear zones for overbought/oversold conditions.
## Core Concept
### Exchange Flows
- **Negative Flow (Outflows)** = Bullish Signal
- Coins moving OFF exchanges → Long-term holding/accumulation
- Indicates reduced selling pressure
- **Positive Flow (Inflows)** = Bearish Signal
- Coins moving TO exchanges → Preparation for selling
- Indicates potential distribution phase
### Total Value Locked (TVL)
- **Rising TVL** = Bullish Signal
- Capital flowing into DeFi protocols
- Increased ecosystem confidence
- **Falling TVL** = Bearish Signal
- Capital exiting DeFi protocols
- Decreased ecosystem confidence
### Combined Signals
**🟢 Strong Bullish (70-100):**
- Exchange outflows + Rising TVL
- Smart money accumulating and deploying capital
**🔴 Strong Bearish (0-30):**
- Exchange inflows + Falling TVL
- Smart money preparing to sell and exiting positions
**⚪ Neutral (40-60):**
- Mixed or balanced flows
## Key Features
### ✅ Auto-Detection
- Automatically detects chart symbol (BTC/ETH)
- Uses appropriate exchange flow data for each asset
### ✅ Weighted Composite
- Customizable weights for Exchange Flow and TVL components
- Default: 50/50 balance
### ✅ Normalized Scale
- 0-100 index scale
- Configurable lookback period for normalization (default: 90 days)
### ✅ Signal Zones
- **Overbought**: 70+ (Strong bullish pressure)
- **Oversold**: 30- (Strong bearish pressure)
- **Extreme**: 85+ / 15- (Very strong signals)
### ✅ Clean Interface
- Minimal visual clutter by default
- Only main index line and MA visible
- Optional elements can be enabled:
- Background color zones
- Divergence signals
- Trend change markers
- Info table with detailed metrics
### ✅ Divergence Detection
- Identifies when price diverges from smart money flows
- Potential reversal warning signals
### ✅ Alerts
- Extreme overbought/oversold conditions
- Trend changes (crossing 50 line)
- Bullish/bearish divergences
## How to Use
### 1. Trend Confirmation
- Index above 50 = Bullish trend
- Index below 50 = Bearish trend
- Use with price action for confirmation
### 2. Reversal Signals
- **Extreme readings** (>85 or <15) suggest potential reversal
- Look for divergences between price and indicator
### 3. Accumulation/Distribution
- **70+**: Accumulation phase - smart money buying/holding
- **30-**: Distribution phase - smart money selling
### 4. DeFi Health
- Monitor TVL component for DeFi ecosystem strength
- Combine with exchange flows for complete picture
## Settings
### Data Sources
- **Exchange Flow**: IntoTheBlock real-time data
- **TVL**: DefiLlama aggregated DeFi TVL
- **Manual Mode**: For testing or custom data
### Indicator Settings
- **Smoothing Period (MA)**: Default 14 periods
- **Normalization Lookback**: Default 90 days
- **Exchange Flow Weight**: Adjustable 0-100%
- **Overbought/Oversold Levels**: Customizable thresholds
### Visual Options
- Show/Hide Moving Average
- Show/Hide Zone Lines
- Show/Hide Background Colors
- Show/Hide Divergence Signals
- Show/Hide Trend Markers
- Show/Hide Info Table
## Data Requirements
⚠️ **Important Notes:**
- Uses **daily data** from IntoTheBlock and DefiLlama
- Works on any chart timeframe (data updates daily)
- Auto-switches between BTC and ETH based on chart
- All other crypto charts default to BTC exchange flow data
## Best Practices
1. **Use on Daily+ Timeframes**
- On-chain data is daily, most effective on D/W/M charts
2. **Combine with Price Action**
- Use as confirmation, not standalone signals
3. **Watch for Divergences**
- Price making new highs while indicator falling = warning
4. **Monitor Extreme Zones**
- Sustained readings >85 or <15 indicate strong conviction
5. **Context Matters**
- Consider broader market conditions and fundamentals
## Calculation
1. **Exchange Net Flow** = Inflows - Outflows (inverted for index)
2. **TVL Rate of Change** = % change over smoothing period
3. **Normalize** both metrics to 0-100 scale
4. **Composite Index** = (ExchangeFlow × Weight) + (TVL × Weight)
5. **Smooth** with moving average
## Disclaimer
This indicator uses on-chain data for analysis. While valuable, it should not be used as the sole basis for trading decisions. Always combine with other technical analysis tools, fundamental analysis, and proper risk management.
On-chain data reflects blockchain activity but may lag price action. Use this indicator as part of a comprehensive trading strategy.
---
## Credits
**Data Sources:**
- IntoTheBlock: Exchange flow metrics
- DefiLlama: Total Value Locked data
**Indicator by:** iCD_creator
**Version:** 1.0
**Pine Script™ Version:** 6
---
## Updates & Support
For questions, suggestions, or bug reports, please comment below or message the author.
**Like this indicator? Leave a 👍 and share your feedback!**
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。