OPEN-SOURCE SCRIPT

Edo VWAP Core

273
Edo VWAP Core — Fair-Value Reading Built on Weekly and Monthly Anchored VWAP with Standard Deviation Bands, Premium/Discount States, Sigma Distance and Information Panel

快照

快照


The volume-weighted average price is, within any given period, the closest thing to an asset's fair value: it is the price every participant has actually paid, weighted by the volume traded on each candle. Whoever buys well above it is paying a premium relative to the market as a whole; whoever buys below is getting a discount. The session VWAP captures only one day and resets too often to be useful for swing work; anchoring the calculation to a higher horizon turns that same idea into a stable reference for positioning.

Edo VWAP Core builds on that principle by anchoring the VWAP to two horizons at once — the current week and the current month — and framing each line with standard deviation bands. On its own, an anchored VWAP is just a line. With Edo VWAP Core, that line gains a premium/discount state classification, a sigma-distance reading, deviation bands that delimit the cheap and expensive zones, a translucent fill between price and VWAP that switches colour with the active state, and an information panel that condenses the whole quantitative reading. Five coordinated layers on a single overlay, designed to answer one question continuously: is price trading expensive or cheap relative to what the market has actually paid?

WEEKLY AND MONTHLY ANCHORED VWAP

The indicator draws two anchored VWAPs simultaneously. The weekly line resets at the start of each new week and accumulates, candle by candle, the volume-weighted typical price up to the current moment; it is the main operational reference, plotted in blue. The monthly line resets at the start of each new month and accumulates the volume of the entire current month, so it runs slower and more stable, plotted in orange and providing the higher-horizon context. Both are calculated internally with the close of each candle of the active timeframe, so they do not depend on higher-timeframe functions and do not repaint: once a candle closes, its contribution to the VWAP is fixed. The default typical price source is hlc3, the standard input for VWAP.

The relationship between the two lines describes the value structure of the asset. Weekly above monthly with price above both reads as premium with buying pressure dominant across both horizons; weekly below monthly with price below both reads as sustained discount; price caught between the two lines is a transition zone with no clear value bias between the week and the month.

STANDARD DEVIATION BANDS

Around each VWAP the indicator draws two pairs of volume-weighted standard deviation bands, calculated consistently with the VWAP itself: the ±1σ pair delimits the normal fluctuation zone, and the ±2σ pair delimits the extreme zone, where price is statistically very far from fair value. The bands are what turn the VWAP from a simple line into a measurable value scale — they quantify how expensive or cheap price is trading in terms of standard deviations. The area between +1σ and +2σ is shaded warm (the premium zone), the area between −1σ and −2σ is shaded cool (the discount zone), and the central ±1σ band carries a faint tone of the VWAP colour to mark the equilibrium region. Band widths reflect the volatility of the period: the wider the bands, the more volatile the move.

PREMIUM / DISCOUNT STATE CLASSIFICATION

The indicator classifies each bar into one of five exclusive states according to the position of the close relative to the reference VWAP and its bands. Premium Extreme: close above +2σ, upside overextension. Premium: close between +1σ and +2σ, price trading expensive. Neutral: close within ±1σ, fair value around the VWAP. Discount: close between −1σ and −2σ, price trading cheap. Discount Extreme: close below −2σ, downside overextension. The colour code follows the classic premium/discount logic — warm tones for the expensive zone, cool tones for the cheap zone — and the state is reflected simultaneously in the price-VWAP fill, in the panel and, optionally, in the chart background and the candle colouring. The panel accompanies the state with a bar counter showing how many consecutive candles price has spent in it; a high counter inside Premium Extreme or Discount Extreme signals a sustained overextension.

By default the state is calculated over the weekly VWAP as the reference. If the corresponding input is disabled, the state is computed over the monthly VWAP instead, and the panel header indicates which one is in use with a "W ref" or "M ref" label.

SIGMA DISTANCE AND PRICE-VWAP FILL

