Loading…

Previous Value Zone Shader

The value area - the price band containing most of a session's traded volume, centred on the point of control - is one of the most watched reference levels in volume profile trading, and one of the least often built as a standalone indicator, because a proper profile needs a volume-by-price histogram rather than just a high/low range. This indicator builds that histogram from yesterday's bars on the chart's own timeframe, bins them by typical price weighted by tick volume, finds the point of control (the single busiest price bin), and expands outward from it - always widening into whichever neighbouring bin carries more volume - until the configured percentage of the day's volume is covered. That covered band is the value area; its edges are shaded across today's session as a rectangle, with a dashed line marking the point of control itself. The shading is not a static colour. It tracks how today's session has actually behaved against that zone: while price stays inside it, the zone reads as ordinary balance. The moment today closes back inside after having traded outside the zone, it is marked as a rejection - the failed-breakout colour. Once today has closed beyond the zone and held for several confirmed bars in a row, it switches to the acceptance colour, showing the old value area has been left behind rather than just poked at. A naive version of this indicator would only ever draw a static box; this one is meant to answer "is the market accepting or rejecting yesterday's fair value" without the trader having to work it out by eye. Notes and limitations - The profile is built from the chart's own timeframe bars, not a forced M1 reconstruction, so a bar's whole tick volume is assigned to a single price bin (its typical price) rather than spread across the bar's true intrabar range. This is a genuine simplification: on an M15 or lower chart the profile is close to a real one, on H4 or D1 it is coarse. State this to anyone expecting a tick-accurate profile. - Volume is tick volume, the only figure available on most forex feeds, not real traded volume. - Only one profile (yesterday's) is tracked at a time; there is no multi-day history of value areas kept on the chart. - The acceptance/rejection classification only looks at confirmed bar closes, never the still-forming bar, so it cannot flip back and forth mid-bar - it can lag by up to one bar's worth of time behind the live price relative to the zone.

Indicator · MT4 · v1.0 · Free

About Previous Value Zone Shader

Previous Value Zone Shader is an indicator for MetaTrader 4. It has 7 settings, such as Profile bins, Value area percent and Inside color. MQL source code included.

Files in the download: PreviousValueZoneShader.mq4, PreviousValueZoneShader.txt.

Settings

SettingDefaultWhat it does
Profile bins24Number of price bins used to build yesterday's profile
Value area percent70.0Percentage of yesterday's volume the value area must cover
Inside colorclrSteelBlueZone colour while today's price is trading inside the zone
Accept colorclrForestGreenZone colour once today has broken out and held (acceptance)
Reject colorclrOrangeRedZone colour after today pokes outside then closes back in
Poc colorclrGoldPoint of control line colour
Hold bars for accept2Confirmed bars closed beyond the zone before it counts as accepted

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Volume · Trading Sessions · MT4 Indicator · MQL4 Source Code

MetaTrader 4 & 5 indicators · PolyMaria