Loading…

POC Distance Oscillator

The point of control - the price level where the most estimated volume traded over a given window - is a core volume-profile concept, but most implementations only draw it as a static line and leave the trader to eyeball the distance. This indicator turns that distance into a proper oscillator: for every bar it rebuilds a rolling InpLookbackBars-wide volume profile, finds that window's point of control, and plots (Close - POC) divided by ATR, so a reading of "1.5" means "one and a half average true ranges away from where the market has recently spent the most volume", on any symbol or timeframe. The point-of-control calculation itself reuses the bucket-and-overlap technique from AnchoredVolumeProfile.mq4 elsewhere in this catalogue: each bar's tick volume is split across every price bucket its own high-low range overlaps, weighted by how much of the bar's range falls in each bucket. The difference here is that the window is genuinely rolling rather than anchored to a fixed clicked point - every bar gets its own freshly computed point of control from the InpLookbackBars bars immediately behind it, which is what makes it valid to plot as a continuous oscillator rather than a one-off marker. The naive version of this idea would use a fixed price-unit distance, which is meaningless compared across a JPY pair, a metal, and an index. Normalising by ATR is the deliberate fix, at the cost of needing a second indicator call (iATR) per bar alongside the profile rebuild. Notes and limitations - Every volume figure behind the profile is MT4 tick volume (price update count), never real traded contracts or lots. - Recomputing a full volume profile for every single bar is inherently heavier than a simple moving average; InpMaxBarsToProcess caps the initial recalculation cost on a long history load, and bars beyond that cap on first attach show no value until incrementally recalculated on subsequent bars. - A very tight InpLookbackBars on a low-volume symbol can produce a point of control from very few effective buckets - widen it if the oscillator looks noisy or jumps between distant buckets bar to bar. - No trade or alert logic - visual analysis only.

Indicator · MT5 · v1.0 · Free

About POC Distance Oscillator

POC Distance Oscillator is an indicator for MetaTrader 5 based on ATR. It has 4 settings, such as Lookback bars, Buckets and Atr period. MQL source code included.

Files in the download: PocDistanceOscillator.ex5, PocDistanceOscillator.mq5, PocDistanceOscillator.txt.

Settings

SettingDefaultWhat it does
Lookback bars100Rolling window size the point of control is measured over
Buckets20Number of price buckets the window's range is divided into
Atr period14ATR period used to normalise the distance
Max bars to process500Hard cap on bars recalculated on a fresh attach/history load (performance guard)

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 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: ATR · Volume · Oscillator · MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria