Free Forex indicator · MT4 / MT5

Market Profile for MT4 and MT5: free download, TPO and settings

See how candle ranges build a price profile, how the value area is selected and why completed-session levels differ from what was known during the day.

ForexBestRobots edition 1.26

Reviewed by ForexBestRobots Editorial Team

Original sourceEarnForex 1.25
PlatformsDesktop MT4 · MT5
LicenseApache 2.0 · Free
On this page

What Market Profile measures

Market Profile arranges prices by the number of candle ranges that include each level. In this implementation one TPO means one selected-timeframe candle touching a grid price through its Low–High range. It is not traded volume, tick volume or an exact record of seconds spent at that price. The indicator draws analysis objects; it does not place orders.

ForexBestRobots edition 1.26 is a marked derivative of EarnForex 1.25 under Apache 2.0. We made completed and developing value-area calculations consistent across MT4/MT5, stabilized the price grid, aligned the VAL label with its drawn boundary and protected instance namespaces. Original notices, unchanged originals and a patch are included.

POC is the most populated price row. The source also calls it Median, but it is a mode, not a statistical median or proof of a fair price. VAH and VAL bound a chosen share of TPOs; 70% is a calculation setting, not a forecast or win rate. A single print means one contributing candle, not evidence about buyers or sellers.

TPO, POC and the value-area calculation

For each grid price p, N(p)=Σ1{Low≤p≤High}: every selected candle contributes at most one TPO to that row. Repeated quotes within the candle add nothing. Neither tick_volume, real volume nor our CSV QuoteCount weights the profile. A candle range can include prices that the supplied ticks skipped, so this remains an OHLC approximation.

POC uses the highest N(p). Ties choose the row nearest the middle of the session price grid, then the higher row. From POC, the value area grows one adjacent row at a time, choosing the side with the larger count; equal counts choose the upper side. The edition uses ceil(total TPO×70/100), so the included count reaches at least the selected percentage. Whole rows can overshoot it.

A row is drawn one price step high. VAL is the lower edge of the lowest included row; VAH is one step above the highest included row. Our VAL text now matches the actual lower line. These are descriptive reference levels, not guaranteed support, resistance or executable prices.

PointMultiplier=0 adapts row height to the visible price scale, so changing chart zoom can change the profile. Use a fixed multiplier for repeatable comparisons. On a five-decimal EUR/USD symbol, 10 points=0.00010 and 50 points=0.00050. The edition preserves non-power-of-ten steps and rounds up to a valid symbol tick-size multiple. Different row sizes or TPO timeframes produce different levels.

Three real EUR/USD examples

The figures use real HistData EUR/USD Bid quotes from June 2025, aggregated to M30. The supplied timestamps are fixed EST without daylight-saving adjustment; we add five hours for UTC. We reconstructed 236 candles from 507,552 selected quote records. Provider Volume is zero; neither it nor the number of quote records is used as TPO weight.

The two daily profiles use 48 candles each and a fixed 10-point row. For 4 June, POC/VAH/VAL are 1.13850/1.14170/1.13660; for 5 June they are 1.14430/1.14500/1.14130. Final levels become known only at 00:00 UTC on the following day. Drawing them beside earlier candles is a retrospective summary, not an earlier signal.

The second figure changes only the row size on the same 5 June candles. The third rebuilds 6 June from each closed M30 prefix, with snapshots known at 06:00, 12:00 and 21:00 UTC. The last snapshot is not a complete calendar day. Candle and price-row CSVs preserve the inputs and the time each result became available; no trades or returns are simulated.

