OPEN-SOURCE SCRIPT

BTC ETF Average Inflow Cost Basis

83
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.

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。