OPEN-SOURCE SCRIPT
업데이트됨 Multiday VWAP by Bybllo

Multiday VWAP by Bybllo
OVERVIEW
This indicator plots up to 5 independent rolling Volume Weighted Average Price (VWAP) lines, each anchored a different number of calendar days back from the present bar (default: 2, 3, 4, 5, and 6 days back). Unlike a standard session VWAP that resets every day, each line here accumulates price*volume continuously from its own anchor day up to the current bar, giving traders a set of rolling reference levels for recent multi-day price/volume balance.
I built this for my own trading because I couldn't find an existing community script that did exactly this — a set of independent, multi-day rolling VWAP lines in one indicator — so I'm sharing it in case it's useful to others too.
KEY FEATURES
- 5 independently configurable rolling VWAP lines — toggle visibility, set the lookback in calendar days, and pick a color for each line individually.
- Lookback days are entered as calendar days (weekends included), so "6 days back" always lands on the same relative session regardless of where in the week you are.
- Real-price calculation — prices are pulled via request.security() against the plain ticker, so the VWAP values are identical whether your chart is displaying candlesticks, Heikin Ashi, Renko, or any other non-standard chart type. Volume is unaffected by chart type and is used as-is.
- Robust new-day detection — instead of relying on the chart's own bar-by-bar progress to detect a new trading day (which can be unreliable right after the chart first loads), this script requests daily-resolution data directly. Daily data loads much faster than intraday data, so the VWAP anchors are detected reliably even immediately after opening the chart.
HOW TO USE
Open the indicator settings and, for each of the 5 lines, set how many calendar days back you want that VWAP to start accumulating from. Use the lines as dynamic support/resistance or fair-value reference levels, similar to how a session VWAP is used, but for multi-day accumulation periods.
NOTES
- This script requires volume data from your data provider. If no volume is available for the symbol, the VWAP values will not calculate correctly.
- "Rolling Days" counts calendar days, not trading/session days.
Feedback and suggestions are welcome.
OVERVIEW
This indicator plots up to 5 independent rolling Volume Weighted Average Price (VWAP) lines, each anchored a different number of calendar days back from the present bar (default: 2, 3, 4, 5, and 6 days back). Unlike a standard session VWAP that resets every day, each line here accumulates price*volume continuously from its own anchor day up to the current bar, giving traders a set of rolling reference levels for recent multi-day price/volume balance.
I built this for my own trading because I couldn't find an existing community script that did exactly this — a set of independent, multi-day rolling VWAP lines in one indicator — so I'm sharing it in case it's useful to others too.
KEY FEATURES
- 5 independently configurable rolling VWAP lines — toggle visibility, set the lookback in calendar days, and pick a color for each line individually.
- Lookback days are entered as calendar days (weekends included), so "6 days back" always lands on the same relative session regardless of where in the week you are.
- Real-price calculation — prices are pulled via request.security() against the plain ticker, so the VWAP values are identical whether your chart is displaying candlesticks, Heikin Ashi, Renko, or any other non-standard chart type. Volume is unaffected by chart type and is used as-is.
- Robust new-day detection — instead of relying on the chart's own bar-by-bar progress to detect a new trading day (which can be unreliable right after the chart first loads), this script requests daily-resolution data directly. Daily data loads much faster than intraday data, so the VWAP anchors are detected reliably even immediately after opening the chart.
HOW TO USE
Open the indicator settings and, for each of the 5 lines, set how many calendar days back you want that VWAP to start accumulating from. Use the lines as dynamic support/resistance or fair-value reference levels, similar to how a session VWAP is used, but for multi-day accumulation periods.
NOTES
- This script requires volume data from your data provider. If no volume is available for the symbol, the VWAP values will not calculate correctly.
- "Rolling Days" counts calendar days, not trading/session days.
Feedback and suggestions are welcome.
릴리즈 노트
- Translated all input labels and code comments to English for publication.- Added a detailed description header (overview, key features, how to use, notes).
- Cleaned up the chart image by removing unrelated indicators for a clearer preview.
No changes to the underlying VWAP calculation logic.
릴리즈 노트
Fixed a subtle timing bug in the new-day detection that couldcause the VWAP anchor to shift by one bar in some edge cases.
No changes to the core VWAP calculation.
릴리즈 노트
Updated the published chart image to a clean view showing only this indicator, with no other scripts overlaid. No changes to the code or calculation logic.릴리즈 노트
Added a "Typical Use Case" section to the description, explainingthis indicator is built for scalping/day trading futures (Nasdaq
futures, Bitcoin futures, and index futures from various countries)
using multi-day rolling VWAP centerlines as dynamic support/
resistance. Also updated the chart snapshot. No changes to the
calculation logic.
릴리즈 노트
Changes:- Anchor dates are now locked to the first real trading day at or after the calculated target, instead of requiring an exact calendar-date match. This fixes cases where an anchor would silently fail to render on weeks containing an unscheduled holiday.
- Once an anchor is set, it is locked with a "started" flag and will never re-trigger, eliminating occasional overlap between adjacent rolling-day lines.
- Added real-price calculation via request.security() against the chart's own ticker (syminfo.tickerid), so VWAP values are now identical whether the chart is displaying candlesticks, Heikin Ashi, Renko, or any other non-standard chart type.
- Lookback is now entered in real trading days (not raw calendar days), so "N days back" always lands on an actual session with data.
- Cleaned up input labels and removed the redundant source ticker label from the chart's status line.
릴리즈 노트
Update: Added Manual Anchor Mode- The existing automatic rolling-day logic (real trading days, weekends
and holidays automatically excluded) is unchanged and remains the
default behavior.
- Added a "Manual Mode" toggle. Off by default — if you leave it off,
the indicator behaves exactly as before.
- When enabled, each of the 5 lines gets its own date/time picker so
you can anchor to a specific date and time instead of a rolling
trading-day count. With Manual Mode on, the automatic rolling-day
logic is fully disabled — only the manually set anchors are used.
- Fixed a calculation issue where values could accumulate incorrectly
before the anchor point, causing a brief spike right at the anchor.
The line now starts cleanly from the anchor timestamp.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.