MT5 Market Book: Read Order Flow & Trade Smarter

Learn to read the MT5 Market Book (DOM) to spot liquidity clusters, interpret order flow, and build MQL5 EAs that trade based on real depth data.

mt5-market-book-read-order-flow-trade-smarter

Introduction: Why the MT5 Market Book Matters

Most traders stare at price charts and guess. You don't have to. The MT5 Market Book—often called Depth of Market (DOM) or the order book—shows you the actual pending limit orders sitting on the exchange. It reveals where buyers and sellers cluster their resting orders at specific price levels, giving you a direct window into supply and demand zones that no lagging indicator can match.

By the end of this guide, you'll know exactly how to enable the DOM in MT5, read its data columns, spot liquidity clusters, and even write simple MQL5 code to pull that data into your own Expert Advisors. This isn't theory; it's a practical tool for both manual scalpers and algo developers.

A quick reality check: not every broker supports the Market Book. The DOM only works if your broker provides market depth data via their trading server. Most ECN/STP brokers do; many market-makers don't. If your broker doesn't offer it, the button stays grayed out. You can test with a demo account from a broker like IC Markets or Pepperstone that explicitly supports depth of data.

One thing I wish someone had told me when I started: the DOM is not a crystal ball. It's a snapshot of current liquidity that can change in milliseconds. But used correctly, it tells you where the big players are parking their orders—and that's information most retail traders ignore.

Prerequisites

Before you start, make sure you have these three things:

  • MetaTrader 5 installed (version 2000 or newer). MT4 does not have a native Market Book feature—this is MT5-only. If you're on MT4, you're out of luck for native DOM; third-party tools exist but they're clunky.
  • A trading account (demo or live) with a broker that supplies market depth data. Check your broker's website or support; look for "ECN" or "depth of market" in their specs. I've tested IC Markets, Pepperstone, and FXCM—all work well. Avoid brokers that only mention "instant execution" or "market maker" in their account types.
  • At least one open chart on a forex pair, CFD, or futures instrument that the broker supports for DOM. Not all symbols have depth data; try major pairs like EURUSD or GBPUSD first. Commodities like XAUUSD often have depth too, but indices can be hit-or-miss.

If you plan to code with the DOM in MQL5, you'll also need the MetaEditor (comes with MT5) and basic familiarity with the MQL5 language. I'll include a code snippet later that you can copy and compile. If you've never written MQL5 before, don't worry—the example is self-contained and you can paste it straight in.

Step-by-Step Instructions: Using the MT5 Market Book

Step 1: Enable the Market Book Window

Open MT5 and load any chart for a symbol your broker supports. Then go to the main menu: View → Market Book. Alternatively, right-click on the chart and select Market Book from the context menu. A new panel will appear, usually docked on the left or bottom of your terminal window. You can drag it to any edge or float it as a separate window.

If the option is grayed out, your broker doesn't provide depth data for that symbol. Switch to a different instrument or try a demo account from a known ECN broker. I've seen traders waste 20 minutes clicking around before realizing their broker simply doesn't support DOM—don't be that person.

Once the window opens, you'll see columns for price and volume on both the bid (buy) and ask (sell) sides. The numbers flash as new orders arrive or get filled. It takes a few minutes to get used to the speed—start on a slow-moving pair like EURGBP or USDCHF before jumping into GBPJPY during London open.

Step 2: Understanding the Market Book Layout

The Market Book window shows two main sections:

  • Bid side (left column): Shows buy limit orders—prices where traders want to buy. The highest bid price is at the top, closest to the current market price.
  • Ask side (right column): Shows sell limit orders—prices where traders want to sell. The lowest ask price is at the top.

Each row displays:

ColumnWhat It Shows
PriceThe specific price level where orders are placed. Typically displayed with 5 decimal places for forex.
VolumeTotal lot size (or contracts) of pending limit orders at that price. A value of 100 means 100 standard lots (10 million units for EURUSD).
Cumulative VolumeRunning total of volume from the best price outward (optional column you can enable by right-clicking column headers).

The numbers update in real time. A sudden spike in volume at a single price level often signals a large institutional order sitting there—a potential support or resistance zone. I've seen 800-lot walls appear at round numbers like 1.1000 on EURUSD; price usually respects them for at least a few minutes.

