ZenAlgo - Boxer Stocks

Each timeframe layer is drawn independently, using its own cumulative VWAP and standard deviation calculation, and displayed as horizontal ranges aligned precisely with calendar periods. This structure allows the chart to show where price currently trades relative to past value zones and how each higher-timeframe VWAP acts as a dynamic reference for mean reversion or continuation.
Calculation Logic
1. Source and Base Inputs
- The indicator uses the average of high, low, and close as its price source.
- Stocks reset daily at session open.
2. VWAP and Deviation Computation
- For each active timeframe, it accumulates the product of price and volume and divides it by cumulative volume, forming a continuously updated VWAP within that period.
- The dispersion of price around VWAP is measured through a volume-weighted variance, converted to standard deviation.
- These values form symmetrical bands around the VWAP (±1σ, ±2σ, etc.), describing the statistically typical price spread.
3. Range Drawing and Persistence
- When a new period begins (e.g., a new week or month), the script finalizes the previous VWAP and deviation values, fixes them to time coordinates representing the full duration of that completed period, and draws corresponding lines or boxes across the entire range.
- The user can control how many historical periods remain visible, ensuring performance and clarity even on high-frequency charts.
- Each band can be toggled independently (for example ±1, ±2, ±3 deviations), and colors are adjustable per timeframe.
4. Adaptive Time Anchors
- The start of each timeframe is aligned with calendar boundaries.
- For stocks, the start time aligns with 9:30 New York time to coincide with market open for NYSE.
- Each new anchor triggers a reset of cumulative data and creation of a new VWAP range.
5. Visualization Structure
- The weekly layer is drawn first and can optionally display live VWAP bands extending backward for a user-defined number of weeks.
- Monthly, quarterly, semi-annual, and yearly layers use the same computation principle but with independent accumulation windows.
- The central VWAP line is dashed, while outer deviation levels are drawn as dotted or solid lines depending on their multiplier.
- Boxes are rendered for key deviation intervals (e.g., ±2σ) to highlight broader value zones.
Interpretation
- The VWAP represents the mean price weighted by traded volume for the given period.
- Deviation bands describe statistically typical distance from that mean; outer bands mark less frequent extremes.
- When price remains within ±1σ or ±2σ, it suggests balance around fair value.
- Repeated touches or breaks beyond outer deviations indicate expansion or compression of volatility relative to prior periods.
- Overlaps of VWAPs from multiple timeframes reveal multi-period confluence zones, useful for observing where long-term and short-term value agree or diverge.
Recommended Timeframes by Range Type
Weekly Range
- Recommended timeframe: 30m to 12h
- Suggested options: 30m, 1h, 2h, 3h, 4h, 6h, 8h, 12h
- Using lower timeframes (like 5m) is technically possible, but higher ones provide smoother visualization and better readability.
Monthly Range
- Recommended timeframe: 1h to 1D
- Suggested options: 1h, 2h, 3h, 4h, 6h, 8h, 12h, 1D
- Lower timeframes such as 30m may not display the full monthly range due to TradingView’s bar limits, so use higher TFs for complete coverage.
Quarterly Range
- Recommended timeframe: 4h to 1W
- Suggested options: 4h, 6h, 8h, 12h, 1D, 1W
- Quarterly ranges benefit from higher timeframes to ensure that enough historical data is visible without exceeding chart limits.
Semi-Annual Range
- Recommended timeframe: 12h to 1M
- Suggested options: 12h, 1D, 1W, 1M
- Lower timeframes would require too many bars to load a full six-month range; higher TFs offer a clearer overview.
Yearly Range
- Recommended timeframe: 1D to 1M or higher
- Suggested options: 1D, 1W, 1M
- Yearly ranges often cannot display correctly on low timeframes (e.g. 1h) because of TradingView’s maximum bar limits — for instance, five years of 1h data exceeds 40,000 bars. Use higher TFs for accurate rendering.
Added Value Compared to Common Free VWAP Indicators
- Incorporates five independent timeframes simultaneously (week, month, quarter, half-year, year) with exact calendar anchoring and timezone handling.
- Calculates volume-weighted deviation for each layer, maintaining consistent statistical scale across assets.
- Provides historical box persistence, allowing comparison of completed VWAP structures instead of only current running lines.
- Enables selective visibility, bandwidth control, and precise visual differentiation through adjustable colors and line weights.
Limitations and Notes
- The indicator does not generate trading signals. It is purely analytical and descriptive.
- On very low timeframes or illiquid assets, deviation values may fluctuate if volume data is inconsistent.
- Historical boxes are approximate in length for months with fewer than 31 days; this simplification has negligible effect on interpretation.
- High visual density may occur when enabling many deviations or timeframes at once; users should limit visible history for performance.
Best Usage Practices
- Apply on intraday charts (5–240 min) to study how price interacts with weekly or higher-timeframe VWAP zones.
- Observe convergence of VWAPs from multiple periods to locate significant equilibrium levels.
- Use outer deviations to frame potential exhaustion or re-entry zones rather than directional predictions.
- Combine with independent volume- or structure-based analysis for context.
Invite-only script
Only users approved by the author can access this script. You'll need to request and get permission to use it. This is typically granted after payment. For more details, follow the author's instructions below or contact ZenAlgo_Official directly.
TradingView does NOT recommend paying for or using a script unless you fully trust its author and understand how it works. You may also find free, open-source alternatives in our community scripts.
Author's instructions
zenalgo.io
discord.zenalgo.io
Disclaimer
Invite-only script
Only users approved by the author can access this script. You'll need to request and get permission to use it. This is typically granted after payment. For more details, follow the author's instructions below or contact ZenAlgo_Official directly.
TradingView does NOT recommend paying for or using a script unless you fully trust its author and understand how it works. You may also find free, open-source alternatives in our community scripts.
Author's instructions
zenalgo.io
discord.zenalgo.io