INVITE-ONLY SCRIPT
已更新

ZenAlgo - Ranger

253
The core of the indicator is the daily range, anchored around the 1-minute timeframe VWAP (volume-weighted average price), with ±2 standard deviations defining the upper and lower bounds. This range dynamically forms throughout the day and then gets “locked” at 23:59 each day to establish historical reference values.

The indicator calculates this locked VWAP and standard deviation per day, which serves two primary purposes:
  1. Drawing today's real-time evolving range, updated each minute.
  2. Plotting previous daily ranges, based on historical locked VWAPs and standard deviations, providing visual reference boxes on the chart.

This design enables the trader to identify mean-reversion zones and persistent directional biases based on volume-weighted price consensus.

Multiple Standard Deviation Layers

Beyond the ±2.0 deviation bounds, optional lines are available at half-step increments (e.g., ±0.5, ±1.5, ..., ±4.5) and full-step levels beyond ±2.0 (±3.0, ±4.0, ±5.0). These provide a customizable grid to visualize price extremes, tail behavior, or potential breakout zones relative to volume-adjusted price equilibrium.

Users can enable only the levels they need, offering flexibility depending on their strategy (e.g., scalping versus swing trading).

Historical Range Retention

The script stores up to 70 previous daily VWAP + standard deviation values (adjustable). For each, it draws a full range box and standard deviation lines in the past. This historical context helps in understanding how current price interacts with prior days’ balance zones.

These boxes are always drawn from 00:00 to 23:59 UTC, ensuring consistent alignment across instruments and avoiding session-based discrepancies.

Monday Range Reference (Drawn on Tuesdays)

On Tuesdays, the indicator plots the previous Monday's VWAP-based range across the rest of the week. This serves as a persistent contextual anchor for traders watching weekly unfolding behavior. The range is defined identically (VWAP ±2σ) and drawn from Monday 00:00 through the following Monday.

This method assumes Monday often sets the tone or structure for the week, and tracking this level through time may highlight support/resistance confluence or range expansion scenarios.

Each Monday range is extended over 7 days and includes dashed lines at the 25%, 50%, and 75% marks within the range. These midrange markers help traders assess microstructure behaviors (e.g., reversion to median, failure to hold midpoint, etc.).

Daily Volume Delta via 4H Candles

The indicator also integrates daily buy/sell volume deltas, derived from 4-hour candles of the regular session (non-Heikin Ashi). The logic categorizes volume as:
  • Buy volume when candle closes above the previous close.
  • Sell volume when it closes below.
  • Even split when the candle closes flat.

These volumes accumulate each day to derive net delta (buy - sell). This delta is recorded for each day and can optionally be displayed. A similar process tracks the delta for each Monday range on an ongoing basis.

This information quantifies the market’s aggressive buying vs. selling, correlating with price positions inside or outside the VWAP ranges. A strong delta in one direction may justify a price sustaining above/below VWAP, or diverging from the previous range.

Interpretation and Best Usage Practices
  • VWAP±2σ Range: Considered a high-probability area for consolidation or reversal. Mean-reverting strategies can benefit from signals within this area.
  • VWAP±3.0 and beyond: Extreme deviations may signal exhaustion or breakout potential, but are less frequent.
  • Previous Range Overlap: Overlap of today’s price with past VWAP zones may indicate support/resistance zones.
  • Monday Range on Tuesday: Persistent levels where the week may repeatedly pivot. Best used on instruments that exhibit weekly cyclical behavior (e.g., indices, forex).
  • Delta Behavior: Sharp positive or negative delta combined with price outside VWAP bands may suggest initiative participation and potential trend continuation.


Added Value Over Free Alternatives

While many free VWAP tools exist, this script differs in several specific and factual ways:
  • Anchored 1-minute VWAP lock at a consistent daily timestamp (23:59 UTC), enabling historical analysis.
  • Historical storage of previous VWAP ranges, with adjustable memory depth and visual continuity.
  • Flexible standard deviation plotting, down to 0.5 increments, tailored to the user's strategy needs.
  • Dedicated Monday range analysis, not common in freely available scripts.
  • Volume delta tracking per day and per Monday range, offering a directional volume view unavailable in standard VWAP implementations.
  • Persistent and visual interpretation framework using extended boxes and dashed lines for easier contextual navigation.


