INVITE-ONLY SCRIPT
Zaktualizowano

Current & Previous-Day VWAP

221
The “Current & Previous‑Day VWAP” indicator plots two important volume‑weighted price references on intraday charts:

Current Session VWAP (solid line): The VWAP is the volume‑weighted average price of the current trading session. TradingView’s built‑in ta.vwap() function automatically resets its calculation at the start of each new intraday session
offline-pixel.github.io
, so the line accurately follows today’s price action. You can set the color of this line via the indicator’s input (defaults to blue).

Previous‑Day VWAP (dotted lines): At the final bar of each session, the indicator stores the current session’s VWAP value. On the first bar of the following session, it draws a horizontal dotted line at that stored value and extends it across the entire day. This uses TradingView’s session detection functions—session.islastbar to capture the closing VWAP and session.isfirstbar to start the new line
tradingview.com
. An array holds each line and its y‑value so that multiple previous‑day VWAPs remain visible for comparison. The color of these dotted lines is also user‑configurable.

This design lets you see both where the current price is relative to today’s VWAP and how it stands against the closing VWAP levels of previous sessions, all at a glance.
Informacje o Wersji
Indicator: VWAP + Previous Day VWAP

This indicator displays the current day’s VWAP and the previous day’s VWAP on intraday charts, using the Europe/Berlin time zone.
It is designed for traders who want to track daily VWAP levels with a clear session separation (00:00–23:00 active, 23:00–00:00 break).

Main Features

VWAP (Volume Weighted Average Price) is calculated manually for each trading day (00:00–23:00 Berlin time).
The VWAP resets automatically at midnight, ensuring no connection between consecutive days.

The previous day’s VWAP is stored and drawn as a horizontal reference line throughout the following day.

Both VWAPs are fully customizable:

Choose color, line width, and line style (solid, dashed, or dotted).

Default:

Current VWAP: black, solid

Previous Day VWAP: black, dotted

The script maintains up to 20 historical previous-day VWAP lines, keeping your chart clean and consistent.

Uses plot.style_linebr to ensure visible breaks at day transitions (no unwanted line continuation).

Session Logic

Active session: 00:00–23:00 (Europe/Berlin).

Pause: 23:00–00:00, where no VWAP is calculated or drawn.

Works best on intraday timeframes (1–60 minutes).
On daily or higher timeframes, VWAP data is not displayed.

Ideal For

Intraday and swing traders who use VWAP levels for support/resistance, mean reversion, or trend confirmation.

Futures, forex, and crypto traders who need daily VWAP resets and previous-day VWAP reference levels.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.