PROTECTED SOURCE SCRIPT

WD Gann Levels [CSN]

129
A compact, multi-timeframe indicator that plots VWAP with optional deviation/percentage bands and Gann-style support & resistance levels (year, month, week, day) tailored for major Indian indices. It draws current and historical lines with clear labels and lets you pick the index so the script uses sensible, pre-calibrated offsets for each timeframe.

What it does (features)

Computes and plots a VWAP anchored to a user-selected period (session / week / month / quarter / year / earnings / dividends / splits).

Optional VWAP bands: three configurable band multipliers that can be interpreted as standard-deviation bands or percentage bands. Each band can be shown/hidden independently.

Automatic Gann-style levels for four timeframes:

Yearly — single current-year resistance/support (keeps floating labels).

Monthly — persistent historical monthly lines with the newest month emphasized.

Weekly — persistent historical weekly lines, optional 50% weekly levels (show/hide).

Daily — day-only levels that extend only for the trading day and update intraday.

Preconfigured offset values for common Indian indices (Nifty, Bank Nifty, Sensex, Fin Nifty, Mid Cap Nifty). Selecting an index switches the offsets used to compute the levels.

Visual polish: different colors and line styles per timeframe, width/opacity handling for historical vs current lines, labelled levels for clarity.

Safety check: throws a runtime error if volume is missing (VWAP requires volume).

Inputs (user-configurable)

Select Index — pick from Nifty, Bank Nifty, Sensex, Fin Nifty, Mid Cap Nifty (changes offsets).

Show Weekly 50% Lines — toggle weekly half-levels.

VWAP Settings

Hide VWAP on 1D or above — optionally hide VWAP on daily+ charts.

Anchor Period — Session / Week / Month / Quarter / Year / Decade / Century / Earnings / Dividends / Splits.

Source (default: close), Offset (plot shift).

Bands Settings

Bands Calculation Mode — Standard Deviation or Percentage.

Three pairs of show-toggle + multiplier inputs (Band #1, #2, #3). Multipliers default to 1.0, 2.0, 3.0 and accept half-step increments.

Plotted outputs & visuals

VWAP — blue line (configurable offset).

Bands — up to three fills/lines (green/olive/teal by default) controlled by the band toggles. If percentage mode is chosen, multipliers act as percent values.

Year / Month / Week / Day levels — colored lines with distinct styles:

Year = red (solid), Month = green (dashed), Week = blue (dotted), Day = orange (solid, no extension).

Labels — each current period level is labelled (e.g., “MONTH RESISTANCE (Nifty)”) and floats near the level for easy reading. Historical lines are kept but visually de-emphasized.

How levels are calculated

The script records the opening price for each period (year/month/week/day).

A fixed offset (index-dependent) is added/subtracted from the open to produce resistance/support levels for that period. For weekly the script also optionally adds 50% intermediate levels. Offsets are chosen per-index so levels scale correctly across instruments.

Usage & interpretation tips

Use the VWAP anchor options to align VWAP to the timeframe or event you care about (session vs week vs corporate events).

Combine VWAP and bands with the Gann-style levels to find confluence zones (VWAP + monthly resistance, weekly 50% + band edge, etc.).

Enable only the bands you need to reduce chart clutter; monthly and weekly history is useful for longer-term context.

On intraday charts, daily levels give immediate support/resistance; on higher timeframes they provide reference but the script hides/adjusts VWAP when requested.

Inputs reference (defaults shown)

Select Index: Nifty

Show Weekly 50% Lines: false

Hide VWAP on 1D or Above: false

Anchor Period: Session

VWAP Source: close

Bands Calculation Mode: Standard Deviation

Band multipliers: 1.0, 2.0, 3.0 (each band off by default)

Pernyataan Penyangkalan

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.