Session Value Area Profile
- Indicadores
-
Allan Aparece Ninal
Desenvolvo indicadores e Expert Advisors para o MetaTrader 5.
Como trabalho:
- Cada indicador é verificado quanto a repintura: os sinais são decididos apenas em barras fechadas, e um teste tick a tick confirma que não mudam depois. - Versão: 1.0
Session Value Area Profile is a free indicator for MetaTrader 5. It draws volume by price for each trading session and marks the point of control (POC) and the value area high and low. A session's profile is final when the session ends, and the session in progress is labelled forming. Attach it to a chart, or watch it on history in the Strategy Tester's visual mode.
It draws and alerts. It does not trade. It shows where trading concentrated. It is not a signal system and it promises no profit. The section How it was checked shows what was tested and what was not.
Standalone: everything is built in. You do not need to buy or install any other product named on this page.
In plain words
A volume profile shows how much trading happened at each price, not at each moment. It is a horizontal histogram: a long bar means a lot of trading at that price.
The row with the most volume is the point of control (POC). The value area is the band of rows around it that holds 70% of the volume. Its top is the value area high (VAH). Its bottom is the value area low (VAL).
Many traders use the previous session's POC, VAH and VAL as reference levels for the current session. This indicator draws them and carries them across the next session.
Forex has no central volume. The indicator uses tick volume: the number of price changes in each bar. It is a proxy for activity, not a count of traded contracts. Where a symbol reports real volume, you can choose that instead.
The levels show where trading concentrated before. They do not say that price will react there again.
What you see on the chart
- Each of the last completed sessions (5 by default, up to 10) gets a histogram that starts at the session's first bar. Rows inside the value area are blue, the POC row is a stronger blue, and the other rows are grey.
- Thin lines mark the POC (dashed) and the VAH and VAL (dotted) across each session.
- The last completed session's three levels are carried to the right edge, with their names and prices.
- The session in progress has its own lighter histogram with the label forming. It is rebuilt when a bar closes.
- Two blue dashed vertical lines mark a fixed range. Its profile is drawn between them. Drag a line to move the range.
- A pill at the bottom left states the previous session's POC and value area.
Worked example: one session
EURUSD H1, Day sessions, default inputs, taken from the parity test of this indicator (broker history, server time).
| Item | Value |
|---|---|
| Session | 27 Nov 2026 (server time), 24 H1 bars |
| Price range | 1.09308 to 1.09860, cut into 48 rows of 0.00012 |
| POC | 1.09613 (centre of the row with the most volume) |
| Value area | 1.09492 to 1.09825 (70% of 49,543 tick volume) |
From the next bar on, these three numbers are the levels carried across the following session. They never change afterwards.
Worked example: a crossing
EURUSD H1, same test. The previous session's POC was 1.09690.
| Bar opens | Close | Against the POC |
|---|---|---|
| 27 Nov 2026 09:00 | 1.09758 | above |
| 27 Nov 2026 10:00 | 1.09635 | below: crossing |
The bar closed on the other side of the POC. The crossing belongs to that bar. It appears, and the alert is sent, when the next bar opens.
Key facts
| Type | Indicator drawn on the price chart, for MetaTrader 5. |
| Draws | Histograms, POC, VAH and VAL lines, carried levels, a forming profile and a fixed-range profile. |
| When a profile is final | When its session has ended: on the bar whose next bar opens in another session. A completed profile never changes. |
| The session in progress | Drawn lighter and labelled forming. It is rebuilt from the closed bars each time a bar closes. The open bar is never used. |
| Reload and timeframe change | Everything is calculated again from closed bars. With the same inputs and the same history the levels come out the same. No alerts are sent for old crossings. |
| Alerts | Pop-up and push are on. Sound and e-mail are off. One alert per closed bar, when its close crosses the previous session's POC, VAH or VAL. Alerts are silent in the Strategy Tester. |
| Trades | No. It places no orders. |
| Other products needed | None. |
| Volume | Tick volume, or real volume when the symbol reports it. |
| Bars used | The chart's own closed bars. No other timeframe is read for the profile, so there is no history-loading state. |
| Symbols and timeframes | Any symbol, M1 to H4 for session profiles. It was tested on EURUSD, GBPJPY, XAUUSD and BTCUSD at M15, H1 and H4. |
| History needed | The first complete session. By default the indicator calculates the last 5000 bars. |
Quick start
- Attach it to a chart of M5 to H1. The profiles and levels appear at once. The defaults work without tuning.
- Read the carried levels at the right edge: prev POC, prev VAH and prev VAL are the previous session's levels.
- To change the picture, set the session (Day, Week or an hours window in server time), the rows and the value area percentage.
- Drag the two blue vertical lines to profile any stretch of bars.
- Choose your alerts. Pop-up and push alerts are on by default. Push needs your MetaQuotes ID under Tools, Options, Notifications.
Who it is for
For traders who want to see where trading concentrated in the last sessions. They use the POC and the value area as reference levels on any symbol.
Not for you if you want a trading system. It draws levels and sends alerts. I have not tested the levels as a trading rule.
How it works under the hood
Sessions
Times are server time. Day runs from midnight to midnight. Week runs from Sunday 00:00 to Saturday. Hours is a window you set, for example 8 to 16. A window may cross midnight: start 22 and end 6.
A bar belongs to the session its open time falls in. In an hours window, a bar outside the window belongs to no session. A broker's daylight-saving change moves an hours window against UTC, but not a Day or Week session.
A session is complete on the chart bar whose next bar opens in another session. A session with fewer bars than the minimum (3 by default) is skipped, for example a short Sunday. The first session is skipped when the history starts inside it.
Volume
The volume of a bar is its tick volume, the number of price changes in that bar. With the input Volume set to real volume, a symbol that reports real volume uses it. If no bar in the calculated history has real volume, tick volume is used instead.
Rows and the spread of a bar's volume
The price range of the session, from its lowest low to its highest high, is cut into equal rows (48 by default). The volume of each closed bar is spread evenly over the bar's high-low range.
A row gets the bar's volume times the share of the bar's range that lies inside the row. A bar with high equal to low puts all its volume in the row that holds the price. The row sums are the histogram.
Only the chart's own bars are used. So the same session looks a little finer on M5 than on H1, because more bars share the range.
POC and value area
The POC is the row with the most volume. If several rows tie, the lowest one is used. Its price is the centre of the row.
The value area starts at the POC row. The indicator adds the two rows above or the two rows below, whichever pair holds more volume. The pair above wins a tie. It repeats until the area holds the chosen share of the volume (70% by default).
The VAH is the top edge of the highest row in the area. The VAL is the bottom edge of the lowest row.
The levels in force
On any bar, the levels in force are those of the latest session that was completed before that bar. They switch on the first bar of the next session.
Crossings and alerts
A close crosses a level upward when the previous close was at or below it and this close is above it. Downward is the mirror. A margin of one billionth of the price keeps a level that sits exactly on a close from flipping.
The crossing is decided on a closed bar against levels that were final before the bar opened. The forming bar never raises an alert.
Fixed range
The profile covers the closed bars whose open time lies between the two lines. If the end line is right of the last closed bar, the range is still open. It is drawn lighter and grows with each closed bar.
When a value is final
Every decision uses closed bars. A completed session's profile, a buffer value and an alert never change afterwards. The forming session, and an open fixed range, are redrawn when a bar closes and are labelled so.
Reload, restart and timeframe change
After a reload, a restart or a timeframe change, the indicator feeds the closed bars again and redraws everything. With the same inputs and the same history it draws the same levels. The profile of a session can look different on another timeframe, because the bars differ.
No alert is sent for crossings found during that reload. An alert is sent only for a bar that closes while the indicator runs.
Speed
Each completed session is drawn once. Only the forming session and the fixed range are redrawn, and only when a bar closes. By default the indicator calculates the last 5000 bars and draws at most 100 rows per profile.
Inputs
| Input | Default | Description |
|---|---|---|
| Session | Day | Day, Week or Hours window (server time). |
| Hours window: start hour / end hour | 8 / 16 | 0 to 23, server time. May cross midnight, for example 22 and 6. |
| Completed sessions drawn | 5 | 1 to 10. |
| Rows per profile | 48 | 10 to 100. |
| Value area, % of the volume | 70 | 50 to 95. |
| Skip sessions with fewer bars than this | 3 | 1 to 50. |
| Longest row, % of the session length | 30 | 10 to 90, counted in bars. |
| Volume | Tick volume | Tick volume, or real volume when the symbol has it. |
| Carry the previous session's levels to the right edge | true | The prev POC, VAH and VAL lines. |
| Name and price next to the carried levels | true | The labels at the right edge. |
| Show the fixed-range profile | true | Two draggable vertical lines. |
| Fixed range: start time / end time | 0 / 0 | 0 means 96 bars back and the last closed bar. Drag the lines to change them. |
| Calculate this many bars back | 5000 | 0 = all bars. |
| Status pill | true | The line at the bottom left. |
| Debug log for bug reports | false | See Found a problem? |
| Pop-up alert | true | Alert window in the terminal. |
| Play a sound | false | Plays the sound file below. |
| Sound file | alert.wav | File from the terminal Sounds folder. |
| Push notification | true | Needs your MetaQuotes ID. |
| false | Needs e-mail set up in the terminal options. | |
| Alert: close crosses the previous session's POC / VAH / VAL | true | Three switches. |
Alerts and Expert Advisor use
Alerts. One alert per closed bar, sent when the next bar opens. The message names each level and the close, for example close 1.09130 crossed up through the previous session POC 1.09100. Nothing is sent while the history loads, twice for the same bar, or in the Strategy Tester.
Buffers for Expert Advisors (iCustom). A level buffer holds the same price on every bar of a session. The forming bar stays empty. Read from shift 1.
| Buffer | Content |
|---|---|
| 0 / 1 / 2 | Previous session POC / VAH / VAL, as known at the bar |
| 3 / 4 / 5 | The close crossed the POC / VAH / VAL on this bar: 1 up, -1 down |
How it was checked
- Profiles: compared with an independent Python version of the rules, on broker history. 40 files (EURUSD, GBPJPY, XAUUSD and BTCUSD at M15, H1 and H4, four session settings) held 14,590 completed sessions and 644,448 row volumes. There were 0 differences in the POC, VAH, VAL, volumes or statistics. Another 8 files, hours windows on H4, built no session because the window held fewer bars than the minimum. They are not counted as coverage.
- Buffers: 21,489,018 buffer values on the same files, including 426,267 crossings. There were 0 differences.
- Repaint: 6 Strategy Tester runs with every tick (BTCUSD H4, EURUSD H1, EURUSD M15, GBPJPY M30, XAUUSD H4). 31,674 closed bars were compared with the values read when they closed. 0 changed after the close, and 0 values appeared on the forming bar.
- Error check: Strategy Tester runs on 5 symbol and timeframe pairs (EURUSD H1, XAUUSD D1, GBPUSD M30, EURUSD M1, GBPJPY H4). They used 100 and 1,000 USD deposits: 10 runs, 0 error lines.
- Memory and speed: the highest memory use in those runs was 190 MB. The slowest run, XAUUSD D1 with 61.5 million ticks, took 2 minutes 35 seconds. That is about 3 microseconds per tick.
The final build was checked again on a smaller grid: EURUSD and XAUUSD, M15, H1 and H4. The result was the same: no differences and no error lines.
Trading-rule test: I have not tested these levels as a trading rule. In an earlier lab test of a third-party volume profile, 1 of 832 level rules passed. I rebuilt its standard profiles on 37 symbols from M5 to H1 and judged them out of sample. The one that passed was fragile, so treat the levels as context.
Not tested: alerts on a live chart (the tester is silent for alerts), and real volume on a symbol that reports it.
Limits
- Forex volume is tick volume. It counts price changes, not traded contracts, and it differs between brokers.
- The levels show where trading concentrated before. They do not say that price will react there again.
- It gives no stop loss, target or lot size.
- The profile is built from the chart's own bars. A higher timeframe has fewer bars per session and a coarser picture. Use M1 to H1 for Day sessions.
- On a timeframe where a session has fewer bars than the minimum, no session is complete and nothing is drawn. The pill says that the chart timeframe is too high.
- A different row count or value-area percentage gives different levels. The defaults are 48 rows and 70%.
- Sessions follow server time. Another broker's server time gives other session edges and other levels.
- Many rows and sessions mean many chart objects. At most 100 rows and 10 sessions are drawn, and each completed session is drawn once.
- Alerts need the terminal to be running with the chart open.
FAQ
Does it repaint? A completed session's profile, its levels, the buffers and the alerts never change. The session in progress is labelled forming and is rebuilt when a bar closes. An open fixed range does the same.
What happens if I change the timeframe or reload the chart? The indicator feeds the closed bars again and draws the same levels for the same history and inputs. On another timeframe the bars differ, so the picture differs a little. It sends no alerts for old crossings.
Why is nothing drawn with an hours window on H4? A session needs at least the minimum number of bars (3 by default). An hours window of 9 hours holds two H4 bars, so no session is complete. The pill says the chart timeframe is too high. Use a lower timeframe or a longer window.
Why does the forming profile keep changing? It is built from the bars closed so far. Its price range and its rows change as the session goes on. Only the completed profile is final.
Why do my levels differ from another tool? Volume source, bar data, row count, session times and the value-area rule all change the result. This page states each rule so you can compare.
Is it real volume? Not on forex. It is tick volume, a proxy. The Volume input can use real volume on a symbol that reports it.
Can an Expert Advisor read it? Yes. Read the buffers listed under Alerts and Expert Advisor use, from shift 1.
Can I run it on a VPS? Yes, like any indicator. It needs a terminal that is running with the chart open. It places no orders.
Is there a MetaTrader 4 version? Yes, Session Value Area Profile MT4, with the same rules.
Try it first
It is free. Attach it to a chart on a demo account, or run it in the Strategy Tester in visual mode on history. Check a session's levels against its bars. The history shows where trading concentrated, not what price did next.
Works well with
These are workflow suggestions. I have not found that any pair gives better trading results. You do not need any of them.
| Product | How to use them together | Why |
|---|---|---|
| Session Levels | Add it to the same chart. | It draws session boxes and the previous day and week levels. The profile shows where volume sat inside those sessions. |
| Touch Strength Zones | Add it to the same chart. | It draws support and resistance zones from swing points. Compare them with the POC and the value area. |
| Risk Position Tool | Pick the trade from the chart, then drag the entry and stop lines. | It separates where you enter from how much you risk. The tool places no orders. |
Related products
- Session Value Area Profile MT4: the same indicator for MetaTrader 4.
- All my products on MQL5
Custom work
Want an EA that trades this indicator, a custom version of it, several of my indicators or EAs combined into one, an EA that trades another indicator you use (mine or another developer's), or a new indicator or EA of your own? Order it through MQL5 Freelance and choose me as the developer: order through Freelance. Send your requirements, rules and the flow or algorithm you want. The whole order, payment and delivery stay inside MQL5 Freelance.
Found a problem?
- In the inputs, set "Debug log for bug reports" to true.
- Repeat what went wrong.
- Open the Experts tab in the Toolbox. Copy the lines that start with "DBG" and paste them in a comment on this page, with the symbol and timeframe.
- Set the debug log back to false.
The debug lines never contain your account number, name, server, balance or equity.
If you find it useful, a short review on this page helps other traders find it.
Questions: use the comments on this page or send me a message on MQL5.
Trading involves risk of loss. Backtest results do not predict future results.
