INVITE-ONLY SCRIPT

ZenAlgo - Boxer

33
The indicator visualizes multi-timeframe VWAP-based range structures (Weekly, Monthly, Quarterly, Semi-Annual, and Yearly).
It computes and projects statistically derived price envelopes for each period, showing where price has traded relative to the corresponding VWAP and its deviations.
This allows visual comparison of how far current price extends from typical value zones within different temporal contexts.

Core Logic
1. VWAP and Standard Deviation Calculation
For each enabled period (week, month, quarter, half-year, year), the script:
  • Detects the start of the new period (e.g., Monday for weekly, the first day of the month for monthly, etc.).
  • Initializes cumulative values for price and volume.
  • Updates them bar-by-bar until the next anchor point occurs.
  • Computes VWAP (Volume-Weighted Average Price).
  • Computes Variance of price around VWAP weighted by volume, from which standard deviation is derived. These metrics reset at each new period start.

The calculation method ensures that the VWAP curve reflects the average transaction price weighted by traded volume, while standard deviation measures the dispersion of trading activity around that mean.

2. Range Box Construction
When a new period begins and sufficient data from the previous one exists:
  • The script draws a rectangular box extending from the previous period’s VWAP ± N × standard deviation.
  • N can take fractional steps (0.5 – 10) controlled via user inputs.
  • Each deviation represents a horizontal boundary capturing incremental probability zones around VWAP.

The box remains visible for the following period, effectively showing statistical footprints of previous ranges.
Boxes can be limited in number (history limit) to control chart clutter.

3. Dynamic VWAP Bands
For the active period, the script also plots live VWAP bands up to ±3 standard deviations:
  • These bands continuously update within the current period.
  • Each level (±1σ, ±2σ, ±3σ) can be toggled independently.
  • Colors and line thickness can be customized per timeframe.

This provides a real-time reference to where price currently trades within its statistical envelope.

4. Timeframe Validation
Each range type is restricted to appropriate resolutions:
  • Weekly: 5 min – 12 h (except 5 h)
  • Monthly: 2 h – 3 D
  • Quarterly: 6 h – 3 D
  • Semi-Annual: 12 h – 1 D
  • Yearly: 1 D

This prevents misalignment between anchor intervals and chart compression that would distort VWAP calculations.

5. Color Logic and Rendering
Colors for VWAP lines and deviation bands are user-selectable.
The script applies lightness adjustments (shading) to visually differentiate higher deviations.
Boxes and lines are managed through arrays with automatic cleanup once history limits are exceeded, ensuring stable performance despite the high number of graphical elements.

Interpretation of Values
  • VWAP line — represents the fair-value mean where the majority of trading occurred during the given period.
  • Deviation lines or boxes — show how far price deviates from that mean in multiples of standard deviation. (±1σ usually captures typical value area. Beyond ±2σ marks statistically extended territory where mean reversion is more probable under normal conditions.)
  • Overlaps between periods (e.g., weekly vs monthly) visualize multi-period confluence zones, highlighting price regions consistently valued across horizons.


Added Value over Free Indicators
Most freely available VWAP indicators compute a single continuous VWAP or simple intraday bands.
ZenAlgo – Boxer extends this concept by:
  • Managing multiple timeframe anchors simultaneously (weekly → yearly).
  • Drawing historical deviation boxes rather than just live lines, allowing spatial comparison of past value zones.
  • Offering fine-grained control over which deviation multiples to render (0.5–10).
  • Automatically enforcing timeframe compatibility to prevent distortion.
  • Maintaining performance through controlled object lifetimes (limiting stored lines/boxes).

Together, these design choices create a complete statistical range map rather than a single-period indicator.

How to Use
  1. Choose a timeframe matching the intended range (see validation list).
  2. Enable desired periods (e.g., Weekly + Monthly) for combined analysis.
  3. Observe:
    Price inside ±1σ → typical trading region.
    Price beyond ±2σ → extension; potential mean-reversion area.
    Intersections of multiple VWAP ranges → zones of reinforced equilibrium.
  4. Boxes from past periods help identify how value zones migrate over time.

The indicator is purely analytical; it does not issue trading signals or evaluate trend direction.
Interpretation should always be combined with broader context such as market structure or volume analysis.

Limitations and Disclaimers
  • VWAP and deviation statistics assume stable intra-period volume distribution; illiquid assets or sparse sessions may distort the result.
  • On too high or too low resolutions outside recommended ranges, values may appear misaligned due to bar sampling.
  • The indicator does not predict future movement; it only reflects historical and current price-volume relationships.
  • Line and box density can become high on extended history settings—adjust history limits for performance.

Summary:
ZenAlgo – Boxer builds a multi-period statistical framework around VWAP, visualizing where price has spent most of its time and how far it currently stands from those centers of value.
It allows traders to contextualize short-term fluctuations within higher-timeframe equilibrium zones in a single visual layer.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.