You can also enable the Time column to see when the last order at that level was placed. Right-click any column header and check the boxes you want. I keep Price, Volume, and Cumulative visible—anything else is noise for my style.

Step 3: Interpret the Order Flow

Here's how to read what the market is telling you:

  • Thick bid or ask walls: If you see 500+ lots at 1.1050 on the bid side, that's a strong buy limit cluster. Price will likely bounce there. If it breaks through, that wall likely got eaten by aggressive sellers. Watch for the volume to disappear suddenly—that means a market order swept through it.
  • Thin order book: When the DOM shows only 1-2 lots at each level, liquidity is low. Price can spike easily. Avoid trading during such periods unless you're a scalper hunting for quick fills. I usually see thin books during Asian session on non-major pairs.
  • Imbalance: Compare total bid volume vs total ask volume. Heavy bid imbalance suggests upward pressure; heavy ask imbalance suggests downward pressure. A quick way: glance at the cumulative volumes at the third level on each side. If bids are 3x asks, the market wants to go up.

I prefer to watch the top 5-10 levels on both sides. The very top level (best bid/ask) is the tightest spread—that's where market orders get filled immediately. The second and third levels often hold the real liquidity. If the best ask has 10 lots but the second ask has 400 lots, that 400-lot wall is where the real resistance sits.

One pattern I've seen repeatedly: a large bid wall appears at a round number, price approaches it, and then the wall disappears just before price hits it. That's often a spoof order—placed to create false support, then pulled. If you see a wall vanish without being filled, expect price to break through that level quickly.

Step 4: Use the DOM for Manual Trading

When you see the DOM, you can place trades directly from it. Right-click inside the Market Book window and choose New Order. You'll get the standard order dialog, but now you know exactly where the resting orders are. For example, if you want to buy at the market, check the best ask volume. If it's thin (say 2 lots), your market order might slip through multiple levels. If it's thick (500 lots), you'll likely get filled at that price.

For limit orders, you can place them at levels where you see a bid wall forming. Right-click on a price row and select Buy Limit or Sell Limit. The DOM updates in real time, so you can see your own order appear in the book—though many brokers hide retail orders from the aggregated view. I've placed a buy limit at a level with 300 lots of bid volume and watched price bounce off it within 10 seconds—satisfying when it works.

Here's a practical workflow I use for manual scalping:

  1. Open the Market Book and the chart side by side.
  2. Identify a strong bid wall (200+ lots) at a price level 5-10 pips below current price.
  3. Wait for price to approach that level. If the wall holds, place a buy limit at that price with a stop loss 5 pips below the wall.
  4. If price breaks through the wall with high volume, cancel the order and look for the next level.

This isn't a guaranteed strategy—nothing is—but it gives you a statistical edge when you're trading with the flow of resting liquidity.

Step 5: Access the DOM Programmatically (MQL5)

For automated traders, the DOM is accessible via the MarketBookGet and MarketBookInfo functions. Here's a minimal example that reads the top bid and ask levels and prints them to the Experts tab:

//+------------------------------------------------------------------+
//|                                                  DOM_Reader.mq5 |
//|                                      Your custom Expert Advisor |
//+------------------------------------------------------------------+
#property copyright "Your Name"
#property version   "1.00"
#property strict

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
   // Subscribe to market book updates for the current symbol
   if(!MarketBookAdd(Symbol()))
     {
      Print("Failed to subscribe to Market Book for ", Symbol());
      return(INIT_FAILED);
     }
   Print("Subscribed to Market Book for ", Symbol());
   return(INIT_SUCCEEDED);
  }

//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
   // Get market book info for current symbol
   MqlBookInfo book[];
   if(MarketBookGet(Symbol(), book))
     {
      // Find best bid and ask
      double bestBid = 0, bestAsk = 0;
      long bidVol = 0, askVol = 0;
      for(int i = 0; i < ArraySize(book); i++)
        {
         if(book[i].type == BOOK_TYPE_BUY)
           {
            if(bestBid == 0 || book[i].price > bestBid)
              {
               bestBid = book[i].price;
               bidVol  = book[i].volume;
              }
           }
         else if(book[i].type == BOOK_TYPE_SELL)
           {
            if(bestAsk == 0 || book[i].price < bestAsk)
              {
               bestAsk = book[i].price;
               askVol  = book[i].volume;
              }
           }
        }
      Comment("Best Bid: ", DoubleToString(bestBid, Digits()),
              " Vol: ", bidVol,
              "\nBest Ask: ", DoubleToString(bestAsk, Digits()),
              " Vol: ", askVol);
     }
  }

