OPEN-SOURCE SCRIPT

Daily Volume Forecast

436
Daily Volume Forecast

What this indicator does

Daily Volume Forecast projects the full-day trading volume of the current, still-running day — its expected value at the closing bell. It is designed for the Daily chart, where the live bar already carries the volume accumulated so far; the indicator scales that partial volume up to an estimate for the whole session.

The goal is to answer a simple question intraday: is today on track for above- or below-average volume? — before the day is actually over.

How it works

  1. Partial volume so far: On the Daily chart the current bar's volume is the cumulative volume traded since the session open. This is the basis that gets extrapolated.
  2. Elapsed session time: On a daily bar the bar's own hour/minute is the open time, not the current time. The indicator therefore derives the elapsed time from the real wall-clock (timenow) in the instrument's exchange timezone, relative to the configured session, so it knows how far the day has progressed.
  3. Two forecast methods are available:
    • Intraday Profile (recommended): Intraday volume (e.g. 5-minute) is pulled per day via request.security_lower_tf and averaged into a typical volume-by-time-of-day curve. Because real volume is U-shaped (heavy at the open and close, light at midday), this curve captures how much of a day's volume is normally done by the current time. The forecast is current_volume / expected_fraction_done_by_now, which adapts automatically to the instrument's own shape. Until enough intraday history exists, it falls back to the linear method.
    • Linear: Assumes volume is spread evenly across the session: forecast = current_volume × (session_length / elapsed_minutes). Simple, requires no extra data, but overestimates the remainder in the morning because it ignores the U-shape.
  4. Live update: The estimate is computed on the current (last) bar and updates as the day develops. When the market is closed, elapsed time clamps to the full session, so the forecast converges to the actual day's volume.


Display

  • Volume columns of the actual daily volume (historical and current), coloured by up/down day — green when close ≥ open, red otherwise.
  • Forecast line for the projected full-day volume, extended to the right edge (trackprice) on the current bar.
  • Label on the last bar showing the estimate (e.g. "Est. 3.2M").
  • Info table (optional, bottom-right) with the selected method, the forecast, percent of the session elapsed, the current volume, and the number of days used to build the profile.


Settings

  • Forecast Method: Intraday Profile or Linear.
  • Trading Session: Session string (default 0930-1600 for US RTH); adjust to the instrument (e.g. 0900-1730 EU stocks, 0000-2400 for 24h / crypto / FX).
  • Profile Resolution (min): Intraday resolution used to build the volume curve (Intraday Profile only).
  • Show Historical Daily Volumes: Toggle the volume columns.
  • Show Info Table: Toggle the table.
  • Colours for up and down volume.


How to use it

Apply it to a Daily chart (a warning label appears on other timeframes). Use it to gauge participation in real time — to confirm breakouts on rising projected volume, to flag unusually quiet days, or as a context filter alongside a price strategy. The Intraday Profile method is recommended whenever the instrument has a pronounced intraday volume shape; Linear is a lightweight fallback that needs no intraday history.

Notes

  • request.security_lower_tf provides only a limited amount of recent intraday history (a TradingView/plan limit), so the profile is built from the most recent available days and rolls forward naturally.
  • The profile method needs a few completed days to warm up; until then it uses the linear fallback.
  • The session string must match the instrument, otherwise the elapsed-time scaling — and therefore the forecast — is distorted. Extended-hours volume is not considered.
  • This script is an analysis tool and does not constitute financial advice. A volume forecast is an extrapolation, not a guarantee of the day's outcome.



═══════════════════════════════════════


Daily Volume Forecast — Deutsch

Was macht dieser Indikator?

Daily Volume Forecast prognostiziert das gesamte Tagesvolumen des aktuellen, noch laufenden Tages — den zu erwartenden Wert zum Handelsschluss. Er ist für den Daily-Chart ausgelegt, wo die laufende Kerze bereits das bisher kumulierte Volumen trägt; der Indikator skaliert dieses Teilvolumen auf eine Schätzung für die ganze Session hoch.

Ziel ist es, schon während des Tages eine einfache Frage zu beantworten: Läuft der heutige Tag auf über- oder unterdurchschnittliches Volumen hinaus? — bevor der Tag tatsächlich vorbei ist.