Closed daily profiles, 10-point rows. 4 June: POC 1.13850, VAH 1.14170, VAL 1.13660; 5 June: 1.14430, 1.14500, 1.14130. Each final profile is known only at the following 00:00 UTC.
Closed daily profiles, 10-point rows. 4 June: POC 1.13850, VAH 1.14170, VAL 1.13660; 5 June: 1.14430, 1.14500, 1.14130. Each final profile is known only at the following 00:00 UTC.2025-06-04 00:00 — 2025-06-05 23:30 UTC · 96 candles
Same 5 June candles: 10 points gives POC 1.14430; 50 points gives POC 1.14200, VAH 1.14500 and VAL 1.14100. Row size changes both the counts and the selected area; neither is an optimized trading result.
Same 5 June candles: 10 points gives POC 1.14430; 50 points gives POC 1.14200, VAH 1.14500 and VAL 1.14100. Row size changes both the counts and the selected area; neither is an optimized trading result.2025-06-05 00:00 — 2025-06-05 23:30 UTC · 48 candles
Developing 6 June profile, 10 points. C at 06:00 UTC: POC 1.14400; D at 12:00: 1.14360; E at 21:00: 1.13970. Each snapshot uses only candles closed by that time; E is not the full-day profile.
Developing 6 June profile, 10 points. C at 06:00 UTC: POC 1.14400; D at 12:00: 1.14360; E at 21:00: 1.13970. Each snapshot uses only candles closed by that time; E is not the full-day profile.2025-06-06 00:00 — 2025-06-06 20:30 UTC · 42 candles

Real Bid OHLC from HistData; own TPO reconstruction, not a MetaTrader screenshot or a profit backtest. CSV files contain candles and price-row counts; all times are UTC.

Download chart calculation data (CSV) · 1Download chart calculation data (CSV) · 2Download chart calculation data (CSV) · 3

TPO · Download chart calculation data (CSV) · 1TPO · Download chart calculation data (CSV) · 2TPO · Download chart calculation data (CSV) · 3

Sessions, timeframes and the broker clock

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.

All settings and defaults

The table contains all 92 functional inputs shared by MT4 and MT5. MT4 also has text separators. Values shown are source defaults: __DATE__ is the compile date, not a daily clock update. Begin with two sessions and a fixed grid on a demo chart. Large session ranges, many rows and developing calculations can be expensive.