Sigma distance is the central quantitative measure: it expresses how many standard deviations separate the current close from the reference VWAP, computed as the close minus the reference VWAP divided by the reference standard deviation. A positive value means price is above the VWAP (premium), a negative one below (discount). Because it is normalised, it behaves like a z-score — a reading of +2σ means the same on one asset as on any other, regardless of absolute price — which lets the degree of overextension be compared homogeneously across instruments. Between price and the reference VWAP the indicator draws a translucent fill in the colour of the active state, warm in premium, cool in discount, neutral around fair value, so the value condition of the asset is legible at a glance without consulting the panel; its opacity is configurable.

INFORMATION PANEL

The panel condenses the whole reading into a compact three-column table. Its header shows the active reference VWAP. It displays the current State with its colour and consecutive-bar counter; the σ Dist reading in standard deviations; the weekly VWAP value with an up/down arrow depending on whether price is above or below it, plus its ±1σ and ±2σ band levels; and the same block for the monthly VWAP with its own bands. The panel can be placed in any of the four chart corners and resized to Small or Medium, with Dark and Light themes to blend with the chart background. It can also be hidden entirely.

CONFIGURATION

The inputs are grouped by functional block. The Anchors block toggles the weekly and monthly VWAP independently, sets the price source (hlc3 by default) and the line width. The Bands block enables the deviation bands, sets the inner and outer multipliers (1.0 and 2.0 by default), the fill opacity, and which VWAP drives the state classification (weekly by default). The State block governs the visual translation of the state — background colouring, background opacity, candle painting, the price-VWAP fill and its opacity. The Style block exposes the five state colours, the weekly and monthly line colours and the Dark/Light theme, and the Panel block controls panel visibility, position and size. The defaults are calibrated to work without adjustment on stocks, crypto, forex, indices and futures; the only parameter most users touch is the band multipliers when adapting the value scale to a particularly volatile asset.

ALERTS

Nine predefined alert conditions cover every meaningful event: Premium Extreme, Premium, Neutral, Discount and Discount Extreme fire when price enters the corresponding state; Cross Above VWAP and Cross Below VWAP fire when price crosses the reference VWAP; and New Weekly Anchor and New Monthly Anchor fire when a new period begins and the corresponding VWAP resets. The two extreme-state alerts are the most useful for detecting overextensions, the VWAP cross alerts warn of bias changes relative to fair value, and the anchor-reset alerts flag when the reference has refreshed and the context should be reassessed. State-change alerts are best configured on bar close.

HOW TO READ IT

A clean reading combines the layers into common patterns. Mean reversion from an extreme: price reaches Premium Extreme or Discount Extreme beyond ±2σ and the bar counter grows — moves that far from fair value statistically tend to correct back toward the VWAP, so any entry against that direction starts from a high-risk zone. VWAP as dynamic support or resistance: in healthy trends price drifts toward the premium or discount zone, pulls back to the reference VWAP and bounces without losing it, the line acting as dynamic support in an uptrend or resistance in a downtrend, with the fill making the pullbacks visible. Weekly-monthly confluence: when both VWAPs and their bands overlap in the same price zone, that region gains weight — a discount that coincides with the weekly −1σ and the monthly VWAP is a far more solid value zone than one touching a single reference. VWAP reclaim after discount: price trading cheap reclaims the reference VWAP with an impulse candle, the fill flips colour and the state shifts from Discount to Neutral, marking the moment the asset stops trading cheap and returns to fair value — a value-bias change that often accompanies bullish resumptions.

OPEN SOURCE

Edo VWAP Core is published as a free open source indicator. The full Pine Script is publicly accessible on TradingView for study, adaptation and integration into any workflow. Part of the Edolab Markets free tools ecosystem alongside Edo SuperTrend Core, Edo Multi Stoch, Edo Liquidity Zones, Edo Ichimoku State and more available on TradingView.

This indicator is a technical analysis tool for educational and informational purposes only. It does not generate automatic buy or sell signals and should not be considered financial advice. Trading financial markets involves significant risk of capital loss. Past performance does not guarantee future results. Always use proper risk management.

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。