Wie es funktioniert

  1. Bisheriges Teilvolumen: Auf dem Daily-Chart ist das Volumen der aktuellen Kerze das seit Session-Eröffnung kumulierte Volumen. Das ist die Basis, die hochgerechnet wird.
  2. Verstrichene Session-Zeit: Auf einer Tageskerze ist deren Stunde/Minute die Eröffnungszeit, nicht die aktuelle Uhrzeit. Der Indikator leitet die verstrichene Zeit deshalb aus der realen Uhrzeit (timenow) in der Börsen-Zeitzone des Instruments ab, relativ zur eingestellten Session — so weiss er, wie weit der Tag fortgeschritten ist.
  3. Zwei Prognosemethoden stehen zur Wahl:
    • Intraday Profile (empfohlen): Über request.security_lower_tf wird das Intraday-Volumen (z. B. 5-Minuten) je Tag erhoben und zu einer typischen Volumenkurve nach Tageszeit gemittelt. Da reales Volumen U-förmig ist (viel bei Eröffnung und Schluss, wenig am Mittag), erfasst diese Kurve, welcher Anteil des Tagesvolumens zur aktuellen Uhrzeit normalerweise schon gehandelt ist. Die Prognose ist aktuelles_Volumen / erwarteter_Anteil_bis_jetzt und passt sich automatisch an die Form des Instruments an. Bis genug Intraday-Historie vorliegt, greift der lineare Fallback.
    • Linear: Nimmt an, dass das Volumen gleichmässig über die Session verteilt ist: Prognose = aktuelles_Volumen × (Session-Länge / verstrichene_Minuten). Einfach, ohne Zusatzdaten, überschätzt aber am Vormittag den Rest, weil die U-Form ignoriert wird.
  4. Live-Update: Die Schätzung wird auf der aktuellen (letzten) Kerze berechnet und aktualisiert sich im Tagesverlauf. Bei geschlossenem Markt wird die verstrichene Zeit auf die volle Session begrenzt, sodass die Prognose gegen das tatsächliche Tagesvolumen konvergiert.


Anzeige

  • Volumen-Säulen des tatsächlichen Tagesvolumens (historisch und aktuell), eingefärbt nach Up/Down-Tag — grün wenn close ≥ open, sonst rot.
  • Prognose-Linie für das hochgerechnete Tagesvolumen, auf der aktuellen Kerze bis zum rechten Rand verlängert (trackprice).
  • Label am letzten Balken mit der Schätzung (z. B. "Est. 3.2M").
  • Info-Tabelle (optional, unten rechts) mit gewählter Methode, Prognose, Anteil der bereits verstrichenen Session, aktuellem Volumen und Anzahl der für das Profil genutzten Tage.


Einstellungen

  • Forecast Method: Intraday Profile oder Linear.
  • Trading Session: Session-String (Standard 0930-1600 für US-RTH); an das Instrument anpassen (z. B. 0900-1730 EU-Aktien, 0000-2400 für 24h / Krypto / FX).
  • Profile Resolution (min): Intraday-Auflösung zum Aufbau der Volumenkurve (nur Intraday Profile).
  • Show Historical Daily Volumes: Volumen-Säulen ein-/ausblenden.
  • Show Info Table: Tabelle ein-/ausblenden.
  • Farben für Up- und Down-Volumen.


Verwendung

Auf einen Daily-Chart anwenden (auf anderen Timeframes erscheint ein Hinweis-Label). Geeignet, um die Marktbeteiligung in Echtzeit einzuschätzen — etwa zur Bestätigung von Ausbrüchen bei steigender prognostizierter Beteiligung, zum Markieren ungewöhnlich ruhiger Tage oder als Kontext-Filter neben einer Kursstrategie. Die Methode Intraday Profile wird empfohlen, wenn das Instrument eine ausgeprägte Intraday-Volumenform hat; Linear ist ein leichtgewichtiger Fallback ohne Intraday-Historie.

Hinweise

  • request.security_lower_tf liefert nur eine begrenzte Menge jüngster Intraday-Historie (TradingView-/Abo-Limit), daher basiert das Profil auf den jüngsten verfügbaren Tagen und rollt natürlich mit.
  • Die Profil-Methode braucht einige abgeschlossene Tage zum "Aufwärmen"; bis dahin greift der lineare Fallback.
  • Der Session-String muss zum Instrument passen, sonst werden die Zeit-Skalierung — und damit die Prognose — verzerrt. Vor-/Nachbörsliches Volumen wird nicht berücksichtigt.
  • Dieses Skript ist ein Analyse-Werkzeug und stellt keine Anlageberatung dar. Eine Volumenprognose ist eine Hochrechnung, keine Garantie für den Tagesausgang.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน