OPEN-SOURCE SCRIPT
BTC ETF Average Inflow Cost Basis

Concept
Since the historic launch of Bitcoin Spot ETFs on January 11, 2024, institutional flows have become a major driver of price action. This indicator aims to visualize the aggregate Cost Basis (average entry price) of the major Bitcoin ETFs relative to the underlying asset.
It serves as an on-chain proxy for institutional positioning, helping traders identify critical support levels where ETF inflows have historically concentrated.
How it Works
The script aggregates daily volume data from the top Bitcoin ETFs (IBIT, FBTC, ARKB, GBTC, BITB) and compares it against the Bitcoin price (BTCUSDT).
ETF Cost Basis (Pink Line):
This is calculated as a Cumulative Volume-Weighted Average Price (VWAP), anchored specifically to the ETF launch date (Jan 11, 2024).
Formula: It accumulates (BTC Price * Total ETF Volume) and divides it by the Cumulative Total ETF Volume.
This creates a dynamic level representing the "breakeven" price for the aggregate volume traded through these funds.
True Market Mean (Gray Line):
This represents the simple cumulative average of the Bitcoin price since the ETF launch date. It acts as a neutral baseline for the post-ETF market era.
How to Use
Institutional Support: The Cost Basis line often acts as a strong dynamic support level during corrections. When price revisits this level, it suggests the market is returning to the average institutional entry price.
Trend Filter:
Price > Cost Basis: The market is in a net profit state relative to ETF flows (Bullish/Trend continuation).
Price < Cost Basis: The market is in a net loss state (Bearish/Capitulation risk).
Confluence: The intersection of the Cost Basis and the True Market Mean can signal pivotal moments of trend reset.
Features
Data Aggregation: Pulls data from 5 major ETFs via request.security without repainting (using closed bars).
Dashboard: Includes a table in the top-right corner displaying real-time values for Price, Cost Basis, and Market Mean.
Customization: You can toggle individual ETF Moving Averages in the settings (disabled by default due to price scale differences between BTC and ETF shares).
Disclaimer
This tool is for educational purposes only and attempts to estimate institutional cost basis using volume proxies. It does not represent financial advice.
Since the historic launch of Bitcoin Spot ETFs on January 11, 2024, institutional flows have become a major driver of price action. This indicator aims to visualize the aggregate Cost Basis (average entry price) of the major Bitcoin ETFs relative to the underlying asset.
It serves as an on-chain proxy for institutional positioning, helping traders identify critical support levels where ETF inflows have historically concentrated.
How it Works
The script aggregates daily volume data from the top Bitcoin ETFs (IBIT, FBTC, ARKB, GBTC, BITB) and compares it against the Bitcoin price (BTCUSDT).
ETF Cost Basis (Pink Line):
This is calculated as a Cumulative Volume-Weighted Average Price (VWAP), anchored specifically to the ETF launch date (Jan 11, 2024).
Formula: It accumulates (BTC Price * Total ETF Volume) and divides it by the Cumulative Total ETF Volume.
This creates a dynamic level representing the "breakeven" price for the aggregate volume traded through these funds.
True Market Mean (Gray Line):
This represents the simple cumulative average of the Bitcoin price since the ETF launch date. It acts as a neutral baseline for the post-ETF market era.
How to Use
Institutional Support: The Cost Basis line often acts as a strong dynamic support level during corrections. When price revisits this level, it suggests the market is returning to the average institutional entry price.
Trend Filter:
Price > Cost Basis: The market is in a net profit state relative to ETF flows (Bullish/Trend continuation).
Price < Cost Basis: The market is in a net loss state (Bearish/Capitulation risk).
Confluence: The intersection of the Cost Basis and the True Market Mean can signal pivotal moments of trend reset.
Features
Data Aggregation: Pulls data from 5 major ETFs via request.security without repainting (using closed bars).
Dashboard: Includes a table in the top-right corner displaying real-time values for Price, Cost Basis, and Market Mean.
Customization: You can toggle individual ETF Moving Averages in the settings (disabled by default due to price scale differences between BTC and ETF shares).
Disclaimer
This tool is for educational purposes only and attempts to estimate institutional cost basis using volume proxies. It does not represent financial advice.
Open-source script
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.
Disclaimer
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.
Open-source script
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.
Disclaimer
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.