Market Profile TPO Multi Period Profiles MT5
- Indicadores
- Versão: 1.0
- Ativações: 10
Market Profile TPO
Market Profile TPO is a multi-period Time-Price-Opportunity (TPO) indicator for MetaTrader 5. It builds price profiles from time data and displays the Point of Control (POC), the Value Area (VAH and VAL), the Initial Balance (IB), Single Prints, a volume overlay and profile merging on the chart. It is written entirely in MQL4 and does not use DLLs or external files.
What the indicator draws
- TPO profile: each price level is tagged with the time slice in which it traded. Displayed as letters or filled blocks.
- POC (Point of Control): the price level where the market spent the most time during the profile period.
- Value Area: the price range containing the configured percentage of TPO prints. VAH is the upper boundary, VAL is the lower boundary.
- Initial Balance: the range of the first hour of the session.
- Single Prints: price levels that were printed only once and not revisited.
- Volume Value Area and Volume POC: volume-based versions of the Value Area and the POC, drawn alongside the TPO versions, so both views can be compared on the same profile.
- Candle overlay: candlesticks or OHLC bars drawn over the profile. It can be switched off with one input.
How it works
The indicator divides each profile period into time slices. For example, a Daily profile uses 30-minute slices. Every price level touched during a slice receives that slice's tag, which forms the lettered profile shape. The level with the most tags becomes the POC. The Value Area is the band around the POC that contains the configured percentage of tags. Single Prints are levels that carry only one tag.
Render modes
The profile can be displayed in six modes, selected with one input:
- Profile: classic Market Profile shape.
- Unfolded: each time slice drawn separately.
- Profile (Histogram): histogram-style view.
- MP + VP Outline: TPO profile with volume outline.
- TPO Histograms: TPO prints stacked per price level.
- TPO H + VP Outline: TPO histogram with volume outline.
Profile periods
Eleven profile periods are supported: 1 minute, 5 minutes, 15 minutes, 30 minutes, 1 hour, 4 hours, Daily, Weekly, Monthly, Quarterly and Yearly. The period can be matched to the trading horizon of the chart.
Profile merging
Adjacent profiles of the same period can be merged into a single composite profile and unmerged again. The change is applied immediately, without reattaching the indicator.
Disk cache
Calculated profile data is saved to disk automatically. When the indicator is reloaded or the terminal is restarted, profiles are loaded from the cache instead of being recalculated. The cache is invalidated when the structural setup changes: profile period, session hours, tick size or days back.
Input parameters
The input parameters are grouped by function:
- Profile: profile period, number of profiles, tick size, ticks per bar, Value Area percentage, session start and end (hours and minutes).
- Display: show Initial Balance lines, show Single Prints, Singles outside Value Area only, merge and unmerge.
- Render: render mode, TPO style (letters or blocks), normal profile width percentage.
- Lines and fills: POC line color and width, VA line color and width, VA fill color, VP POC color, VP VA color, IB line color.
- TPO colors: letter color inside the Value Area, letter color outside the Value Area, block colors, POC block color.
- Candle overlay: candlestick, bar (OHLC) or off; bull color, bear color, open marker color, close marker color.
- Volume outline: outline color and line width.
Setup
- Attach the indicator to a chart.
- Select the profile period (default is Daily).
- Set the tick size to match the symbol. This is a one-time setup per symbol; for example 0.0001 for many forex symbols and 0.1 for many index symbols.
- Optionally narrow the session hours for session-only profiles.
- POC, Value Area, Initial Balance lines, Single Prints and the candle overlay are enabled by default.
Compatibility
MetaTrader 5 only. All timeframes. Works on forex, indices, crypto, equities and commodities symbols.
Limitations
- Tick size must match the symbol's tick, otherwise profile levels do not align with real prices. One-time setup per symbol.
- Merging works between adjacent profiles of the same period, not across different period modes on the same chart.
- Single Prints are reconstructed from the chart timeframe. If the chart timeframe is coarser than the profile's sub-period, detection accuracy depends on the available chart data.
- The candle overlay is drawn over the profile and can be switched off with one input.
Please contact me after purchase via the MQL5 messaging system if you have any questions about setting up the indicator for your symbol. I respond to all messages.
