Elastic Volume Weighted Moving Average
The published elastic VWMA formula weights each new bar's pull on the running average by that bar's volume relative to a rolling average volume: a bar with unusually heavy activity can noticeably drag the line toward its own price, while a quiet bar barely moves it at all. That is a meaningfully different shape from a plain EMA, which pulls by the same fixed fraction every bar regardless of how active it was. MetaTrader 4 forex feeds do not carry genuine traded volume - there is no consolidated exchange tape for an OTC market to report from. The only figure available is iTickVolume(), a count of price updates per bar, which correlates with activity but is not the same thing as turnover. This indicator uses tick volume and says so plainly in its own short name and here, rather than presenting itself as a true volume-weighted average the way the name might otherwise imply on this platform. The formula's known instability - a single bar with volume above the rolling average makes the (AvgVol - Vol) term negative, which would overshoot past the bar's own price - is handled the standard way, by clamping that bar's volume at the rolling average before applying the formula. Notes and limitations - Weighted by tick volume (price update count), not genuine traded volume - this platform has no access to the latter on a forex symbol. Treat the weighting as a relative-activity proxy, not a turnover-accurate figure. - A window with zero tick activity at all (a dead or disconnected feed) holds the average flat rather than dividing by zero. - Seeded at the oldest available bar with that bar's raw close; the seeding transient washes out over the first several dozen bars, same as any recursive average. - On an instrument where iTickVolume() spikes are mostly spread/latency noise rather than genuine activity bursts, this behaves closer to a noisier EMA than a meaningfully different average - most useful on liquid majors during active sessions.
Indicator · MT4 · v1.0 · Free
About Elastic Volume Weighted Moving Average
Elastic Volume Weighted Moving Average is an indicator for MetaTrader 4. It has 1 setting, such as Volume avg period. MQL source code included.
Files in the download: ElasticVwma.ex4, ElasticVwma.mq4, ElasticVwma.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Volume avg period | 20 | Bars used for the rolling average tick-volume that sets each bar's pull |
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: Moving Average · Volume · MT4 Indicator · MQL4 Source Code