Market Profile for MT4 and MT5: free download, TPO and settings
MQ4/MQ5 source only · no ready EX4/EX5 · compile in matching desktop MetaEditor.

Both ZIPs download directly from our site. Each contains the modified platform source, unchanged upstream source, Apache 2.0, edition notes, a patch, checksums and instructions in 12 languages. These are source packages, with no ready EX4/EX5, DLL or trading account requirement.

1. Extract the ZIP for your platform. In desktop MetaTrader choose File → Open Data Folder.
2. Copy Indicators/Market_Profile_ForexBestRobots.mq4 or .mq5 into the matching MQL4/Indicators or MQL5/Indicators folder. Keep upstream files separately.
3. Open the modified source in the matching MetaEditor, press F7 and inspect errors and warnings. No extra includes or DLL are required.
4. Refresh Navigator → Indicators, attach to a demo M30 chart with loaded history and use a unique InstancePrefix. Daily and two sessions are the defaults.
5. For Rectangle mode, press r or create a rectangle named MPR0–MPR999, at most 6 characters and no underscore. Ctrl+1–8 selects Daily through Rectangle. Test time boundaries before using the levels.

Source only: no ready EX4/EX5. Native compilation, chart rendering, rectangle controls and notifications have not been verified here. Desktop MetaEditor and a demo-terminal check are required; these files cannot be installed directly in the mobile app.

The default is Daily, two sessions, with TPOTimeframe=PERIOD_CURRENT. Daily profiles require TPO data from M5 to M30; Weekly uses M30–H4, Monthly H1–D1, Quarterly H4–D1, and Semiannual/Annual H4–W1. Intraday requires M30 or lower. Rectangle mode uses a manually selected range and still needs sufficient loaded history.

TPOTimeframe may equal or exceed the chart timeframe; a lower request falls back to the chart timeframe. Our edition requires a whole timeframe multiple. Whole higher-timeframe candles are used, including candles that straddle a chosen boundary. Historical values filled across a parent candle are retrospective; an unfinished TPO candle can change. Wait for its close when evaluating an event.

Session boundaries use the broker chart clock. TimeShiftMinutes shifts that clock boundary: positive moves the session start earlier, negative later. It does not automatically follow daylight saving. The four preset intraday windows are 00:00–06:00, 06:00–12:00, 12:00–18:00 and 18:00–00:00. They are not automatically synchronized to London or New York. Weekend settings keep, ignore or append Saturday/Sunday; data above D1 cannot separate those days.

Alerts need three choices: a delivery channel or AlertArrows, an enabled level family and an enabled event type. All are off by default. Median/value-area alerts examine rays, so enable ShowMedianRays or ShowValueAreaRays for the relevant sessions; a visible profile boundary alone is insufficient. Single-print alerts require SinglePrintRays.

CheckPreviousBar evaluates closed chart candles. Candle-close events compare two consecutive closes across the ray; a prior strict side and a new equality can count. Price-break events detect a wick reaching the ray and closing back on the previous side. Gap events compare separated candle ranges. Arrows are placed on the event candle and become observable after its close; historical arrows are retrospective.

The first live-alert pass after attach/reset is silent. CheckCurrentBar uses unfinished prices and can produce repeated events; all its price-break rays now share the same previous quote. Email/push require terminal configuration and a running connection. After the hide button has hidden an already drawn profile, normal updates and alert checks pause until it is shown again.

Broker OHLC, session clock, loaded history, TPO timeframe and row size all affect the result. Current-session levels develop; a completed profile must not be used as if it were known at the session open. Rectangle mode includes whole selected TPO candles and clips the price range. MPR rectangles can be seen by multiple instances, so use deliberate ranges and unique prefixes.

A row-grid guard rejects more than 2,000,000 levels; it is not a performance guarantee. Fewer sessions, a coarser grid, DisableHistogram, ThrottleRedraw or old-profile cleanup can reduce work, with a loss of detail where applicable. Native compilation, terminal rendering, hotkeys, dragging, file persistence and actual message delivery have not been verified here; test in the matching desktop terminal.
