Loading…

Composite Flow Score

Standard forex feeds give no real order book, so any "order flow" indicator on MQL4 has to work from proxies built out of OHLC and tick volume. The naive version of this picks one proxy (usually a volume spike filter or a candle-body ratio) and calls it flow. The trap is that a single proxy is noisy and regime-dependent - a volume spike alone does not tell you direction, and a body ratio alone does not tell you whether that move took real effort or thin liquidity. This indicator computes three proxies separately - net candle body versus range over InpDeltaPeriod (a delta stand-in), tick volume against its own moving average (a relative-volume read), and range moved per unit of volume (an absorption read, where a shrinking ratio means heavy volume produced little price movement) - then normalises each one independently against its own trailing InpNormaliseWindow before blending by weight. Normalising per-component first is the part that matters: without it, whichever proxy happens to have the largest raw numeric range dominates the blend regardless of its actual signal quality. The result is a single bounded line that reads like a sentiment oscillator, with the zero line as neutral and +-80 flagged as an optional alert threshold for a genuinely extreme reading. Notes and limitations This is a proxy composite, not a genuine order-flow read - MQL4 has no DOM/tick-level data on a standard feed, and the indicator does not claim otherwise. Tick volume (iVolume/tick_volume) is used throughout, which on forex means the number of price changes, not traded contracts - a reasonable liquidity proxy, not a volume figure. The absorption proxy divides by volume and by range; both denominators are guarded against zero. Recalculation is bounded by InpNormaliseWindow plus the longest of the three period inputs, so a very small number of bars on chart will return no value at all - this is intentional, not a bug.

Indicator · MT4 · v1.0 · Free

About Composite Flow Score

Composite Flow Score is an indicator for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 8 settings, such as Delta period, Volume period and Absorption period. MQL source code included.

Files in the download: CompositeFlowScore.ex4, CompositeFlowScore.mq4, CompositeFlowScore.txt.

Settings

SettingDefaultWhat it does
Delta period14Bars used to build the directional delta proxy
Volume period20Bars used for the relative-volume average
Absorption period14Bars used for the absorption (range-vs-volume) proxy
Normalise window100Bars back used to normalise each raw proxy to +-100
Delta weight0.4Weight given to the delta component
Volume weight0.3Weight given to the relative-volume component
Absorption weight0.3Weight given to the absorption component
Alert on extremefalseAlert once when the score crosses +-80 on a closed bar

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 · Oscillator · Alerts · MT4 Indicator · MQL4 Source Code

MetaTrader 4 & 5 indicators · PolyMaria