OPEN-SOURCE SCRIPT

Multi-timeframe Spot ETH ETF flows

80
Description of Multi-timeframe Spot ETH ETF Flows Pine Script

This Pine Script™ (version 6) creates a Multi-timeframe Spot ETH ETF Flows indicator to track and visualize net and cumulative capital flows for various Ethereum (ETH) Spot Exchange-Traded Funds (ETFs) listed on AMEX and NASDAQ. The script calculates up and down volume based on price movements in a lower timeframe, multiplies these by the average price (HLC3) for accuracy, and aggregates the data to display net and cumulative flows.

Key Features:
  1. [] ETF List: Tracks nine ETH Spot ETFs (e.g., AMEX:ETHE, NASDAQ:ETHA, etc.).
    [] Custom Timeframe Input: Allows users to override the default lower timeframe (automatically selected based on the chart’s timeframe) with a custom timeframe (default: 720 minutes). Higher timeframes provide more historical data but less precision.
    [] Volume Analysis: Calculates positive (up) and negative (down) volume based on price movements (close vs. open or close vs. previous close) in the lower timeframe, weighted by the average price.
    [] Net and Cumulative Flows:

    Net flow is the sum of up and down volumes across all ETFs, displayed as colored columns (green for positive, red for negative, with transparency based on trend direction).
    Cumulative flow is the running total of net flows since the ETFs' launch, plotted as a line.
  2. Visualization: Uses dynamic colors for net flow columns to indicate direction and strength, with a black line for cumulative flow.

Technical Details:
  1. [] Data Retrieval: Uses request.security and request.security_lower_tf to fetch price and volume data from lower timeframes.
    [] Array Processing: Sums up and down volume arrays to compute net flows for each ETF.
    [] Auto Timeframe Switching: Selects an appropriate lower timeframe (e.g., 1-second for seconds-based charts, 5-minute for daily charts) unless a custom timeframe is specified.
    [] Styling: Net flow is plotted as columns, with color intensity reflecting flow direction and trend continuity.


Purpose:
The indicator helps traders and investors monitor capital inflows and outflows for ETH Spot ETFs, providing insights into market sentiment and fund activity across multiple timeframes.

License: Mozilla Public License 2.0.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.