OPEN-SOURCE SCRIPT
Bitcoin ETF Flows Z-Score | Astral Vision

Bitcoin ETF Flows Z-Score | Astral Vision 🌠💠
Daily ETF flow data is noisy by nature. A single large institutional redemption or creation event can dominate the raw number on any given day, making it difficult to distinguish between a statistically meaningful shift in institutional demand and normal day-to-day variation. This indicator solves that problem by normalizing each ETF's daily flow against its own rolling distribution, producing a Z-Score that measures how unusual today's flow is relative to that specific product's own history, and then combining those normalized readings into a single aggregate signal that is far more statistically robust than any raw flow total.
The key insight behind this approach is that absolute flow size is not what matters most. What matters is whether today's flow is unusual relative to what that ETF normally sees. A 5,000 BTC inflow into IBIT is unremarkable if IBIT regularly sees flows of that magnitude, but a 5,000 BTC inflow into a smaller product like EZBC would be an extreme outlier. By normalizing each product independently before aggregating, this indicator treats all ten ETFs as equal contributors to the signal regardless of their size, detecting coordinated multi-issuer flow anomalies that would be invisible in a simple raw total.
The oscillator in the sub-panel shows the 7-day smoothed aggregate Z-Score, filtered to reduce single-day noise. The table provides the real-time picture: the current Z-Score for each individual ETF plus its rolling average across three configurable periods, making it possible to see which issuers are driving or dragging the aggregate and whether their anomalous behavior is a single-day spike or a sustained trend.
Analytical Framework
Type of analysis: institutional flow anomaly detection, ETF demand quality assessment
Recommended timeframe: daily chart, best used as a macro demand quality overlay for position trading.
Signal type: normalized Z-Score oscillator with per-issuer multi-period breakdown table
How to interpret the signals
The oscillator and background color on the price chart are the primary real-time signals. When the smoothed Z-Score is above the upper threshold, ETF flows across the aggregate are statistically elevated relative to their own recent history, meaning institutional demand is running hotter than normal. This has historically preceded or accompanied upward price momentum. When it is below the lower threshold, flows are statistically depressed, meaning institutional demand is unusually weak even if some flows remain technically positive in raw terms.
The zero line is the most important structural reference. A sustained period of the Z-Score above zero means that more often than not, each day's flows are above each ETF's own historical average, indicating a regime of structurally elevated institutional demand. A sustained period below zero indicates the opposite: a regime where demand is consistently running below each product's own baseline.
The table is where the signal becomes actionable at the issuer level. Focus on the relationship between the current Z-Score and the rolling period averages for each ETF. An issuer with a high current Z-Score but a near-zero or negative long-period average is experiencing a sudden spike that is not part of a sustained trend, which may indicate a one-off event rather than a genuine shift in institutional appetite for that product. An issuer with a high Z-Score across all three periods, current, short, and long, is in a confirmed sustained flow expansion that is genuinely anomalous relative to its own history.
The most powerful signals come when multiple issuers simultaneously show elevated Z-Scores across all time periods. This indicates a broad coordinated increase in institutional demand across the entire ETF ecosystem, not just a rotation from one product to another, and has historically been associated with the strongest price performance windows.
GBTC's Z-Score readings deserve particular attention interpreted in reverse: a very negative GBTC Z-Score means outflows from that product are running unusually high even by GBTC's own elevated-outflow standards, adding unusual selling pressure on top of the structural outflow trend. When GBTC's Z-Score rises toward zero or positive, its outflow rate is normalizing, which historically has been a net positive for the aggregate balance.
How it differs from existing tools
Standard ETF flow tools compare raw Bitcoin amounts across issuers of vastly different sizes, which systematically overstates the significance of large-cap product flows and understates signals from smaller products. This indicator normalizes each issuer independently against its own rolling mean and standard deviation, then aggregates. A +2σ reading from EZBC carries the same weight as a +2σ reading from IBIT, making the combined signal sensitive to broad-based demand shifts rather than dominated by the largest product.
Plots 📊
Inputs 🎛️
Colors 🎨
5 Astral Vision presets + custom override. Default: Hermes.
Disclaimer ⭕️
This indicator is for informational and educational purposes only. It does not constitute financial advice. Past performance is not indicative of future results. Always do your own research before making investment decisions.
Daily ETF flow data is noisy by nature. A single large institutional redemption or creation event can dominate the raw number on any given day, making it difficult to distinguish between a statistically meaningful shift in institutional demand and normal day-to-day variation. This indicator solves that problem by normalizing each ETF's daily flow against its own rolling distribution, producing a Z-Score that measures how unusual today's flow is relative to that specific product's own history, and then combining those normalized readings into a single aggregate signal that is far more statistically robust than any raw flow total.
The key insight behind this approach is that absolute flow size is not what matters most. What matters is whether today's flow is unusual relative to what that ETF normally sees. A 5,000 BTC inflow into IBIT is unremarkable if IBIT regularly sees flows of that magnitude, but a 5,000 BTC inflow into a smaller product like EZBC would be an extreme outlier. By normalizing each product independently before aggregating, this indicator treats all ten ETFs as equal contributors to the signal regardless of their size, detecting coordinated multi-issuer flow anomalies that would be invisible in a simple raw total.
The oscillator in the sub-panel shows the 7-day smoothed aggregate Z-Score, filtered to reduce single-day noise. The table provides the real-time picture: the current Z-Score for each individual ETF plus its rolling average across three configurable periods, making it possible to see which issuers are driving or dragging the aggregate and whether their anomalous behavior is a single-day spike or a sustained trend.
Analytical Framework
Type of analysis: institutional flow anomaly detection, ETF demand quality assessment
Recommended timeframe: daily chart, best used as a macro demand quality overlay for position trading.
Signal type: normalized Z-Score oscillator with per-issuer multi-period breakdown table
How to interpret the signals
The oscillator and background color on the price chart are the primary real-time signals. When the smoothed Z-Score is above the upper threshold, ETF flows across the aggregate are statistically elevated relative to their own recent history, meaning institutional demand is running hotter than normal. This has historically preceded or accompanied upward price momentum. When it is below the lower threshold, flows are statistically depressed, meaning institutional demand is unusually weak even if some flows remain technically positive in raw terms.
The zero line is the most important structural reference. A sustained period of the Z-Score above zero means that more often than not, each day's flows are above each ETF's own historical average, indicating a regime of structurally elevated institutional demand. A sustained period below zero indicates the opposite: a regime where demand is consistently running below each product's own baseline.
The table is where the signal becomes actionable at the issuer level. Focus on the relationship between the current Z-Score and the rolling period averages for each ETF. An issuer with a high current Z-Score but a near-zero or negative long-period average is experiencing a sudden spike that is not part of a sustained trend, which may indicate a one-off event rather than a genuine shift in institutional appetite for that product. An issuer with a high Z-Score across all three periods, current, short, and long, is in a confirmed sustained flow expansion that is genuinely anomalous relative to its own history.
The most powerful signals come when multiple issuers simultaneously show elevated Z-Scores across all time periods. This indicates a broad coordinated increase in institutional demand across the entire ETF ecosystem, not just a rotation from one product to another, and has historically been associated with the strongest price performance windows.
GBTC's Z-Score readings deserve particular attention interpreted in reverse: a very negative GBTC Z-Score means outflows from that product are running unusually high even by GBTC's own elevated-outflow standards, adding unusual selling pressure on top of the structural outflow trend. When GBTC's Z-Score rises toward zero or positive, its outflow rate is normalizing, which historically has been a net positive for the aggregate balance.
How it differs from existing tools
Standard ETF flow tools compare raw Bitcoin amounts across issuers of vastly different sizes, which systematically overstates the significance of large-cap product flows and understates signals from smaller products. This indicator normalizes each issuer independently against its own rolling mean and standard deviation, then aggregates. A +2σ reading from EZBC carries the same weight as a +2σ reading from IBIT, making the combined signal sensitive to broad-based demand shifts rather than dominated by the largest product.
Plots 📊
- 7-day smoothed aggregate Z-Score oscillator with upper and lower threshold lines
- Zero baseline
- Background color on the price chart when aggregate Z-Score is in extreme zones
- Table with current Z-Score and three-period rolling averages for all ten ETFs plus the aggregate total, color-coded by sign
Inputs 🎛️
- Z-Score Length: rolling window for per-ETF mean and standard deviation normalization
- Threshold High and Low: configurable extreme zone boundaries for the oscillator
- Period A, B, C: rolling average windows in days for the three period columns in the table
Colors 🎨
5 Astral Vision presets + custom override. Default: Hermes.
Disclaimer ⭕️
This indicator is for informational and educational purposes only. It does not constitute financial advice. Past performance is not indicative of future results. Always do your own research before making investment decisions.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
My premium indicators are available on Whop:
whop.com/astralvision
Astral Vision 🌠💠
whop.com/astralvision
Astral Vision 🌠💠
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
My premium indicators are available on Whop:
whop.com/astralvision
Astral Vision 🌠💠
whop.com/astralvision
Astral Vision 🌠💠
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.