Absorption Bar Detector
Absorption happens when a large amount of trading activity fails to move price much, because a resting order (or a determined opposing side) is soaking up everything thrown at it. On a chart that shows up as a bar with far more ticks than its neighbours but a range no bigger than usual, often right before a reversal. The trouble is that "far more ticks" and "no bigger range" both require a baseline, and eyeballing that baseline bar to bar is unreliable. This indicator computes both baselines explicitly: average tick volume over a trailing lookback window, and a simple true-range ATR over the same window, with the tested bar itself excluded from both averages so a single extreme bar cannot inflate its own threshold. A bar only qualifies when tick volume is at least InpVolumeMultiplier times the average AND its range is at most InpRangeFraction of ATR. Direction is read from where the close settled inside the bar's own range - close near the high marks bullish absorption (selling pressure absorbed), close near the low marks bearish absorption. A close sitting in the middle third is deliberately left unmarked, since heavy volume with no resolved direction is not an actionable read. Tick count is MQL4's only volume proxy on most retail feeds - it counts price changes, not confirmed traded size - so this identifies activity bursts, not verified institutional footprints. Notes and limitations - Both baselines exclude the tested bar, but they are still simple trailing averages - a market that has just gone through a genuine volatility regime shift will produce a run of flags until the baseline catches up. - Tick volume is an activity proxy, not confirmed traded size or real exchange volume; brokers with thin or synthetic tick feeds will produce noisier baselines than a deep ECN feed. - Bar 0 (the still-forming bar) is never signalled, since its volume and range are still growing bar by bar. - This flags a pattern, not a trade signal. It does not size a position, place a stop, or account for spread and slippage.
Indicator · MT5 · v1.0 · Free
About Absorption Bar Detector
Absorption Bar Detector is an indicator for MetaTrader 5. It draws buy and sell arrows on the chart and can alert you with a pop-up, sound, email or push message. It has 6 settings, such as Volume lookback, Volume multiplier and Atr period. MQL source code included.
Files in the download: AbsorptionBarDetector.ex5, AbsorptionBarDetector.mq5, AbsorptionBarDetector.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Volume lookback | 20 | Bars used to average tick volume |
| Volume multiplier | 2.0 | Bar volume must be at least this many times the average |
| Atr period | 14 | ATR period used as the range baseline |
| Range fraction | 0.5 | Bar range must be at most this fraction of ATR |
| Close third ratio | 0.33 | Close must sit within this fraction of the bar's extreme to set direction |
| Alerts | true | Alert once per closed bar on a new absorption flag |
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: ATR · Volume · Buy/Sell Arrows · Alerts · MT5 Indicator · MQL5 Source Code