Each of these additions increases the script’s utility for methodical traders relying on volume-weighted statistics, without requiring additional configuration or external calculations.

Limitations and Disclaimers

VWAP based on 1-minute resolution: The indicator uses minute-level data to calculate daily VWAP and standard deviation. This offers high fidelity on liquid instruments but may produce noisy or unreliable levels on illiquid assets or during periods of low volume. For example, microcap stocks or thinly traded altcoins might not yield stable VWAP centers.

Inferred buy/sell volume: Volume delta is estimated using price movement from one candle to the next (close-to-close logic), rather than actual trade-level aggressor data (which is not accessible via TradingView). This approximation may misclassify volume in choppy or low-volatility environments, especially in assets where price changes do not correlate well with order flow (e.g., crypto during low-volume weekends).

Non-continuous markets and price gaps: For assets that do not trade continuously (e.g., stocks, futures), the VWAP calculation starts fresh every day at 00:00 UTC, regardless of the instrument’s official session start. As a result:
  • Pre-market/post-market trades may be included in VWAP when analyzing equities, even though they are often excluded in professional VWAP tools.
  • Opening gaps in equities and futures may distort early VWAP values due to lack of volume context, especially if the previous day's session was already closed when new data begins accumulating.
  • Weekend gaps in crypto, although less frequent due to 24/7 trading, can still influence delta accumulation if abrupt moves happen during low liquidity periods.

Daily session alignment: The VWAP anchoring and box drawing uses 00:00 UTC to 23:59 UTC windows. For instruments with different official session timings (e.g., US equities, CME futures), this may cause mismatches between expected session VWAPs and the ones shown in this script.

Conclusion

The ZenAlgo – Ranger script offers a systematic visualization of volume-adjusted price behavior, combining statistical VWAP ranges with volume delta overlays. By integrating daily and weekly reference zones, this tool supports structured decision-making in various market environments, particularly for traders prioritizing mean reversion, range expansion, or trend confirmation.
發行說明
New Feature: Extended Standard Deviation Lines
Users can now optionally show up to ±20 standard deviations from the Monday VWAP range (displayed on Tuesday). Each deviation line is toggleable individually in the settings.
  • These levels are computed as multiples of the Monday range’s standard deviation.
  • Lines at ±2, ±5, ±10, ±15, and ±20 are visually emphasized with bolder lines.
  • Other levels use a thinner dotted line.
  • These additional ranges allow for a broader contextual understanding of extreme moves relative to Monday’s activity.

New Setting: "Shift Monday Ranges Forward by 7 Days"
This setting allows you to shift past Monday ranges exactly one week forward for alignment or forecasting purposes.
  • When enabled, past Monday boxes will be plotted starting one week after the original date.
  • This is useful for visually comparing whether the current price respects or revisits older Monday-based structures.

New Colors and Transparency Settings
  • Monday Core Color: sets the color of the main Monday range box borders.
  • Monday Range Border Color: controls the appearance of outer boundaries and deviation lines.
  • Transparency can now be adjusted independently for Monday’s fill area.

Added Labels for High and Low
  • Each Monday range box now includes numerical labels on the right side of the chart, clearly displaying the exact high and low of the Monday range.
  • These values are dynamically calculated from VWAP ± 2 × STD.

Added 25% / 50% / 75% Lines Inside Box
Monday range boxes now include dashed horizontal lines at:
  • 25% from bottom (low)
  • Midpoint (50%)
  • 75% from bottom (near top)

These divisions help interpret intra-range movement or potential reversion levels.

Continued Tracking for Monday Ranges
  • Delta (buy volume − sell volume) is now tracked independently for each Monday range.
  • This volume delta is calculated using 4H candles and stored separately for each week.
  • It updates every 4 hours and persists across previous weeks.

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。