Liquidity Void Boxes
A bar can move a long way for two very different reasons: heavy, genuine trading interest pushing price through a level, or price simply skipping through a thin patch with few resting orders on either side. This indicator flags the second case specifically - a bar whose range is unusually wide relative to recent ATR while its own tick volume is unusually thin relative to its recent average - and boxes it as a "liquidity void": a zone that changed hands on comparatively little volume and is therefore a plausible target for price to later return to. The box is drawn over the bar's BODY (open to close), not its full wick range, since the wicks on either side of the body already traded through and are not empty - only the body is the part of the move that displaced price to a new level on thin interest. Each void box is kept exactly until price trades back into its price range on a later closed bar (mitigation), at which point it is deleted immediately - this indicator never leaves a stale box claiming a void is still open after price has already revisited it. A cap on the number of simultaneously active boxes prevents an unbounded pile-up of unmitigated voids on a long, choppy history; the oldest unmitigated box is dropped once the cap is reached. Notes and limitations - "Thin volume" here means tick volume (number of price changes), the only volume MetaTrader 4 exposes for forex - it is a proxy for trading activity, not literal traded contract volume. - Mitigation is checked against the most recently CLOSED bar's own high/low, once per tick - a very brief intrabar wick that revisits and leaves a void zone within the same still-forming bar is only detected once that bar itself closes, not the instant it happens. - Detection only looks at fully closed bars; the currently forming bar is never boxed until it closes, since its final range and volume are not settled yet. - New void detection rescans up to InpScanBars bars every tick (skipping any bar that already has a box), the same pattern used elsewhere in this catalogue for short-lived, state-light chart-object indicators - it has no separate persisted history beyond the chart objects themselves.
Indicator · MT4 · v1.0 · Free
About Liquidity Void Boxes
Liquidity Void Boxes is an indicator for MetaTrader 4 based on ATR. It has 7 settings, such as Atr period, Range atr multiplier and Volume avg period. MQL source code included.
Files in the download: LiquidityVoidBoxes.ex4, LiquidityVoidBoxes.mq4, LiquidityVoidBoxes.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Atr period | 14 | ATR period used for the "wide bar" test |
| Range atr multiplier | 1.5 | A bar counts as fast-traversal when its range exceeds ATR times this |
| Volume avg period | 20 | Bars used to compute the trailing average tick volume |
| Volume thin fraction | 0.5 | A bar counts as thin when its volume is below this fraction of the average |
| Scan bars | 500 | How many recent bars are scanned each tick for new void bars |
| Max active boxes | 40 | Oldest unmitigated box is dropped once this many are active |
| Box color | clrDarkOrchid | Colour on the chart |
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: ATR · Volume · MT4 Indicator · MQL4 Source Code