//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   MarketBookRelease(Symbol());
   Print("Released Market Book subscription for ", Symbol());
  }
//+------------------------------------------------------------------+

Compile this code in MetaEditor (F7), then attach it to a chart. It will continuously print the best bid/ask volumes. You can expand this logic to trigger trades when a certain volume threshold is hit at a level. For instance, you could add a condition like if(bidVol > 500) { // place buy limit order }.

One gotcha: MarketBookGet() returns an array of MqlBookInfo structures. Each structure contains price, volume, type (BUY or SELL), and volume_real (for fractional lots). Always check the return value—if it returns false, the DOM isn't available for that symbol.

Advanced DOM Analysis Techniques

Spotting Iceberg Orders

Iceberg orders are large positions broken into smaller visible chunks. You'll see the same volume appearing at a level, getting filled, then reappearing. For example, you might see 50 lots at 1.1050, then 50 lots again at the same price after the first 50 got filled. That's an iceberg. The total size could be 500 lots, but the broker only shows 50 at a time.

How to confirm: watch the cumulative volume column. If a level's cumulative volume increases after a fill without a new order appearing at a different price, it's almost certainly an iceberg. Don't fight these orders—they're usually institutional and have deep pockets.

Using DOM with Time and Sales

Open the Trade → Tick Chart window alongside the Market Book. This shows every trade that occurred—market orders hitting limit orders. If you see a 200-lot market order eat through three bid levels in a single tick, that's aggressive selling. Price will likely drop further because the buyer's limit orders at those levels got absorbed.

I combine these two windows during news events. For example, during a Non-Farm Payrolls release, the DOM explodes with activity. Watching which side gets absorbed first tells you the initial direction. In the first 30 seconds after the release, if ask volume vanishes and bid volume stays, price will rip upward—and vice versa.

Filtering Noise in Fast Markets

By default, the DOM updates every tick. On fast-moving pairs like USDJPY during Tokyo open, this can be overwhelming. You can't change the refresh rate in MT5's UI, but you can filter noise by focusing only on levels with volume above a certain threshold in your MQL5 code. Add a check like if(book[i].volume > 50) { // process this level } to ignore small retail orders.

Tips and Best Practices from Experience

Over the years, I've learned a few hard lessons about the DOM:

  • Don't over-interpret thin books. A few lots at a level might be a single retail trader. Look for clusters of 50+ lots across multiple price levels. A wall of 20 lots is meaningless; 200 lots is a signal.
  • Watch for iceberg orders. Some brokers show only a fraction of a large order. If you see a level that keeps refreshing with the same volume after being hit, it's likely an iceberg. Don't assume the wall is gone—it's probably still there.
  • Use the DOM with time and sales. Open the Trade → Tick Chart window alongside the Market Book. If you see a large market order eat through several bid levels, that's aggressive selling—price likely drops further.
  • Set a refresh rate. By default, the DOM updates every tick. On fast-moving pairs, this can be overwhelming. You can't change the refresh rate in MT5's UI, but you can filter noise by focusing only on levels with volume above a certain threshold in your MQL5 code.</li

Frequently Asked Questions

Why don't I see the Market Book option in MT5?

The Market Book is only available in MetaTrader 5, not MT4. Also, your broker must support market depth data. Check with your broker or try a demo from an ECN provider like IC Markets.

Can I use the DOM with automated trading?

Yes. MQL5 provides the MarketBookGet() function to read the order book. The code snippet in this guide shows you how to access bid/ask volumes programmatically.

How many depth levels does MT5 show?

It depends on your broker. Most ECN brokers provide 5-10 levels on each side. Some professional accounts offer 20+ levels. You can see the exact count in the Market Book window.

Does the DOM update in real time during backtesting?

No. The Market Book is a live market feature. During backtesting in the Strategy Tester, the DOM is not available—you'll need to use tick data or historical order flow data from third-party sources.

Community

Clap for the article and open comments only when you want to read them.

0 claps0 comments

Related articles