InputDefaultPractical meaning
SessionDailyDaily by default. Daily, Weekly, Monthly, Quarterly, Semiannual, Annual, Intraday or Rectangle.
StartFromDate__DATE__Compile date. Used when current-session mode and seamless scrolling are both off.
StartFromCurrentSessiontrueStarts with the newest session; takes priority over StartFromDate.
SessionsToCount2Number of sessions, 1–1000. Default 2; more is slower.
SeamlessScrollingModefalseUses the right edge of the visible chart; ignores the two start-date inputs. Not for Rectangle.
EnableDevelopingPOCfalseDraws changing POC history; off by default.
EnableDevelopingVAHVALfalseDraws changing VAH/VAL history; off by default.
ValueAreaPercentage70Integer 1–100. Includes at least this share of total TPOs, with whole-row overshoot.
TPOTimeframePERIOD_CURRENTCurrent or higher; lower selections fall back to chart. Requires a whole chart-timeframe multiple.
InstancePrefix"FBR-MP"Unique 1–12 ASCII letters, digits or hyphens. Default FBR-MP; conflicts are rejected.
ColorSchemeBlue_to_RedOne of six color gradients, or Single_Color.
SingleColorclrBlueColor of the named object or event family.
ColorBullBearfalseColors blocks by candle direction instead of age; not buy/sell volume.
MedianColorclrWhiteColor of the named object or event family.
ValueAreaSidesColorclrWhiteColor of the named object or event family.
ValueAreaHighLowColorclrWhiteColor of the named object or event family.
MedianStyleSTYLE_SOLIDLine style: solid, dash, dot or the other terminal options.
MedianRayStyleSTYLE_DASHLine style: solid, dash, dot or the other terminal options.
ValueAreaSidesStyleSTYLE_SOLIDLine style: solid, dash, dot or the other terminal options.
ValueAreaHighLowStyleSTYLE_SOLIDLine style: solid, dash, dot or the other terminal options.
ValueAreaRayHighLowStyleSTYLE_DOTLine style: solid, dash, dot or the other terminal options.
MedianWidth1Line/arrow width 1–5.
MedianRayWidth1Line/arrow width 1–5.
ValueAreaSidesWidth1Line/arrow width 1–5.
ValueAreaHighLowWidth1Line/arrow width 1–5.
ValueAreaRayHighLowWidth1Line/arrow width 1–5.
ShowValueAreaRaysNoneWhich sessions project rays: None, Previous, Current, PreviousCurrent, AllPrevious or All.
ShowMedianRaysNoneWhich sessions project rays: None, Previous, Current, PreviousCurrent, AllPrevious or All.
RaysUntilIntersectionStop_No_RaysStop no rays, all rays, all except previous session, or only the previous session at intersection.
HideRaysFromInvisibleSessionsfalseHides rays from sessions outside the left edge of the chart.
TimeShiftMinutes0Broker session shift, −1440 to +1440 minutes; positive earlier, negative later.
ShowKeyValuestruePrints POC, VAH and VAL; true by default.
KeyValuesColorclrWhiteColor of the named object or event family.
KeyValuesSize8Text size 1–72, default 8 in the terminal.
ShowSinglePrintNoNo, Leftside or Rightside: marks rows with one contributing TPO.
SinglePrintRaysfalseProjects single-print zone boundaries as rays; false by default.
SinglePrintColorclrGoldColor of the named object or event family.
SinglePrintRayStyleSTYLE_SOLIDLine style: solid, dash, dot or the other terminal options.
SinglePrintRayWidth1Line/arrow width 1–5.
SPRaysUntilIntersectionStop_No_RaysStop no rays, all rays, all except previous session, or only the previous session at intersection.
ProminentMedianColorclrYellowColor of the named object or event family.
ProminentMedianStyleSTYLE_SOLIDLine style: solid, dash, dot or the other terminal options.
ProminentMedianWidth4Line/arrow width 1–5.
ShowTPOCountsfalseCounts TPOs above/below POC, excluding the POC row; not volume.
TPOCountAboveColorclrHoneydewColor of the named object or event family.
TPOCountBelowColorclrMistyRoseColor of the named object or event family.
RightToLeftfalseDraws the latest profile, or all Rectangle profiles, from right to left.
PointMultiplier00 adaptive; 1–1000000 manual quote-point multiplier, rounded up to valid tick size.
ThrottleRedraw0Update delay 0–86400 seconds; 0 adds no intentional delay.
DisableHistogramfalseHides histogram blocks while retaining POC/value-area calculations and marks.
EnableOldProfilesCleanupfalseRemoves older profiles beyond SessionsToCount.
AlertNativefalseNative popup channel; false by default.
AlertEmailfalseEmail channel; terminal setup required. Messages omit account identity.
AlertPushfalsePush channel; terminal setup required.
AlertArrowsfalseDraws event arrows, including qualifying historical events; false by default.
AlertCheckBarCheckPreviousBarCheckPreviousBar uses closed candles; CheckCurrentBar uses unfinished prices.
AlertForValueAreafalseEnables VAH/VAL ray events; corresponding rays must be drawn.
AlertForMedianfalseEnables POC ray events; corresponding rays must be drawn.
AlertForSinglePrintfalseEnables single-print ray events; SinglePrintRays must be true.
AlertOnPriceBreakfalsePrevious: wick reaches level then close returns. Current: previous-quote crossing.
AlertOnCandleClosefalseConsecutive-close crossing of a ray; current mode is not a completed-candle confirmation.
AlertOnGapCrossfalseGap crossing relative to the prior candle range.
AlertArrowCodePB108Wingdings arrow code 0–255.
AlertArrowCodeCC110Wingdings arrow code 0–255.
AlertArrowCodeGC117Wingdings arrow code 0–255.
AlertArrowColorPBclrRedColor of the named object or event family.
AlertArrowColorCCclrBlueColor of the named object or event family.
AlertArrowColorGCclrYellowColor of the named object or event family.
AlertArrowWidthPB1Line/arrow width 1–5.
AlertArrowWidthCC1Line/arrow width 1–5.
AlertArrowWidthGC1Line/arrow width 1–5.
EnableIntradaySession1trueEnables this window when Session=Intraday.
IntradaySession1StartTime"00:00"Window start in HH:MM, broker clock before the time-shift adjustment.
IntradaySession1EndTime"06:00"Window end in HH:MM; 00:00 means the next midnight.
IntradaySession1ColorSchemeBlue_to_RedOne of six color gradients, or Single_Color.
EnableIntradaySession2trueEnables this window when Session=Intraday.
IntradaySession2StartTime"06:00"Window start in HH:MM, broker clock before the time-shift adjustment.
IntradaySession2EndTime"12:00"Window end in HH:MM; 00:00 means the next midnight.
IntradaySession2ColorSchemeRed_to_GreenOne of six color gradients, or Single_Color.
EnableIntradaySession3trueEnables this window when Session=Intraday.
IntradaySession3StartTime"12:00"Window start in HH:MM, broker clock before the time-shift adjustment.
IntradaySession3EndTime"18:00"Window end in HH:MM; 00:00 means the next midnight.
IntradaySession3ColorSchemeGreen_to_BlueOne of six color gradients, or Single_Color.
EnableIntradaySession4trueEnables this window when Session=Intraday.
IntradaySession4StartTime"18:00"Window start in HH:MM, broker clock before the time-shift adjustment.
IntradaySession4EndTime"00:00"Window end in HH:MM; 00:00 means the next midnight.
IntradaySession4ColorSchemeYellow_to_CyanOne of six color gradients, or Single_Color.
SaturdaySundaySaturday_Sunday_Normal_DaysNormal days, ignore weekend candles, or append Saturday to Friday and Sunday to Monday.
DisableAlertsOnWrongTimeframesfalseSuppresses timeframe-error popups; does not make an invalid combination valid.
ProminentMedianPercentage1010–101. POC prominence threshold; 101 disables prominence highlighting.
ShowToggleButtonfalseShows the hide/show control; hidden profiles pause normal updates and alert checks.
ToggleButtonCornerCORNER_LEFT_UPPERChart corner for the optional hide/show button.

