Visible Range Volume Profile
This is a visible-range profile: it looks only at the bars actually on screen right now, so scrolling back to a different stretch of history or zooming in and out changes what the profile shows, on purpose - it answers "where did volume concentrate in the part of the chart I am currently looking at", not "where did volume concentrate over some fixed lookback". MetaTrader 4 has no per-price-level volume record for forex, only one tick_volume figure per bar, so each bar's volume is spread evenly across every price bucket its high-low range touches - the same honest approximation used by the other volume-by-price tools in this catalogue, and a coarser one than a true traded-volume profile would give. Two things are marked beyond the plain histogram. The point of control (POC) is the single bucket that received the most volume, highlighted and labelled. The value area is grown outward from the POC one bucket at a time - always taking whichever side, above or below the current span, carries more volume next - until the accumulated share reaches InpValueAreaPercent of the total, which is the standard construction market-profile traders use, not simply the top few buckets sorted by size. Buckets inside the value area get their own colour, separate from the point of control and from the rest of the profile. Notes and limitations - Uses tick_volume (MetaTrader's Volume[] series) as the volume input, since forex has no consolidated tape - a proxy for tick activity, not a literal count of contracts or lots. - Each bar's volume is split evenly across every bucket its high-low range touches rather than weighted toward where price actually spent more time within the bar, because MQL4 exposes no intrabar price-level detail to weight it with. - Recomputed from scratch on every recalculation and on every chart scroll or zoom - by design, since the visible range itself is what defines the profile. This is a live view, not a historical signal, so its shape changing as you scroll is expected behaviour rather than the kind of repainting that would affect a trading decision already made. - Draws only what is on screen; it does not scan the symbol's full history, so it stays fast regardless of how much data the terminal holds.
Indicator · MT5 · v1.0 · Free
About Visible Range Volume Profile
Visible Range Volume Profile is an indicator for MetaTrader 5. It has 7 settings, such as Price step pips, Max rows and Profile width bars. MQL source code included.
Files in the download: VolumeProfile.ex5, VolumeProfile.mq5, VolumeProfile.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Price step pips | 5.0 | Bucket width, in pips, each histogram row represents |
| Max rows | 80 | Maximum rows drawn; the step is coarsened automatically past this |
| Profile width bars | 30 | Bar-widths of empty space the longest row is allowed to occupy |
| Value area percent | 70.0 | Percent of total volume the value area is grown to cover |
| Row color | clrSteelBlue | Normal row colour |
| Poc color | clrOrange | Point-of-control row colour (highest volume) |
| Value area color | clrDodgerBlue | Row colour for buckets inside the value area |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 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: Volume · MT5 Indicator · MQL5 Source Code