Settlement Cycle VWAP Ladder [TechnicalZen]Must have in a technical trader's toolkit! Four volume-weighted anchors stacked across derivatives-expiry horizons for all major markets.
What This Is
A multi-horizon VWAP reference stack, anchored to the settlement calendar of your chosen market (options and futures expiry dates). Four volume-weighted levels — monthly, weekly, week-to-date, and session — rendered on the price pane with a 20-bar historical table showing how each has evolved.
The indicator does NOT guess or lag. It computes hard reference levels from actual volume and price, snaps them to real expiry dates (last Thursday for NSE, third Friday for Europe, etc.), and prints them as step-lines and accumulating curves on your chart.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
What It Does — The Four Ladders
Monthly Anchor — N-day VWMA (default 20-day) whose value is snapped on the monthly expiry day and held flat until the next monthly expiry. This is your longest-horizon volume-weighted reference, updating once a month.
Weekly Anchor — N-day VWMA (default 5-day) snapped every weekly expiry day. Updates once a week. Between expiries it's a flat step-line — deliberately so, because that's what makes it useful as a reference level.
Week-to-Date VWAP — true cumulative VWAP accumulating bar-by-bar through the trading week. Resets the day AFTER weekly expiry (Friday for US / Europe, Monday for NSE Thursday-expiry, Wednesday for BSE Tuesday-expiry). Shows where volume-weighted consensus is building during the current cycle.
Session VWAP — classic daily VWAP, resets at each session open. Tightest anchor, your intraday fair-value line.
Stacked, these four tell you where price sits relative to volume-weighted consensus at every horizon: intraday → this week → this month → longer term. When price respects all four from one side, you have a strong directional bias. When price oscillates around the tight ones while respecting the wider ones, you have a range.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Market Presets — Derivatives Expiry Conventions Built In
Expiry days differ by market. Pick a preset and everything calibrates:
US Standard (3rd Friday) — SPX, NDX, S&P options, most index futures
US EOM (Last Friday) — SPX / SPY end-of-month options
Europe (3rd Friday) — DAX, FTSE 100, EURO STOXX 50, CAC 40, SMI, IBEX 35, AEX
India NSE (Last Thursday) — NIFTY, Bank NIFTY, stock futures, stock options
India BSE (Last Tuesday) — SENSEX, BANKEX
Custom — pick any weekday + "Third" or "Last" rule manually
Selecting the right preset sets the weekly snap day, the monthly snap rule (third vs last occurrence in the month), AND the week-start day for the Week-to-Date accumulator — so your "week" aligns with the actual options cycle.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
How to Use It
Load with defaults. Pick the market preset that matches your instrument.
Read price relative to the four ladders:
Above all four = strong volume-weighted uptrend across all horizons
Below all four = strong downtrend
Mixed (above some, below others) = transitional
Oscillating around tight (Session, WTD) while respecting wide (Weekly, Monthly) = range within bigger trend
Use the Monthly and Weekly anchors as support / resistance levels — they're where institutions mark to market at expiry.
Use the Week-to-Date VWAP as an intra-cycle fair value — price far above it = stretched bullish, far below = stretched bearish.
Use the Session VWAP as intraday mean — a classic reversion magnet.
Consult the history table for quick reference to recent values of all four, with date headers showing exactly which bar each column represents.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Main Features
Six market presets plus Custom mode for any derivatives expiry convention worldwide
Four stacked VWAP horizons — monthly, weekly, WTD, session — each independently togglable
Session-aware for futures — NQ, ES, CL, GC and other overnight-session instruments correctly identify their trading date via time_close("D"), so Friday's expiry snap lands on Friday even when the session starts Thursday evening
Date-headered history table — 20 columns of recent values, auto-formatted (HH:mm on intraday, dd MMM on daily+)
Adjustable text sizes — Tiny / Small / Normal / Large / Huge for both data cells and headers
Direction-aware colors — each cell and plot line shows bar-over-bar direction at a glance
Step-line plots with diamonds for the snapshot-held anchors (Monthly, Weekly); circles for WTD; continuous line for Session
Same-timeframe bug resolved — on D charts, VWMAs compute locally to avoid the 1-bar lookahead-off delay that `request.security` introduces; on sub-daily charts, `request.security` uses `lookahead_on` so intraday bars see today's evolving daily VWMA
NA guards — anchors never get clobbered by na on the first snap if chart history is short; they simply stay blank until a valid snap fires
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Key Settings
Market Preset — dropdown of expiry conventions (see above)
Monthly VWMA length (days) — default 20
Weekly VWMA length (days) — default 5
Source — price used for VWMA and cumulative calcs (default close)
Show Monthly / Weekly / WTD / Session — four independent plot toggles
Show History Table + position + column count
Data Cell Text Size / Header/Label Text Size — both adjustable
Custom: Monthly Rule — Third or Last (used only when Market Preset = Custom)
Custom: Expiry Weekday — Mon / Tue / Wed / Thu / Fri (used only when Market Preset = Custom)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Session-Aware Design
Cash equities (TSLA, AAPL, SPY) have a daily bar that sits squarely on the trading date. Futures (NQ, ES, CL) have an overnight session that starts the previous calendar evening. Most VWAP indicators that use `dayofweek(time)` get NQ wrong — they read Friday's session as Thursday because that's when it started.
This indicator uses `time_close("D")`, which always resolves to the trading date's session close — correct for both cash equities and overnight-session futures. No manual configuration needed; it just works on whatever symbol you load.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Disclaimer
This is a visualization and analytical tool, not financial advice or a signal service. VWAP levels are reference points — they do not guarantee reversals, breakouts, or any specific market behavior. Past price reactions at these levels do not guarantee future ones. Trade with your own risk management. Every trade can lose.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Four volume-weighted anchors. One chart.
— TechnicalZen
Pine Script®指標






















