Volume At Price Recorder
MetaTrader does not draw a volume profile natively, and most brokers do not provide real traded volume at all - only "tick volume", the number of price changes per bar, which is what this EA works with honestly rather than pretending to be something it is not. Every tick adds one unit to whichever price bucket contains the current bid, for as long as the session runs, so the accumulated table shows where activity concentrated even without a real volume feed behind it. A session boundary is configurable to any server hour, since a broker's own day rollover is rarely midnight. When a new session begins, the finished session's buckets are written to CSV - one row per price level, its accumulated tick count, its share of the session total, and two flags: is this the point of control (the single busiest bucket), and does this level sit inside the configured value area, built by growing outward from the point of control toward whichever neighbouring bucket carries more volume at each step, the standard value-area construction. Those flag columns let an external spreadsheet or charting tool filter and colour the profile without recomputing the statistics itself. The on-chart panel shows the running point of control and value area for the session still in progress, so the profile is useful to watch live, not just after the fact from the exported file. Notes and limitations - Tick volume, not real traded volume. Real traded volume is not generally available through MetaTrader on either platform for retail forex feeds; this profile shows where price activity concentrated, not literal traded contracts. - The profile only covers the time the EA has actually been running and receiving ticks - it does not backfill from history on attach. - Very fine bucket widths on a long session can approach the fixed internal bucket table size; widen InpBucketSizePips if a session's export looks truncated.
Expert advisor · MT4 · v1.0 · Free
About Volume At Price Recorder
Volume At Price Recorder is a script for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 5 settings, such as Bucket size pips, Session reset hour and Value area percent. MQL source code included.
Files in the download: VolumeAtPriceRecorder.ex4, VolumeAtPriceRecorder.mq4, VolumeAtPriceRecorder.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Bucket size pips | 5.0 | Width of each price bucket, in pips |
| Session reset hour | 0 | Server hour (0-23) at which a new session's buckets begin |
| Value area percent | 70.0 | Percent of session volume that defines the value area around the point of control |
| Export on session end | true | Write the finished session's profile to CSV when a new session begins |
| Export on removal | true | Also export whatever the current, still-open session has accumulated when the EA is removed |
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 → Scripts.
- 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 script onto a chart to run it once.
Tags: Volume · Trading Sessions · Alerts · MT4 Expert Advisor · MQL4 Source Code