Daily VWAP
VWAP only means something if it is measured from a defined start point, and for most intraday traders that start point is the beginning of the trading day. This indicator sums typical price times volume from the first bar of each calendar day, divides by cumulative volume, and resets both sums the moment the day changes - so the line always answers "what has the average traded price been so far today", never a running total that quietly bleeds across midnight. Doing that reset correctly every tick without rescanning the whole chart history is the part that is easy to get wrong. Each call carries forward the sums for whatever part of today was already computed on the previous tick by walking back only as far as the start of the current day, then extends forward one bar at a time. The cost of that walk-back is bounded by how many bars make up one trading session on the chart's timeframe, not by how much history is loaded, so it stays cheap on every tick regardless of chart length. MQL4 only exposes tick volume on most retail feeds, not real traded size, so this VWAP is a liquidity-weighted proxy rather than a true volume-weighted one. It is still the standard way VWAP is computed on this platform, and the distinction is worth knowing before treating it as an institutional VWAP feed. Notes and limitations - Built on tick volume, not real traded volume - see the description above. On symbols or brokers with sparse tick volume, the weighting is coarser. - The day boundary is taken from each bar's own timestamp in broker server time, so it follows the terminal's day change, not a specific trading session's open. - Best suited to intraday timeframes. On D1 and above every bar is its own "day", so the line collapses to typical price per bar and loses its purpose.
Indicator · MT4 · v1.0 · Free
About Daily VWAP
Daily VWAP is an indicator for MetaTrader 4. MQL source code included.
Files in the download: DailyVwap.ex4, DailyVwap.mq4, DailyVwap.txt.
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: VWAP · Volume · MT4 Indicator · MQL4 Source Code