MTContext Docs
Tool Reference

Order Flow

1 tool in this category.

Overview

Order Flow includes 1 tool for this workflow area.

Available tools: get_order_flow.

Use the parameter tables and examples below as the canonical request contract.

get_order_flow

Reconstructs a per-bar order-flow footprint (price-level buy/sell volume, delta, POC, imbalances). Prefers GET_FOOTPRINT (estimation: "exchange_flags") when the terminal's EA build supports it — real aggressor-side classification from the terminal's own MqlTick.flags, bucketed inside the terminal (no 1000-tick wire ceiling). Falls back to a tick-rule ESTIMATE (estimation: "tick_rule") inferred from bid/ask mid movement, paged via GET_TICK_HISTORY, for terminals on an EA build that predates this — identical to this tool's pre-upgrade behavior, no forced EA upgrade. volume_basis is tick_count for symbols without real traded volume (always tick_count for exchange_flags responses). confidence for tick_rule is reduced by the share of ticks whose classification was inherited (unchanged mid); for exchange_flags it instead reflects the share of ticks that had a usable flag. cumulative_delta_scope is session_anchored (accumulated from the UTC session-day open) when this terminal is bound and ingested history for this symbol has no gap back to that boundary, else window_local (accumulated only across the returned bars) exactly as before this change. Bounded by max_ticks on the tick_rule path only (1000 ticks per GET_TICK_HISTORY page); coverage reports complete | partial there, with the actually-covered time range when partial. An imbalance's ratio is normally the buy/sell (or sell/buy) volume ratio, but reports the sentinel 9999 for a one-sided level (all volume on one side, dividing by zero) — treat 9999 as "fully one-sided", not a literal ratio. MT5 only: MT4's day-granular from_date makes intraday tick paging unreliable, and GET_FOOTPRINT is not routed on MT4. Requires the analytics capability (Team+ tier).

Parameters

NameTypeRequiredDefaultDescription
symbolstringYes
timeframestringYes(one of: M1, M5, M15, M30, H1, H4, D1, W1, MN1)
barsintegerNo3
level_sizenumberNo
max_ticksintegerNo5000

Example Request

{
  "tool": "get_order_flow",
  "arguments": {
    "symbol": "EURUSD",
    "timeframe": "M1"
  }
}

Usage Notes

  • Start with a smaller count/bars value while iterating, then increase once the workflow is stable.
  • Use one timeframe for quick checks and multiple timeframes only when you need cross-timeframe analysis.

On this page