Rays, alerts and practical controls

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.

Install and compile the source

  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.

Download Market Profile free

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.

MQ4/MQ5 source only · no ready EX4/EX5 · compile in matching desktop MetaEditor.

Data limits and performance

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.

Frequently asked questions

Is this Volume Profile?

No. Counts come from candle Low–High ranges touching price rows, once per candle and row. Neither real volume nor tick volume weights them.

Why does the source call POC Median?

That is the source label. It selects a maximum-count row, a mode, not a statistical median or an objective fair price.

Does 70% mean a 70% chance of winning?

No. It is the share of profile TPO counts enclosed by the value area. Whole rows may take the actual share above the target.

Why do levels differ between two charts?

Check broker OHLC and clock, session dates, TPO timeframe, row size, loaded history and weekend policy. Adaptive PointMultiplier=0 also depends on the visible scale.

Can the lines change or look ahead?

The active session and unfinished TPO candle change. Final-session lines and parent-timeframe values drawn across earlier candles are retrospective. Our developing CSV uses only each closed-bar prefix.

Why are there no alerts?

Enable a channel or arrows, a level family and an event type. Draw the corresponding rays, keep the profile visible and configure terminal email/push if used. Attach/reset is silent for live events.

How are session changes and multiple instances handled?

Use Ctrl+1–8 or Session, and r for an MPR rectangle without underscores. The terminal stores session/visibility state under MQL4/Files/MP_Settings or MQL5/Files/MP_Settings. Each instance needs a unique valid prefix; never delete its hidden lock while it runs.

Sources and edition changes

Original copyright © 2010–2026 EarnForex.com is retained. This is our marked edition 1.26 of upstream 1.25, not an endorsement by EarnForex. The pinned repository has Apache 2.0 and no NOTICE file. We tested selected actual calculation and control functions through C++ with modeled APIs and independent comparisons; that is not native MetaTrader execution.