Documentation

1. Introduction

Introduction

Reference documentation for configuration options and methods of the Volume by Price Indicator a suite of technical analysis data visualization tools for MetaTrader 4 and 5 platforms.

Example Compositions

Definitions

Definitions and concepts used throughout this user manual. indicator main program, type Indicator extension additional program to extend function(s), type Expert, Indicator and Script instance running program, i.e., Indicator attached to or loaded on chart object graphical chart object, for types and slots see Object and Object Slots environment instance or collection of instances, system data source main program input data, tick data and/or bar data tick data non-accumulated tick-by-tick or less than 1-minute accumulated time series data, high quality bar data chart timeframe period data greater than or equal to 1-minute accumulated time series data, high performance range time range of data source dataset main program output data segment time range segment of dataset price level price range segment of segment volume quantitative unit tick volume or real volume tick volume quantitative unit for data ticks real volume quantitative unit for order type buy and sell orders TPO quantitative unit for indexed time periods price action higher and lower prices In the context of features Volume also is volume or TPO, and price level the median of range. For the availability of Real Volume, i.e., trade volume or trade operation data, see FAQs.

Features

  • Volume Profile & Footprint
    • Buy/Sell
    • Delta
    • Delta Imbalance
    • Point of Control
    • Count
    • Balance
    • Value Area
    • High and Low Volume Nodes
  • Market Profile TPO (Time Price Opportunity)
    • Point of Control
    • Count
    • Balance
    • Value Area
    • High and Low Volume Nodes
  • Volume by Time
    • Buy/Sell
    • Delta
    • High and Low Volume Nodes
  • Volume Weighted Average Price

Getting Started

The indicator is automatically installed after purchase or rental. For details on installation of the indicator on multiple terminals, and the installation of optional extensions and resources see help center. For a quick start browse example compositions and download chart templates.

To attach, i.e., load, an indicator instance to a chart:
menubar insert indicators custom volume by price

Configurations are made via the indicator properties window 'Inputs' tab by setting parameters, the properties window opens after attaching an indicator instance to a chart.

To open the properties window of an instance already attached:
menubar charts indicators list edit volume by price

Attaching an indicator instance to a chart.

Indicator properties window 'Inputs' tab.

The basic approach is to select graphical object types, e.g., set parameter Object Main = Market Profile TPO - Marker Letter, Object Column = Volume Total and Object Column = Volume Profile - Histogram, and positions, e.g., Anchor Main = Segment - Start and Anchor Column = Segment - Start Left.

For the dataset, set range, segmentation, price level and TPO parameters, e.g., Dataset Range Days = 5 , Dataset Segment Session, Dataset Price Level = 100 Symbol Points and Dataset Market Profile TPO Period = =15m. By default these are set in chart pixels, and as divisor and selection relative to range in chart bars for compatibility on all timeframes, e.g., Dataset Price Level = 10 Pixels, Dataset Market Profile TPO = 48 and Dataset Range Window = 80 with Dataset Segment Divisor = 1. Similarly graphical sizes of fixed width object types, i.e., histogram and line graph, are set relative, e.g., Style Main Size = Medium to chart width, and Style Column Histogram Size = Percentage as percentage relative to the Main object size.

For further indications, select by object slot and type for on-object visualizations, e.g., Highlight Main Market Profile TPO = Sequence and Highlight Column Volume Profile = Value Area. Additionally for the Main object by indication with additional elements, e.g., Highlight Main POC = Background Fill, Highlight Main Marker POC = Box Border and Highlight Main Marker VA = Box Border, and for the Main object to select additional indications, e.g., Highlight Main IB = Bar, Highlight Main OHLC = Candle and Highlight Main VWAP = Line.  show more

Display the Main object Line elements as horizontal line, or line graph by chart timeframe period data points, e.g., Style Main Line Trace = true. For the extension object select type and indication, e.g., Extension Volume by Time Object = Histogram or Extension Volume by Time Object = Bubble Graph, and Extension Volume by Time Highlight = Delta. Panel object for numeric indications and details on dataset compilation, e.g., Panel = Summary Extended - Table and Panel = Dataset Feed.

Set styling parameters by object slot and type, and/or indication. Size histogram and line graph object types of segments for absolute or relative indications, e.g., Style Column Histogram Size Segment = Relative. Indication context class color parameters, e.g., Style Main Color (positive) and Style Main Color (negative) for Highlight Main Volume Profile = Value Area range(s) higher and/or lower, or for Highlight Main Volume Profile = Delta with Evaluation Volume Buy/Sell = Price High/Low volume classes by close prices higher and lower. Set color parameters with the color picker. Default configuration with a palette of five colors a positive, negative, neutral, foreground and background color. For contrast on both dark and light themed charts, the foreground and background color parameter values, set to Gray, are automatically substituted to the chart's respective colors with Style Color Default Foreground/Background. Set color list parameters with presets, or specify as text value to type or create with included resources, e.g., Style Highlight Marker Color Sequence = Green,White,Gray and Style Background Color Gradient = Blue-Green-Red. Layer graphical objects above or below the native price chart, e.g., Layer Main = Background and Layer Column = Foreground. Composition multiple indicator instances from top to bottom by the order of attaching to the chart. Panel object display as text lines, table column rows or dashboards on the chart or a separate subwindow, e.g., Panel = Summary Extended - Line, Style Panel Raster Line = true and Style Highlight Panel Color Fill = Signed.

Chart Parameters

Chart property parameters for integrated chart control, i.e., settings of the chart properties window, which by default hide the chart grid Common Grid = Hide, and to make additional changes, e.g., to hide native price chart and/or scales. Default configuration with indicator keyboard shortcuts, and optional on-chart control buttons, to toggle display of objects, switch types of the Main and Panel object, and to adjust price level size. For dataset range Drag & Drop to reset the range selection lines to the visible window range.

The default dataset feed mode History Bars + Real-time Ticks Accumulation stores distributions in-memory. Chart timeframe and price scale must be maintained or redistribution might occur (on movement outside of the current scale) and tick accumulation is restarted, using coarse historical bar data up to that time. The second mode History Ticks + Real-time Ticks stores data tick-by-tick on disk which is persistant on redistribution.  show more

Volume Profile, Footprint and Market Profile TPO are compiled by price level and TPO period sizes. Indicator visualizations are 'pixel perfect' which require specific chart price scale parameters for exact price scale and indicator price level setups, i.e., chart price scale and indicator price level setting combination produces price level grid values with digits as of symbol. The analytical significance of this can in most use cases be neglected. By default charts have an automatic price scale by the visible range, use 'Scale Fix' and control chart price scale via the chart properties 'Common' tab. Automatically maintain exact price level size with the Chart Scale Fix Auto application module. Any changes to price level and/or TPO period size related parameters produce a new compilation, i.e., redistribution.

Dataset Feeds and Processing

Default dataset compilation with millisecond accumulated real-time data ticks and lowest chart timeframe period historical data Dataset Real-time Ticks Accumulation = 100 Milliseconds and Dataset History Bars = All Timeframes. Tick Volumes and Order Book extensions for historical tick data, and real-time and historical trade operation tick data with volume classification by order type via the Data Source API, e.g., attach a extension instance to a chart and set indicator parameter Dataset Feed = History Ticks + Real-time Ticks. For MetaTrader 4 to use historical tick data create record by running an terminal instance as service, or by cross-platform feeding the MetaTrader 5 terminal exclusive data, e.g., Data Source Common Folder = true, and Extension Order Book Output Common Folder = true and Extension Order Book Output Format = 4. Alternatively, feed user specified third party tick or bar data files, e.g., Data Source = Feed.dat. Volume classification defaults to order type with fallback to price action Evaluation Volume Buy/Sell = Order Buy/Sell.

For Footprint and high resolution price level Volume Profile charts, i.e., small price level size, especially on low chart timeframe or price scale, it is imperative to have sufficient data available for price level data points to have value, e.g., dataset range of 15 minutes on 1-minute timeframe chart can fill only 15 price levels at most with lowest chart timeframe period historical data whereas tick data at times can provide 1500 values to distribute. Maximum use of historical chart timeframe data of a broker is set with Max bars property via the terminal options window 'Charts' tab. To apply changes to the Max bars property restart the terminal.  show more

Target real-time data processing interval, i.e., rate limit, for default data input with Dataset Real-time Ticks Accumulation, for the Data Source API with indicator and extension parameters, e.g., Data Source Input Rate = 50 Milliseconds and Extension Tick Volumes Output Rate = 50 Milliseconds. For compositions with multiple indicator instances, indicator instances do not process concurrently and only the first instance attached to the chart, which is last to process, controls frame display rate. Limit system resource usage further with Display Frame Rate, for extensions with, optionally lossless, tick data compression, e.g., Extension Tick Volumes Output Plan = Performance.

Default configuration with adaptive data timeframe period selection Dataset History Bars Adaptive to prevent unintended high system resource usage such as with time based segmentation methods on change to higher chart timeframe or time scale. Warnings are displayed whether segmentation parameters were adjusted and/or dataset compilation quality was lowered. Preemptively favor speed over quality of historical chart timeframe period data distribution with the adaptive data timeframe period selection modes or select a single timeframe period, e.g., on high scale 4-hour timeframe chart Dataset History Bars Plan = Performance or Dataset History Bars = 15 Minutes.

Dataset Variables and Exports

Environment variable names can be selected and specified as values of input parameters with additional properties and options, and/or further distinction per metric, e.g., line visualization with user specified labels and style per metric Highlight Main Custom = VP_POC_MEDIAN:Volume Point of Control;propSize=3;propDash=1, etc, data statistics table Object Panel = Volume Point of Control %VP_POC_MEDIAN%; etc, and evaluation condition Extension Notifications Condition = VOLUME_DELTA > 500, etc.

Data Environment API for programmatic access to dimensions and metrics. Reports and Database extensions to export volume, TPO, price and time metrics data to files in HTML, CSV, JSON and SQL formats. Developer resources include a framework for automated algorithmic trading strategies. Data Environment API clients for MQL4 and MQL5 programming languages, and an extension for event-model evaluation.

Graphical Object Slots

For all object types per slot see Object. For on-object visualization indication options by object slot and type Highlight, for additional Main object visualization and indication element options by indication, including other on-object options to overlay, Highlight Main and Highlight Main Marker.

Main (Market Profile TPO - Histogram)
1 2 3 4 5 6 7
Object slot names and type options selection example composition
1 Main (Market Profile TPO - Histogram) 2 Column (Volume Profile Delta - Histogram, Volume Total, TPO Total) 3 Background (Volume Profile - Histogram) 4 Panel (Volume Total, Volume Delta, TPO Total) 5 Grid 6 Separator 7 Extension (Volume by Time - Histogram)

2. Indicator Parameters

Indicator Parameters:  Object

Main

enumenumeration

Keyboard shortcut To switch types, press T.

  • Volume Profile - Histogram
  • Volume Profile - Line Graph
  • Market Profile TPO - Histogram
  • Market Profile TPO - Line Graph
  • Market Profile TPO - Marker Letter
  • Market Profile TPO - Marker Block

Column

enum,stringenumeration, string

Minimum price level size for text to display is 8 pixels.

  • Price High
  • Price Low
  • Price Median
  • Volume Total
  • Volume Delta
  • Volume Buy ; Volume Sell
  • TPO Total
  • Volume Total ; Volume Delta
  • Volume Total ; Volume Buy ; Volume Sell
  • Volume Total ; TPO Total
  • Volume Total ; Price Median
  • Volume Delta ; Price Median
  • Volume Buy ; Volume Sell ; Price Median
  • TPO Total ; Price Median
  • Specified Format: Environment variable names enclosed with per cent sign (%). Aliases by option name case sensitive. Use a semicolon (;) to specify columns. Example: Volume Footprint with separator symbol set by aliases
    set Column to Volume Buy; x ;Volume Sell

Column

enumenumeration

Example: Volume Footprint with Volume Profile histogram per metric
set Column to Volume Profile - Histogram; Volume Buy; Volume Profile - Histogram; Volume Sell
set Highlight Column Volume Profile #1 to Buy
set Highlight Column Volume Profile #2 to Sell

  • Volume Profile - Histogram
  • Market Profile TPO - Marker Letter
  • Market Profile TPO - Marker Index

Background

enumenumeration
  • Volume Profile - Histogram
  • Volume Profile - Fill

Panel

enum,stringenumeration, string

Keyboard shortcut To switch types, press L.

  • Summary - Line
  • Summary Extended - Line
  • Summary Extended - Table
  • Dataset Feed
  • Dataset Price Level and TPO Period
  • Dataset Segment Start
  • Dataset Segment Start/End
  • Specified Format: Environment variable names enclosed with per cent sign (%). Use a semicolon (;) to specify line breaks. Use a vertical slash (|) to specify line breaks effective for Style Panel Raster Line only. Set direct or by file. Values longer than 229 characters can only be set by file. Note: Resources include example configuration files. Format and offset date/time values with Style Panel Date/Time Text, scale number values with Style Panel Number Text. Example: Market Profile TPO and Volume Profile Point of Control with labels.
    set Panel to TPOC=%MP_POC_MEDIAN% VPOC=%VP_POC_MEDIAN%

Grid

enumenumeration

Minimum price level size to display is 3 pixels.

  • Segment
  • Window

Separator

enumenumeration

Keyboard shortcut To toggle display, press X.

  • Start
  • End
  • Start/End

Indicator Parameters:  Object Position

Best Practices
If the native price chart and date/time scale are not essential

To fit and/or align static size structures by size, Object Position Anchor = false, for Footprint add Column object width, e.g., set 120.
For Market Profile TPO marker structures, to fit and/or align objects by dynamic sizes of structures, Object Position Anchor = D.
Price scale by visible segments with the Chart Scale Fix Auto extension.

Anchor

strstring

Native chart date/time scale and object width based methods. Object width positioning hides the native price chart and date/time scale, to display set explicitly with Chart Properties parameters. Composition segments of multiple indicator instances interleaved, after time, by the order of attaching to the chart. Format: True for date/time anchors. False or width in pixels for object width based anchors. Specified width is added to the fixed relative or absolute Main object width set with Style Main Size. Use the letter 'D' for dynamic sizes of TPO marker structures. Note: Resources include Chart Scale Fix Auto extension for price scale by visible segments with object width positioning. Example: Object width positioned Volume Footprint structures
set Style Column Size, e.g., to 60,60 for Object Column Volume Buy; Volume Sell (two columns of minimum 60 pixels)
set Object Position Anchor to 120 (2 columns x 60 pixels = 120)
set Object Position Anchor Column to Segment - Start Right
Example: Object width positioned Market Profile TPO marker structures with custom chart date/time scale
set Anchor to D+5 (5 pixels padding between segments)
set Object Panel to ^%TIME_START%
set Anchor Panel to Window - Bottom and Segment - Start

Anchor Main

enumenumeration

Window options for single segment instances. Example: Single segment anchored to right side of chart
set Dataset Segment Divisor to 1
set Anchor Main to Window - Right
set Direction Main to Right-to-Left

  • Window - Left
  • Window - Right
  • Segment - Start
  • Segment - End

Anchor Column

enumenumeration

Window options for single segment instances. Example: Volume metric number display over Main object Volume Profile histogram
set Object Main to Volume Profile - Histogram
set Object Column to Volume Total
set Anchor Main to Segment - Start
set Anchor Column to Segment - Start Right

  • Window - Left
  • Window - Right
  • Segment - Start Left
  • Segment - Start Right
  • Segment - End Left
  • Segment - End Right

Anchor Panel

enumenumeration
  • Window - Top
  • Window - Bottom
  • Segment - Top
  • Segment - Bottom
  • Segment - Top/Bottom

Anchor Panel

enumenumeration

Window options for single segment instances, and with Object Panel - Current Segment.

  • Window - Left
  • Window - Right
  • Segment - Start
  • Segment - End

Direction Main

enumenumeration
  • Left-to-Right
  • Right-to-Left

Direction Column Structure

enumenumeration

First and second histogram and/or marker structure object.

  • Left-to-Right
  • Right-to-Left
  • Right-to-Left, Left-to-Right
  • Left-to-Right, Right-to-Left

Offset Main

intinteger

Pixels.

Offset Column

intinteger

Pixels.

Offset Column Structure

stringstring

Pixels. Relative to Column object. First and second histogram and/or marker structure object. Format: First and second comma separated. Example: Volume metric number display over Column object Volume Profile histogram
set Object Column to Volume Profile - Histogram; Volume Total
set Style Column Histogram Size to Specified Pixels, 100
set Offset Column Structure to 100

Offset Panel

stringstring

Pixels. Top and left. Top inverts with Anchor Panel Segment - Top/Bottom by position. Format: Top and left comma separated.

Layer Main

enumenumeration

Keyboard shortcut To toggle options, press B.

  • Foreground
  • Background Note: Control native price chart layer with Chart on foreground via the chart properties window (keyboard shortcut F8) 'Common' tab, or with the respective indicator Chart Properties parameter.

Layer Main Line

enumenumeration
  • Foreground
  • Background

Layer Column

enumenumeration
  • Foreground
  • Background

Layer Column Structure

enumenumeration

Histogram and/or marker structure objects.

  • Foreground
  • Background

Subwindow Panel

enumenumeration

Window index, starting at one for the first subwindow. Default zero is disabled. Note: Chart Subwindow extension for dedicated subwindow.

Indicator Parameters:  Dataset

Best Practices
For large ranges, Feed with History Bars Plan = Performance.
For fast loading while preparing tick data distributions, Feed with History Bars + Real-time Ticks Accumulation.
For complete and persistant tick data distributions, Feed with History Ticks + Real-time Ticks.
For MetaTrader 4, cross-platform feed historical tick data from MetaTrader 5, or create record by running program as service.
Exact price level sizes with the Chart Scale Fix Auto extension, e.g., 16 Pixels and 50 Symbol Points.
Absolute Market Profile TPO Period input method, e.g., =15m, instead of as divisor relative to range in chart bars, e.g., 96.
For day segments, of both time based methods, Segment Session instead of Segment Divisor = =1d.
For fixed scales, Price Level Grid = Static and Display Mode = Window Chart.
For dynamic scales, automatic and user scrolling, Price Level Grid = Dynamic and Display Mode = Window Viewport.

Feed

enumenumeration

Real-time and historical tick-by-tick data with the Order Book and Tick Volumes extensions, and user data files via the Data Source API.

  • History Bars + Real-time Ticks Accumulation
  • History Ticks + Real-time Ticks - Indicator API

Real-time Ticks Accumulation

enumenumeration

Real-time accumulated tick data distributions stored in-memory. Note: Inspect tick data coverage with Panel preset Dataset Feed variable R. Actual accumulation interval is not less than 16ms. This is a software/hardware limitation regarding system clocks, setting it to lower values might improve overall performance but could work adversely with high system resource usage. Note: Order Book and Tick Volumes extensions for disk storage persistent tick data distributions.

  • 1 Millisecond
  • 10 Milliseconds
  • 100 Milliseconds
  • 300 Milliseconds
  • 600 Milliseconds
  • 1 Second

History Bars

enumenumeration

Historical chart timeframe period data distributions. Fallback to higher timeframes if unavailable. Note: Inspect historical chart timeframe period data coverage with Panel preset Dataset Feed variables M1, M5, M15, etc. Note: Control the terminal's historical data limit per chart timeframe period with Max bars via the terminal options window (keyboard shortcut Ctrl-O) 'Charts' tab. Note: Resources include History Bars extension to load and build time series data of all chart timeframe periods.

  • All Timeframes
  • 1 Minute (M1)
  • 2 Minutes (M2) *
  • 3 Minutes (M3) *
  • 4 Minutes (M4) *
  • 5 Minutes (M5)
  • 6 Minutes (M6) *
  • 10 Minutes (M10) *
  • 12 Minutes (M12) *
  • 15 Minutes (M15)
  • 20 Minutes (M20) *
  • 30 Minutes (M30)
  • 1 Hour (H1)
  • 2 Hours (H2) *
  • 3 Hours (H3) *
  • 4 Hours (H4)
  • 6 Hours (H6) *
  • 8 Hours (H8) *
  • 12 Hours (H12) *
  • Daily (D1)
  • Weekly (W1)
  • Chart Timeframe

* Available for MetaTrader 5

History Bars Plan

enumenumeration

Historical data timeframe period limit by maximum bars and coverage.

  • Performance
  • Balanced
  • Quality

History Bars Adaptive

boolboolean

Historical data timeframe period limit by indicator data processing time.

Volume Profile

enumenumeration
  • Tick Volume
  • Real Volume * Note: Order Book extension for cross-platform terminal data feeds.

* Available for MetaTrader 4 via the Data Source API

Market Profile TPO Period

strstring

Amount or size of indexed TPO periods. First parameter for histogram and line graph object types. Second for block and letter marker structures. Set letter marker character sequence with Style Main Marker Character Letter. Character sequence is repeated if amount is less than of indexed periods. Minimum TPO period size is 1 minute. Maximum amount of indices is 1000000 for histogram and line graph object types, and 65025 for block and letter marker structures. Format: Amount as divisor. Prefix with equal sign (=) to specify size as product in seconds, minutes, hours or days (s, m, h and d). Note: Inspect TPO period size with Panel preset Dataset TPO Period. Example: 15-minute TPO for 9-hour session set by amount
set Market Profile TPO Period to 36 (9-hour session duration / 15-minute TPO = 36)
Example: 15-minute TPO set by size
set Market Profile TPO Period to =15m

Price Level

enum,uintenumeration, unsigned integer

Keyboard shortcut To increase, press Q. To decrease, press W.

Adjusted by chart height and price scale for 'pixel perfect' price level visualizations. Minimum price level size for Market Profile TPO letter and block marker structures is 6 and 4 pixels respectively. Note: Inspect actual price level size in pixels and symbol points with Panel preset Dataset Price Level. If actual size not exactly matches Specified Symbol Points it can be set by adjusting chart height and/or price scale. This is a software/hardware limitation regarding the 'pixel perfect' concept and symbol point per pixel ratios. Note: Resources include Chart Scale Fix Auto extension to validate chart dimensions and maintain exact price level size. Example: Maintain exact price level size and align grid for 50 symbol points with the Chart Scale Fix Auto extension
set Dataset Price Level Grid to Static
set Dataset Price Level to Specified Pixels
Menubar > Insert > Indicator > Volume by Price Indicator > Chart > Scale Fix Auto
set Level Pixels to match Dataset Price Level Pixels
set Level Symbol Points to 50
set Level Threshold to -1 (infinite)

  • Specified Pixels
  • Specified Symbol Points

Price Level Grid

enum,floatenumeration, float

Dynamic fix by window or dataset range. Implicit or explicit static fix by fractional part of decimal number.

  • Static
  • Dynamic - Window
  • Dynamic - Dataset

Range

enumenumeration

Note: Relative range selections by chart timeframe period bars, e.g., Range Window and Range Bars, are reset on chart timeframe changes. Prevent shift with an absolute range selection method option, e.g., Range Date/Time, or relative method by time, e.g., Range Days.

  • Window
  • Drag & Drop Time
  • Drag & Drop Time/Price
  • Specified Date/Time
  • Specified Bars
  • Specified Days
  • Specified Hours
  • Specified Minutes
  • Current Day
  • Previous Day
  • Current Week
  • Previous Week
  • Current Month
  • Previous Month
  • Current Quarter
  • Previous Quarter
  • Current Year
  • Previous Year

Range Window

uintunsigned integer

Keyboard shortcut To update range if current bar is visible, press R.

Visible window range in percentage. Updates range on scroll if current bar is not visible. Note: Set upcoming bars by using chart shift.

Range Drag & Drop

enumenumeration

Keyboard shortcut To toggle display of range selection line, press G. To reset to the visible range, press R.

Time/price and time based methods. Defaults to the visible window range. Reset on chart timeframe changes, persistent with specified Drag & Drop ID. Note: Range selection for multiple indicator instances by Drag & Drop ID.

Range Date/Time

date/timedate/time

Date/time picker.

Range Bars

stringstring

Format: Start and optional end colon (:) separated. Negate for future range end. Example: Previous 96 bars, current and upcoming 47 bars.
set Range Bars to 97:-47

Range Days

stringstring

Format: Start and optional end colon (:) separated. Negate for future range end. Example: Previous and current day
set Range Days to 2
Example: Previous, current and upcoming three days
set Range Days to 2:-3

Range Hours

stringstring

Relative to and adjusted for chart timeframe period bars. Format: Start and optional end colon (:) separated. Negate for future range end. Example: Previous and upcoming 4 hours.
set Range Hours to 4:-4

Range Minutes

stringstring

Relative to and adjusted for chart timeframe period bars. Format: Start and optional end colon (:) separated. Negate for future range end. Example: Previous 480 minutes, current and upcoming 239 minutes.
set Range Minutes to 481:-239

Range Repeat

boolboolean

Keyboard shortcut To reset range manually, press R.

Reset relative range selections on end.

Segment

enum,stringenumeration, string

Keyboard shortcut To segment range at the current bar, press F.*

Session segmentation on chart timeframe up to Daily (D1), i.e., segment per 1-day bar. Static, dynamic and flexible range segmentation by time and chart timeframe period bar based methods. Time based method exceeding dataset range with end extended. Chart timeframe period bar based method divisions with remainder dataset range end trimmed. Chart timeframe period bars per interval might vary for various reasons, foreseeable and unforeseeable, e.g., by contract specification, holiday, or minute without a data tick. Default minimum segment width to display with chart date/time scale based object positioning is 24 pixels set with Segment Minimum Pixels. Use object width positioning with Object Position Anchor to align by segment widths. For sequences with different sizes the relative object width method of Style Main Size by the first specified segment size.

  • Specified Session
  • Specified Divisor Format: Divisor for chart timeframe period bar based method. Prefix with equal sign (=) to specify as product for time based method. Seconds, minutes, hours or days (s, m, h and d). Time in chart timeframe period bars or percentage of chart width in bars (b and v). To enable On-Chart Controls, Keyboard Shortcuts and Control API flexible segmentation use the letter 'f' lowercase before the unit letter. Dynamic segmentation by reference to file additionally content with the letter 'D' uppercase and segment start timestamps where the specified product is the default or maximum segment size. Sequence comma separated. File name with optional use of chart property names (ID, SYMBOL and TIMEFRAME) enclosed with per cent sign (%). Values longer than 229 characters can only be set by file. File Format: Dynamic segmentation text, comma delimited
    =<MAX><UNIT> D<TIMESTAMP>, …
    Note: Resources include session example configuration files, and extensions to dynamically segment by volume and price metrics, irregular time periods, e.g., weeks, months, quarters and years, and environment event variables. Example: 5 x session segments, previous four and current day
    set Range Days to 5
    set Segment to Specified Session
    set Segment Session Hours and Week to Market Watch
    Example: 5 x 1-day segments, previous four and current day
    set Range Days to 5
    set Segment to Specified Divisor
    set Segment Divisor to =1d
    segments in exact 1-day time intervals, sizes in bars might vary specific to applicable symbol bars per segment
    to specify start of interval in time use an absolute range selection method option, e.g., set Range Date/Time to 00:00
    Example: 5 x 96-bar segments, 5 x 1-day in bars on 15-Minute (M15) chart timeframe, previous four and current day
    set Range Days to 5
    set Segment to Specified Divisor
    set Segment Divisor to 5
    segments in exact 96-bar sizes, time intervals might vary specific to applicable symbol bars per segment
    to prevent division with remainder, i.e., dataset range trim, use a relative range selection method option, e.g., set Range Bars to 385:-95
    Example: 1 x 2-day segment, previous two days composite
    set Range Days to 3:2
    set Segment to Specified Divisor
    set Segment Divisor to 1
    Example: 1 x 2-session segment, previous two days composite
    set Range Days to 3:2
    set Segment to Specified Session
    set Segment Session Hours and Week to Market Watch
    set Segment Session Group to 2
    Example: 1 x 12-hour segment and 3 x 4-hour segments, current day
    set Range Days to 1
    set Segment to Specified Divisor
    set Segment Divisor to =12h,4h
    Example: 4-hour segments with keyboard shortcut (key F) enabled to create a new segment at the current bar, current day
    set Range Days to 1
    set Segment to Specified Divisor
    set Segment Divisor to =4fh
    to enable chart button set User Interface On-Chart Controls to true
    (keyboard shortcuts are enabled by default)
    Example: 5000-tick or real volume segments with maximum 12-hour segments, current day
    set Range Days to 1
    set Segment to Specified Divisor
    set Segment Divisor to VBP_%ID%_IVOLUME.DAT
    attach Volume Period extension instance to the chart:
    Menubar > Insert > Indicator > Volume by Price Indicator > Segment Divisor > Volume Period
    set Range Days to 1
    set Output to VBP_%ID%_IVOLUME.DAT
    set Default to 12h (also the maximum segment object width of the relative Style Main Size options)
    set Volume to Tick or Real Volume, and 5000
    Example: Code sample to create a new segment at the current bar with the FileWrite function int file_handle = FileOpen(file_path,FILE_READ|FILE_WRITE|FILE_TXT);
    if (FileGetInteger(file_handle,FILE_SIZE)==0) FileWriteString(file_handle,StringFormat("=%s D",(string)default_size));
    FileSeek(file_handle,0,SEEK_END);
    FileWriteString(file_handle,StringFormat(",%s",(string)(long)iTime(Symbol(),Period(),0)));
    Example: Dynamic segmentation file content 4 entries, 5 segments =24h D,1663156800,1663158600,1663171200,1663183800 Example: Code sample to create a new segment at the current bar with the GlobalVariable function GlobalVariableSet("VBP_CTRL_SEGMENT_RANGE",NULL); Note: Dynamic segmentation at previous historical bars is on indicator initialization, process before initialization, or programmatically reinitialize indicator instances via the Control API.

* Available with flexible range segmentation

References
"Global Variables of the Terminal - MQL5 Reference" https://www.mql5.com/en/docs/globals
"Global Variables of the Terminal - MQL4 Reference" https://docs.mql4.com/globals
"Files and Folders - MetaTrader 5 Help" https://www.metatrader5.com/en/terminal/help/start_advanced/structure
"Terminal Start and Data Structure - MetaTrader 4 Help" https://www.metatrader4.com/en/trading-platform/help/userguide/start_comm

Segment Session Name

stringstring

Session name for Panel display. Variable SESSION.

Segment Session Hours

enum,stringenumeration, string

Adjusted for chart timeframe period rounded up. Session quotes specification from Market Watch might not match actual chart symbol data. Note: For the contract specification window use command 'Specification' in the context menu (right mouse click) of the applicable symbol name in the Market Watch window (keyboard shortcut Ctrl-M). Omit irregular Pre- and Post-Market Session segments with Segment Minimum Bars.

  • Market Watch
  • Specified Format: 24-hour (hh:mm). Example: Full range user session specification
    set Segment to Specified Session
    set Segment Session Hours to Specified and 00:00-24:00
    set Segment Session Week to Specified and Sunday-Saturday

Segment Session Hours Offset

enumenumeration

Server time zone offset for user session quotes specification. Note: Alternatively, offset directly with Segment Session Hours. Offset server time zone for Panel display only with Style Panel Date/Time Offset Text.

Segment Session Week

enum,stringenumeration, string
  • Market Watch
  • Specified Format: Week day names (full or abbreviated) comma separated, or by hyphen (-) to specify as range. Note: For 5-day trading week Overnight Session to display 7 segments, i.e., for Monday and Friday two of which the first (Sun-Mon) and second (Fri-Sat) of each respectively is partial, set Sunday-Saturday.

Segment Session Group

uintunsigned integer

Sessions concatenation.

  • Any
  • Consecutive

Segment Session Group TPO

enumenumeration

TPO periods indexing.

  • Group
  • Session

Segment Minimum Bars

uintunsigned integer

Segment exclusion.

Segment Minimum Pixels

uintunsigned integer

Segment adjustment or exclusion for Segment Divisor and Session respectively.

Indicator Parameters:  Highlight

Main Volume Profile

enumenumeration
  • Total
  • Total - Gradient
  • Buy/Sell
  • Buy/Sell - Ordered
  • Delta
  • Imbalance
  • Count
  • Value Area

Main Market Profile TPO

enumenumeration
  • Total
  • Total - Gradient
  • Count
  • Value Area
  • Sequence
  • Sequence - Gradient

Column Volume

enumenumeration

Cell text and background fill color visualization for respective types. Total and High And Low Volume Nodes for Object Column type Volume Total. Volume Delta and Imbalance for types Volume Delta, Buy and Sell.

  • Total - Opacity
  • Delta - Opacity
  • Imbalance
  • Imbalance - Opacity
  • High And Low Volume Nodes

Column Volume Profile

enumenumeration
  • Total
  • Buy
  • Sell
  • Buy/Sell
  • Delta
  • Value Area
  • High And Low Volume Nodes

Background Volume Profile

enumenumeration
  • Total
  • Total - Gradient
  • Delta

Indicator Parameters:  Highlight Main

Note: True options without type imply on-object visualization, i.e., element(s) of Histogram, Line Graph and Marker Main object types.

Current

enumenumeration
  • true
  • true - Line

Median

enumenumeration
  • true - Line

Balance

enumenumeration
  • true - Line

Count

enumenumeration
  • true - Bar
  • true - Background Fill

POC

enumenumeration

Point of Control.

  • true
  • true - Line
  • true - Background Fill

VA

enumenumeration

Value Area.

  • true - Background Fill

VAH/VAL

enumenumeration

Value Area High and Low.

  • true
  • true - Line

LVN

enumenumeration

Low Volume Nodes.

  • true
  • true - Background Fill

HVN

enumenumeration

High Volume Nodes.

  • true
  • true - Background Fill

IB

enumenumeration

Initial Balance.

  • true - Bar
  • true - Line

OHLC

boolboolean

Keyboard shortcut To toggle display, press C.

Open, High, Low and Close.

  • true - Candle

VWAP

boolboolean

Volume Weighted Average Price.

  • true - Line

Custom

stringstring

Metrics line visualization. Default style with Style Main Line Size, Dash, Opacity and Color. Display text labels with Style Main Line Label. Visualize historical development of metrics with Style Main Line Trace. Format: Environment variable names comma separated. Aliases by type and parameter name underscore separated. Optional custom text labels colon (:) separated. For line style append name-value pairs propSize (1 to 5), propDash (0 to 1), propOpacity (0 to 255) and/or propColor (Web color name, MQL literal RGB or integer) equals sign defined semicolon (;) separated. Set direct or by file. Values longer than 229 characters can only be set by file. Note: Resources include example configuration files and Main Line extension for user interface to create configuration files. Example: Market Profile TPO and Volume Profile Point of Control
set Custom to MP_POC_MEDIAN,VP_POC_MEDIAN
Example: Market Profile TPO and Volume Profile Point of Control with user specified text labels set by file.
set Custom to Line.ini
create file named Line.ini at path C:\Program Files\MetaTrader 5\MQL5\Files\Volume by Price Indicator\Line.ini
edit file to content MP_POC_MEDIAN:Label1 %PRICE%,VP_POC_MEDIAN:Label2 %PRICE%
Example: Volume Profile Value Area High and Low with style per metric.
set Custom to VP_VA_LOW:;propColor=clrRed;propSize=3,VP_VA_HIGH:;propColor=clrBlue;propSize=3

References
"Web Colors - MQL5 Reference" https://www.mql5.com/en/docs/constants/objectconstants/webcolors
"Web Colors - MQL4 Reference" https://docs.mql4.com/constants/objectconstants/webcolors
"Color Type - MQL5 Reference" https://www.mql5.com/en/docs/basis/types/integer/color
"Color Type - MQL4 Reference" https://docs.mql4.com/basis/types/integer/color

Indicator Parameters:  Highlight Main Marker

POC

enumenumeration
  • true - Box Border
  • true - Box

VA

enumenumeration
  • true - Bracket
  • true - Box Border
  • true - Box

Start

boolboolean
  • true

End

boolboolean
  • true

Start Row

enumenumeration
  • true - Underline
  • true - Box Border
  • true - Dot

End Row

enumenumeration
  • true - Underline
  • true - Box Border
  • true - Dot

Letter Start

stringstring

First TPO period marker replacement character.

Letter End

stringstring

Last TPO period marker replacement character.

Letter POC

stringstring

Additional marker character at row's end.

Indicator Parameters:  Style Main

Size

enum,uintenumeration, unsigned integer

Keyboard shortcut To switch options, press S.

Maximum histogram and line graph object width. Specified in pixels or relative to chart width. Note: By default Column object histogram object size is set relative to Main object size.

  • Small
  • Medium
  • Large
  • Specified Pixels

Size Segment

enumenumeration

Histogram and line graph object segment absolute or dataset highest price level value relation. Note: Scaling with relative object sizes and if chart width available for segment is less than required for pixel ratioed scale visualization. Rounding in scale calculations might cause minor visual distribution changes. Note: Prevent coarse price level sizes and color visualizations of initial distribution absolute size objects segments and the dataset's first relative size object segment with Evaluation Volume Total, Evaluation Volume Delta and Evaluation Market Profile TPO Total

  • Relative
  • Absolute

Color (total) (positive) (negative)

colorcolor

Color Gradient

enum,stringenumeration, string
  • Blue-Red
  • Yellow-Red
  • Green-Red
  • Blue-Green-Red
  • Blue-Green-Orange
  • Blue-Purple
  • Blue-Purple-Yellow
  • Specified Format: Web color name, MQL literal RGB or integer values. Comma or hyphen separated.

References
"Web Colors - MQL5 Reference" https://www.mql5.com/en/docs/constants/objectconstants/webcolors
"Web Colors - MQL4 Reference" https://docs.mql4.com/constants/objectconstants/webcolors
"Color Type - MQL5 Reference" https://www.mql5.com/en/docs/basis/types/integer/color
"Color Type - MQL4 Reference" https://docs.mql4.com/basis/types/integer/color

Indicator Parameters:  Style Main Histogram

Border

boolboolean

Border Merge

boolboolean

Bar borders overlap, i.e., 1 pixel inaccuracy, for aesthetics. Effective if price level size is greater than 2 pixels.

Color Border (positive, total) (negative)

colorcolor

Indicator Parameters:  Style Main Line Graph

Area

boolboolean

Size Line

enumenumeration

Dash Line

boolboolean

Opacity Area

enumenumeration

Color Area

colorcolor

Indicator Parameters:  Style Main Marker

Character Letter

stringstring

TPO period markers character sequence. Default is upper case alphabet. Character sequence is repeated if amount is less than of indexed periods set with Dataset Market Profile TPO Period. Format: ASCII and selected ANSI characters. Set direct or by file. Values longer than 229 characters can only be set by file.

Font Letter

enum,stringenumeration, string

Format: Font family name and optional weight (Thin, Regular and Bold) comma separated. Note: To install additional fonts copy TTF format files, e.g., Roboto Mono.ttf and IBM Plex Mono.ttf, to the Windows Fonts folder, e.g., C:\Windows\Fonts, and restart the terminal.

References
"Adobe Fonts | Explore unlimited fonts" https://fonts.adobe.com
"Google Fonts: Browse Fonts" https://fonts.google.com

Size Letter

enum,uintenumeration, unsigned integer
  • Small
  • Medium
  • Large
  • Specified Pixels

Padding Letter

intinteger

Note: Negative value for condensed structures.

Fill Block

enumenumeration

Size Block

enum,uintenumeration, unsigned integer
  • Small
  • Medium
  • Large
  • Specified Pixels

Padding Block

enumenumeration

Note: Null option to display as histogram with marker structure on-object visualization.

Anchor Time

boolboolean

Adjusted for alignment to chart timeframe period.

Color

colorcolor

TPO period markers without on-object visualization color.

Indicator Parameters:  Style Main Line

Trace

boolboolean

Chart timeframe period data points. Note: Resources include Traces extension for summary charts, to scale on multiple chart timeframes, and to visualize data independent of indicator instance setup and (re)initialization.

Interconnect

boolboolean

Data points change interconnection.

Label

boolboolean

Text label price and name. Default environment variable names. Specify with Highlight Main Custom.

Size

enumenumeration

Dash

boolboolean

Size Label

enumenumeration

Margin

intinteger

Pixels. Format: Positive value for margin right or negative value for margin left.

Margin Label

intinteger

Pixels. Margin right or left by Align Horizontal Label Text.

Opacity

enumenumeration

Ray

boolboolean

Color

colorcolor

Color Label Text

colorcolor

Color Label Fill

colorcolor

Font Label Text

enum,stringenumeration, string

Format: Font family name and optional weight (Thin, Regular and Bold) comma separated. Note: To install additional fonts copy TTF format files, e.g., Roboto Mono.ttf and IBM Plex Mono.ttf, to the Windows Fonts folder, e.g., C:\Windows\Fonts, and restart the terminal.

References
"Adobe Fonts | Explore unlimited fonts" https://fonts.adobe.com
"Google Fonts: Browse Fonts" https://fonts.google.com

Align Vertical Label Text

enumenumeration
  • Top
  • Middle
  • Bottom

Align Horizontal Label Text

enumenumeration
  • Right
  • Left

Indicator Parameters:  Style Column

Text

boolboolean

Note: False option to display as bars with on-object visualization.

Fill

boolboolean

Size

stringstring

Pixels. Minimum column widths. For column histogram and/or marker structure objects width up to which is padded. Format: Comma separated.

Padding

enumenumeration

Left and right cell padding.

Border Vertical

enumenumeration

Segment price range or window span left and right cell borders.

  • true
  • true - Window

Border Horizontal

boolboolean

Top and bottom cell borders.

Size Text

enumenumeration

Opacity Fill

enumenumeration

Color Text

colorcolor

Color Text (total) (positive) (negative)

colorcolor

Color Fill

colorcolor

Color Fill (total) (positive) (negative)

colorcolor

Color Border Vertical

colorcolor

Color Border Horizontal

colorcolor

Color Segment

enumenumeration

Segment absolute or dataset highest price level value relation for High and Low Volume Nodes.

  • Relative
  • Absolute

Font Text

enum,stringenumeration, string

Format: Font family name and optional weight (Thin, Regular and Bold) comma separated. Note: Align text characters vertically with a monospaced font, e.g., Consolas. To install additional fonts copy TTF format files, e.g., Roboto Mono.ttf and IBM Plex Mono.ttf, to the Windows Fonts folder, e.g., C:\Windows\Fonts, and restart the terminal.

References
"Adobe Fonts | Explore unlimited fonts" https://fonts.adobe.com
"Google Fonts: Browse Fonts" https://fonts.google.com

Align Text

stringstring

Cell texts horizontal alignments. Format: Left, right or center comma separated.

Number Text

enumenumeration
  • Hundred (h)
  • Thousand (k)
  • Million (M)

Number Digits Text

uintunsigned integer

Number Threshold Text

boolboolean

Format for scale resulting with at least one near whole number.

Indicator Parameters:  Style Column Histogram

Size

enum,uintenumeration, unsigned integer

Maximum object width. Automatic by Main object price level value relation. Specified in pixels or as percentage relative to the Main object size.

  • Relative
  • Specified Pixels
  • Specified Percentage

Size Segment

enumenumeration

Segment absolute or dataset highest price level value relation. Note: Scaling with relative object sizes and if chart width available for segment is less than required for pixel ratioed scale visualization. Rounding in scale calculations might cause minor visual distribution changes. Note: Prevent coarse price level sizes and color visualizations of initial distribution absolute size objects segments and the dataset's first relative size object segment with Evaluation Volume Total and Evaluation Volume Delta.

  • Relative
  • Absolute

Border

boolboolean

Border Merge

boolboolean

Bar borders overlap, i.e., 1 pixel inaccuracy, for aesthetics. Effective if time period size is greater than 2 pixels.

Color Border

colorcolor

Indicator Parameters:  Style Column Marker

Character Index

stringstring

Format: Left, padding, right and trailing character.

Padding

intinteger

Color

colorcolor

Indicator Parameters:  Style Background

Opacity

enumenumeration

Shade

enumenumeration
  • Left-to-Right
  • Right-to-Left

Color

colorcolor

Contour visualization background fill color.

Color (total) (positive) (negative)

colorcolor

Color Gradient

enum,stringenumeration, string
  • Blue-Red
  • Yellow-Red
  • Green-Red
  • Blue-Green-Red
  • Blue-Green-Orange
  • Blue-Purple
  • Blue-Purple-Yellow
  • Specified Format: Web color name, MQL literal RGB or integer values. Comma or hyphen separated.

References
"Web Colors - MQL5 Reference" https://www.mql5.com/en/docs/constants/objectconstants/webcolors
"Web Colors - MQL4 Reference" https://docs.mql4.com/constants/objectconstants/webcolors
"Color Type - MQL5 Reference" https://www.mql5.com/en/docs/basis/types/integer/color
"Color Type - MQL4 Reference" https://docs.mql4.com/basis/types/integer/color

Indicator Parameters:  Style Panel

Size

intinteger

Pixels. Minimum width.

Size Text

enumenumeration

Size Line

intinteger

Pixels. Minimum line height.

Raster Text

boolboolean

Increase text size for lines with one or two values.

Raster Line

boolboolean

Format as table column(s) for lines with one or two values. Align cell texts left and right for two values if the first value is a word. Align center if the values are numbers. Explicitly center align single value lines by using the vertical slash '|' as line break character.

Color Text

colorcolor

Color Text (total) (positive) (negative)

colorcolor

Color Fill

colorcolor

Color Fill (total) (positive) (negative)

colorcolor

Color Border

colorcolor

Font Text

enum,stringenumeration, string

Format: Font family name and optional weight (Thin, Regular and Bold) comma separated. Note: Align text characters vertically with a monospaced font, e.g., Consolas. To install additional fonts copy TTF format files, e.g., Roboto Mono.ttf and IBM Plex Mono.ttf, to the Windows Fonts folder, e.g., C:\Windows\Fonts, and restart the terminal.

References
"Adobe Fonts | Explore unlimited fonts" https://fonts.adobe.com
"Google Fonts: Browse Fonts" https://fonts.google.com

Number

enumenumeration
  • Hundred (h)
  • Thousand (k)
  • Million (M)

Number Digits Text

uintunsigned integer

Date/Time Text

stringstring

Date/time format. First parameter for TIME_START and TIME_END variables, second for CTIME with seconds and millisecond fractions*. Format: Date year, month and day numbers (Y, M and D). Time hour, minute, seconds and millisecond fractions (h, m, s and f). Two characters to specify double digit notations. For day and month names, three and four characters for abbreviated and full notations. For years, three and four characters to display on Daily (D1) and higher chart timeframes only.

* Available for MetaTrader 4 via the Data Source API

Date/Time Offset Text

enumenumeration

Server time zone offset.

Indicator Parameters:  Style Grid

Dash

boolboolean

Opacity

enumenumeration

Color

colorcolor

Indicator Parameters:  Style Separator

Dash Start

boolboolean

Dash End

boolboolean

Color Start

colorcolor

Color End

colorcolor

Indicator Parameters:  Style Highlight

Opacity Background Fill

enumenumeration

Ray Background Fill

boolboolean

Shade Background Fill

enumenumeration
  • Left-to-Right
  • Right-to-Left

Color Current

colorcolor

Color Median

colorcolor

Color Balance

colorcolor

Color Count (positive) (negative)

colorcolor

Color POC

colorcolor

Color VA (positive) (negative)

colorcolor

Color VAH

colorcolor

Color VAL

colorcolor

Color LVN

colorcolor

Color HVN (positive) (negative)

colorcolor

Size Bar Count

enumenumeration
  • Small
  • Medium
  • Large

Offset Bar Count

intinteger

Pixels.

Size Bar IB

enumenumeration
  • Small
  • Medium
  • Large

Offset Bar IB

intinteger

Pixels.

Size Candle OHLC

enumenumeration
  • Small
  • Medium
  • Large

Offset Candle OHLC

intinteger

Pixels.

Color IB (positive) (negative)

colorcolor

Color OHLC (positive) (negative)

colorcolor

Color Wick OHLC (positive) (negative)

colorcolor

Color VWAP

colorcolor

Indicator Parameters:  Style Highlight

Color Fill

boolboolean

Histogram bar fill instead of border.

Indicator Parameters:  Style Highlight Marker

Color Sequence

stringstring

TPO period markers color sequence. Default 26 unique colors repeated once. Set color groups with Evaluation Marker Sequence. Format: Web color name, MQL literal RGB or integer values. Comma or hyphen separated. Set direct or by file. Values longer than 229 characters can only be set by file. Note: Resources include Main Marker extension for user interface to create configuration files.

References
"Web Colors - MQL5 Reference" https://www.mql5.com/en/docs/constants/objectconstants/webcolors
"Web Colors - MQL4 Reference" https://docs.mql4.com/constants/objectconstants/webcolors
"Color Type - MQL5 Reference" https://www.mql5.com/en/docs/basis/types/integer/color
"Color Type - MQL4 Reference" https://docs.mql4.com/basis/types/integer/color

Color Sequence Gradient

stringstring

TPO period markers color gradient bases. Minimum group size to display is 3 TPO periods. Set color groups with Evaluation Marker Sequence Gradient. Format: Web color name, MQL literal RGB or integer values. Comma or hyphen separated. Set direct or by file. Values longer than 229 characters can only be set by file. Note: Resources include Main Marker extension for user interface to create configuration files.

References
"Web Colors - MQL5 Reference" https://www.mql5.com/en/docs/constants/objectconstants/webcolors
"Web Colors - MQL4 Reference" https://docs.mql4.com/constants/objectconstants/webcolors
"Color Type - MQL5 Reference" https://www.mql5.com/en/docs/basis/types/integer/color
"Color Type - MQL4 Reference" https://docs.mql4.com/basis/types/integer/color

Size Line

enumenumeration

Highlight Main Marker Bracket, Underline, Box Border and Box element line size.

Margin Line

boolboolean

Highlight Main Line element width by TPO marker structure instead of range.

Opacity Box

enumenumeration

Offset Box Dot

boolboolean

Display Dot outside of Box element.

Color Box POC

colorcolor

Color Box Border POC

colorcolor

Color Box VA

colorcolor

Color Box Border VA

colorcolor

Color Bracket VA

colorcolor

Color Start

colorcolor

Color End

colorcolor

Color Start Row

colorcolor

Color End Row

colorcolor

Color Letter POC

colorcolor

Indicator Parameters:  Style Highlight Column

Color Text Current

stringstring

Format: True or false per column comma separated.

Color Text Current

colorcolor

Color Fill Current

stringstring

Format: True or false per column comma separated.

Color Fill Current

colorcolor

Color Text LVN/HVN

stringstring

Price level value range colors. Format: Web color name, MQL literal RGB or integer values. Comma or hyphen separated.

References
"Web Colors - MQL5 Reference" https://www.mql5.com/en/docs/constants/objectconstants/webcolors
"Web Colors - MQL4 Reference" https://docs.mql4.com/constants/objectconstants/webcolors
"Color Type - MQL5 Reference" https://www.mql5.com/en/docs/basis/types/integer/color
"Color Type - MQL4 Reference" https://docs.mql4.com/basis/types/integer/color

Color Fill LVN/HVN

stringstring

Price level value range colors. Format: Web color name, MQL literal RGB or integer values. Comma or hyphen separated.

References
"Web Colors - MQL5 Reference" https://www.mql5.com/en/docs/constants/objectconstants/webcolors
"Web Colors - MQL4 Reference" https://docs.mql4.com/constants/objectconstants/webcolors
"Color Type - MQL5 Reference" https://www.mql5.com/en/docs/basis/types/integer/color
"Color Type - MQL4 Reference" https://docs.mql4.com/basis/types/integer/color

Indicator Parameters:  Style Highlight Column Histogram

Color LVN/HVN

stringstring

Price level value range colors. Format: Web color name, MQL literal RGB or integer values. Comma or hyphen separated.

References
"Web Colors - MQL5 Reference" https://www.mql5.com/en/docs/constants/objectconstants/webcolors
"Web Colors - MQL4 Reference" https://docs.mql4.com/constants/objectconstants/webcolors
"Color Type - MQL5 Reference" https://www.mql5.com/en/docs/basis/types/integer/color
"Color Type - MQL4 Reference" https://docs.mql4.com/basis/types/integer/color

Indicator Parameters:  Style Highlight Panel

Color Text

enumenumeration

Class metrics values text color. Inverted text and background fill class color parameters.

  • true
  • true - Signed

Color Fill

enumenumeration

Class metrics values text background fill color.

  • true
  • true - Signed

Indicator Parameters:  Evaluation

Volume Total

uintunsigned integer

Highest price level value. Effective if greater than dataset highest price level value.

Volume Delta

uintunsigned integer

Highest price level value. Effective if greater than dataset highest price level value.

Volume Buy/Sell

enumenumeration

Volume classification by price action, or order type via Data Source API.

  • Price High/Low
  • Order Buy/Sell - Indicator API Note: Order Book extension to feed real-time and historical trade operation tick data with volume classification by order type. Tick Volumes extension to feed real-time and historical bid price tick data with volume classification by price action.

TPO Total

uintunsigned integer

Highest price level value. Effective if greater than dataset highest price level value.

Price Level

enumenumeration

Price level range inclusion.

  • High
  • Low

Imbalance

intinteger

Percentage.

Imbalance

stringstring

Minimum price level value. Format: Higher and optional lower price level class value prepend colon (:) separated.

Count

enumenumeration
  • POC
  • Median

Count

enumenumeration
  • Include
  • Exclude

Count

intinteger

Percentage of color visualization. Set to zero for binary product with class color opacity visualization.

Count

enumenumeration
  • Any
  • Fill

Count

enumenumeration

Start of color visualization.

  • Inner
  • Outer

VA

uintunsigned integer

Percentage.

VA

enumenumeration
  • POC
  • Median

VA

enumenumeration
  • Any
  • Fill

VA TPO

enumenumeration
  • Price High
  • Price Low
  • TPO High
  • TPO Low

LVN/HVN

enumenumeration
  • Volume
  • TPO

LVN/HVN VA

boolboolean

Separate evaluation ranges based on Value Area.

LVN

uintunsigned integer

Maximum percentage of highest price level value.

HVN

uintunsigned integer

Minimum percentage of highest price level value.

LVN

uintunsigned integer

Limit by total amount of price levels. Up to three separate evaluation ranges with LVN/HVN VA.

HVN

uintunsigned integer

Limit by total amount of price levels. Up to three separate evaluation ranges with LVN/HVN VA.

IB

uintunsigned integer

Minutes. Precision by available chart timeframe period data selected with Dataset History Bars.

IB TPO

boolboolean

Open at first TPO period.

End TPO

enumenumeration

Trace method price.

Indicator Parameters:  Evaluation Line Graph

Interpolate TPO

boolboolean

Data point cubic spline interpolation.

Smooth TPO

enumenumeration

Factor. Data point merging.

Smooth TPO

enumenumeration
  • POC
  • Median
  • Start

Indicator Parameters:  Evaluation Marker

Sequence

stringstring

TPO period grouping for color visualization. Format: Comma separated. Example: First two hours green, third hour white and remaining hours gray with 30-minute TPO
set Highlight Main Market Profile TPO to Sequence
set Evaluation Marker Sequence to 4,2
(4 x 30-minute for first group and 2 x 30-minute for remaining groups)
set Style Highlight Marker Color Sequence to Green,White
set Style Main Marker Color to Gray

Sequence Gradient

stringstring

TPO period grouping for color visualization with gradual progression between group colors by gradient shades. Format: Comma separated.

Indicator Parameters:  Evaluation Column

Volume Total

intinteger

Filter by price level value. Format: Positive value for 'greater than or equal' condition, or negative value for 'less than or equal' condition.

Volume Delta

intinteger

Filter by price level value. Format: Positive value for 'greater than or equal' condition, or negative value for 'less than or equal' condition.

TPO Total

intinteger

Filter by price level value. Format: Positive value for 'greater than or equal' condition, negative value for 'less than or equal' condition. Example: Market Profile TPO Singles
set TPO Total to -1
set Price Level to MP_BODY
(price level TPO value is less than or equal to 1, and price level type is Market Profile TPO Body)

Price Level

enum,stringenumeration, string

Filter by price level types. Format: Environment variable names comma separated.

Imbalance

enumenumeration

Price level lateral, or diagonal evaluation of Volume Buy against Sell of the level above it. Volume classification by Evaluation Volume Buy/Sell.

  • Lateral
  • Diagonal Note: Resources include Chart Scale Fix Auto extension to maintain exact price level size and align grid for symbol tick size. Example: Maintain exact price level size and align grid for symbol tick size with the Chart Scale Fix Auto extension
    set Dataset Price Level Grid to Static
    set Dataset Price Level to Specified Pixels
    Menubar > Insert > Indicator > Volume by Price Indicator > Chart > Scale Fix Auto
    set Level Pixels to match Dataset Price Level Pixels
    set Level Symbol Points to 1 (specification from Market Watch might not match actual tick size)
    set Level Threshold to -1 (infinite)

Imbalance

enumenumeration

Highest and lowest price level range respective class value inclusion for diagonal evaluation method.

  • Include
  • Exclude

LVN/HVN

stringstring

Price level value color visualization by ranging in percentages. Format: Comma separated. Example: High and Low Volume Nodes ranges 0-30%, 30-60% and 60-100%
set Highlight Column Volume to LVN/HVN
set Evaluation Column LVN/HVN to 30,60,100

Indicator Parameters:  Evaluation Column Histogram

LVN/HVN

stringstring

Price level value color visualization by ranging in percentages. Format: Comma separated. Example: High and Low Volume Nodes ranges 0-30%, 30-60% and 60-100%
set Highlight Column Volume Profile to LVN/HVN
set Evaluation Column Histogram LVN/HVN to 30,60,100

Indicator Parameters:  Evaluation Panel

Imbalance

enumenumeration

Total absolute or class value percentage product relation for display of variable VOLUME_DELTA_PCT.

  • Relative
  • Absolute

Count

enumenumeration

Total absolute or class value percentage product relation for display of variables VOLUME_COUNT_PCT and TPO_COUNT_PCT.

  • Relative
  • Absolute

Indicator Parameters:  User Interface

On-Chart Controls

stringstring

To enable/disable set to true/false, or specify configuration file name. Default 'osc.ini'. Customize controls by specifying key/value pairs, disable individual controls by either removing or prefixing key/value pairs with a hash (#).

Key Value / Usage
osc_update_rangeReset Range
osc_segment_rangeSegment Range *
osc_set_price_incIncrease Price Level
osc_set_price_decDecrease Price Level
osc_toggle_typeSwitch Type Main
osc_toggle_labelSwitch Type Panel
osc_toggle_layerToggle Layer Main
osc_toggle_sizeSwitch Style Size Main
osc_toggle_display_allToggle Display All
osc_toggle_display_range_separatorToggle Display Separator
osc_toggle_display_range_barToggle Display OHLC
osc_toggle_display_range_selectToggle Display Range Selection Line

* Available with flexible range segmentation

On-Chart Controls Object

intinteger

Key name 'style_osc_type'.

  • Circle (1)
  • Rectangle (2)

On-Chart Controls Anchor

intinteger

Key name 'style_osc_anchor'.

  • Bottom (1)
  • Top (2)

On-Chart Controls Subwindow

intinteger

Window index, starting at one for the first subwindow. Default zero is disabled. Key name 'style_osc_subwindow'.

On-Chart Controls Orientation

intinteger

Key name 'style_osc_orientation'.

  • Horizontal (1)
  • Vertical (2)

On-Chart Controls Size Text

intinteger

Key name 'style_osc_rectangle_text_size'.

On-Chart Controls Font Text

stringstring

Key name 'style_osc_rectangle_text_font'.

On-Chart Controls Color Foreground

colorcolor

Key name 'style_osc_fg'.

On-Chart Controls Color Background

colorcolor

Key name 'style_osc_bg'.

On-Chart Controls Color Line

colorcolor

Key name 'style_osc_line'.

Keyboard Shortcuts

stringstring

To enable/disable set to true/false, or specify configuration file name. Default 'hotkeys.ini'. Customize controls by specifying key/value pairs, disable individual controls by either removing or prefixing key/value pairs with a hash (#).

Key Value Usage
hotkey_update_rangeRReset Range
hotkey_segment_rangeFSegment Range *
hotkey_set_price_incQIncrease Price Level
hotkey_set_price_decWDecrease Price Level
hotkey_toggle_typeTSwitch Type Main
hotkey_toggle_labelLSwitch Type Panel
hotkey_toggle_layerBToggle Layer Main
hotkey_toggle_sizeSSwitch Style Size Main
hotkey_toggle_display_allHToggle Display All
hotkey_toggle_display_range_separatorXToggle Display Separator
hotkey_toggle_display_range_barCToggle Display OHLC
hotkey_toggle_display_range_selectGToggle Display Range Selection Line

* Available with flexible range segmentation

Drag & Drop ID

uintunsigned integer

Range selection sharing among indicator instances and persistence on chart timeframe changes.

Drag & Drop Size Line

enumenumeration
  • Small
  • Medium
  • Large

Drag & Drop Color Line

colorcolor

Drag & Drop Color Fill

colorcolor

Drag & Drop Anchor Panel

boolboolean

Anchor panel to top-left corner of range selection with Range Drag & Drop Time/Price.

Indicator Parameters:  Chart Properties

Color Scheme

enumenumeration

Chart color scheme. Overrides settings made via the chart properties window 'Colors' tab.

  • default
  • Gray On Black
  • White On Black
  • Color On Black
  • Gray On White
  • Black On White
  • Color On White

Price Chart

enumenumeration

Hide price chart by Line Chart mode without color. Show by changing the mode or setting a color.

  • default
  • Hide
  • Show

Price Chart Layer

enumenumeration
  • default
  • Foreground
  • Background

Common Period Separator

enumenumeration
  • default
  • Hide
  • Show

Common Grid

enumenumeration
  • default
  • Hide
  • Show

Common Y-axis

enumenumeration
  • default
  • Hide
  • Show

Common X-axis

enumenumeration
  • default
  • Hide
  • Show

Indicator Z-order

uintunsigned integer

Object mouse click and hover event priority base number.

References
"Object Properties - MQL5 Reference" https://www.mql5.com/en/docs/constants/objectconstants/enum_object_property
"Object Properties - MQL4 Reference" https://docs.mql4.com/constants/objectconstants/enum_object_property

Indicator Parameters:  Miscellaneous

Display Mode

enumenumeration

Window coordinates and chart time/price methods. Window Chart effective for less than or equal to symbol point per pixel ratioed visualizations. Note: Resources include Chart Scale Fix Auto extension to maintain exact symbol point per pixel ratio by indicator price level size. With MetaTrader 4 and chart time/price method option Window Chart, a frame without content will display on movement outside of the current price scale. Example: Maintain at least 1 point per pixel with the Chart Scale Fix Auto extension
Menubar > Insert > Indicator > Volume by Price Indicator > Chart > Scale Fix Auto
set Level Symbol Points to 1
set Level Pixels to 1
set Level Threshold to 0 (immediate)

  • Window Chart
  • Window Viewport

Display Frame Rate

intinteger

Maximum explicitly indicator drawn frames per second.

Object Position Offset Text

stringstring

Offset for visualizations with division with remainder. Manually set for aesthetics, i.e., 1 pixel up or down. Format: Optionally separate for Main Marker and Column object comma separated.

Object Position Layer Background All

boolboolean

Layer all objects to background. Overrides settings made with Object Position parameters.

Dataset History Max Bars

intinteger

Historical chart timeframe period data limit per distribution. Key name 'data_ltf_maxbars'. Configuration file 'data.ini'. Default 5000000.

Dataset Price Level Grid Reserve

intinteger

Percentage. Key name 'data_ini_grid'. Configuration file 'data.ini'. Default 20.

Dataset Price Level Precision Normalize

enumenumeration

Price normalization method for inexact price scale and indicator price level setups, i.e., chart price scale and indicator price level setting combination produces price level grid values with digits more than of symbol. Note: Inspect actual price level size in pixels and symbol points with Panel preset Dataset Price Level. Note: Resources include Chart Scale Fix Auto extension for exact price scale and indicator price level setups.

Dataset Market Profile TPO Gap All Timeframes

enumenumeration

Price gap close method for between ticks or lower than chart timeframe period bars per chart timeframe period bar. High/Low and Close with forward attribution. Open backward.

  • true - Open
  • true - High/Low
  • true - Close

Dataset Market Profile TPO Gap Chart Timeframe

enumenumeration

Price gap close method for between chart timeframe period bars. High/Low and Close with forward attribution. Open backward.

  • true - Open
  • true - High/Low
  • true - Close

Dataset Market Profile TPO Gap Chart Timeframe

enumenumeration

Price gap close between segments, i.e., Dataset to close gaps between segments. Dataset effective for methods with forward attributed distribution.

  • Segment
  • Dataset

Dataset Market Profile TPO Gap Chart Timeframe

intinteger

Bars. Maximum time gap between bars to close price gaps between chart timeframe period bars. Set to -1 for no limit.

Style Color Default Foreground/Background

boolboolean

Automatic color contrast. Foreground and background color parameter values set to Gray are automatically substituted to the chart's respective colors.

3. Indicator API Parameters

Indicator API Parameters:  Data Source

Best Practices
Minimal file size format and lossless compression.
Matching indicator and extension range selection, or trim by extension range selection.
Matching indicator and extension input/output rates of between 20-300ms by factors as data size and instance count.

Data Source

 Usage: Extension / User
stringstring

Dataset Feed tick or bar source data. File input. Default connection with indicator extensions by chart symbol Market Watch name. Timeframe period and trade operation based data tick processing methods. MetaTrader 4 and 5 Market Watch bar data default text file formats based Data Source Format 4 and 5 options for both platforms. MetaTrader 4 format extended by an additional column to use with Real Volume. Volume classification by a last additional column to use with Evaluation Volume Buy/Sell. Minimal file size format option Data Source Format 1. Data stored on-disk in the indicator managed data subfolder. Data Source Common Folder option to share data among terminals from the Common Data Folder location. Built time series data stored in-memory.

Depth Of Market Object Column visualization source data file is loaded from the Common Data Folder location. Indicator managed file name is chart symbol Market Watch name prefixed with 'VBP' and appended with 'DOM' underscore separated. Indicator built time series data stored in-memory by segment range end times. Note: Order Book extension to feed real-time and historical trade operation tick data with volume classification by order type, and real-time Depth Of Market (DOM) pending order data. Tick Volumes extension to feed real-time and historical bid price tick data with volume classification by price action. Example: Dataset Feed user file 'Feed.csv'
set Data Source to Feed.csv
content file at path C:\Program Files\MetaTrader 5\MQL5\Files\Volume by Price Indicator\Data Source\Feed.csv
Example: Dataset Feed user file 'Feed.dat' with Common Data Folder location for shared use with other terminals
set Data Source to Feed.dat
set Data Source Common Folder to true
content file at path C:\Users\Username\AppData\Roaming\MetaQuotes\Terminal\Common\Files\Volume by Price Indicator\Data Source\Feed.dat
Example: Dataset Feed - Depth Of Market indicator managed file name
content file at path C:\Users\Username\AppData\Roaming\MetaQuotes\Terminal\Common\Files\Volume by Price Indicator\Data Source\VBP_<Symbol_Name>_DOM.DAT

References
"Files and Folders - MetaTrader 5 Help" https://www.metatrader5.com/en/terminal/help/start_advanced/structure
"Terminal Start and Data Structure - MetaTrader 4 Help" https://www.metatrader4.com/en/trading-platform/help/userguide/start_comm

Data Source Format

 Usage: Extension / User
intinteger

File Format: 1 text, comma delimited
<TIMESTAMP>,<CLOSE>,<VOL>,<VOLBUY>,<VOLSELL>
File Format: 4 text, comma delimited
<DATE>,<TIME>,<OPEN>,<HIGH>,<LOW>,<CLOSE>,<TICKVOL>,<VOL>,<VOLBUY>,<VOLSELL>
File Format: 5 text, tab delimited
<DATE> <TIME> <OPEN> <HIGH> <LOW> <CLOSE> <TICKVOL> <VOL> <SPREAD> <VOLBUY> <VOLSELL>
Example: Data Source Format 4 file content 6 rows, 6 ticks, 8 buy and 5 sell orders 2022.09.14,18:52:03.882,3950.75,3950.75,3950.50,3950.75,1,1,1,0
2022.09.14,18:52:04.241,3950.75,3950.75,3950.50,3950.50,1,1,0,1
2022.09.14,18:52:06.441,3950.75,3950.75,3950.50,3950.75,1,6,6,0
2022.09.14,18:52:06.498,3950.75,3950.75,3950.50,3950.50,1,2,0,2
2022.09.14,18:52:07.857,3950.75,3950.75,3950.50,3950.75,1,1,1,0
2022.09.14,18:52:07.912,3950.75,3950.75,3950.50,3950.70,1,2,0,2
Example: Data Source Format 5 file content 4 rows, 6 ticks, 8 buy and 5 sell orders 2022.09.14  18:52:03.882   3950.75 3950.75 3950.50 3950.75   1   1   25   1   0
2022.09.14  18:52:04.241   3950.75 3950.75 3950.50 3950.50   1   1   25   0   1
2022.09.14  18:52:06.498   3950.75 3950.75 3950.50 3950.75   2   8   25   6   2
2022.09.14  18:52:07.912   3950.75 3950.75 3950.50 3950.75   2   3   25   1   2
File Format: Depth Of Market text, comma delimited
<TIMESTAMP>
<VOLCLASS>(0 and 1 for Buy and Sell),<PRICE>,<VOL>

Data Source Input Rate

 Usage: Extension / User
intinteger

Milliseconds file read rate.

Data Source Common Folder

 Usage: Extension / User
boolboolean

Common Data Folder for shared use with all terminals installed on the operating system instead of the terminal directory location.

Indicator API Parameters:  Data Environment

Data Environment

 Usage: Extension / Developer
stringstring

Dataset dimensions and metrics data. Segment and/or price level data with Global Variables and Files output options respectively. Further select by variable name. Default name for single indicator instance setups, for multiple indicator instances specify distinct names, e.g. 'ENV1', 'ENV2', etc. Data stored on-disk in the terminal directory and indicator managed data subfolder. Output at milliseconds distribution tick rate. Format: Optional filter fragment string comma separated. Note: Events extension to create additional event type data Global Variables output by evaluation of metrics and/or other events. Buffers extension for price metric access buffers, Reports and Database for HTML, CSV, JSON and SQL file formats export. Note: Resources include Client framework to access data as structure object with price metric indexed and flagged levels. Example: Code sample to access data with the Client framework #include <Volume by Price Indicator\\Data Environment\\Client.mqh>

// --- get current segment by index
Environment.SegmentGet(segment,Environment.SegmentsTotal()-1);

datetime time_start = segment.time_start;
long volume_total = segment.volume_total;
long volume_delta = segment.volume_delta;
int tpo_total = segment.tpo_total;

// --- get price metric by index
double vp_poc_median_price = segment.price[VariableNameIndex(VBP_ENV_VP_POC_MEDIAN)];
double mp_poc_median_price = segment.price[VariableNameIndex(VBP_ENV_MP_POC_MEDIAN)];

// --- get price metric level by index
long vp_poc_median_volume_total = segment.level[segment.index[VariableNameIndex(VBP_ENV_VP_POC_MEDIAN)]].volume_total;
int mp_poc_median_tpo_total = segment.level[segment.index[VariableNameIndex(VBP_ENV_MP_POC_MEDIAN)]].tpo_total;
int mp_poc_median_tpo_index[];
ArrayCopy(mp_poc_median_tpo_index,segment.level[segment.index[VariableNameIndex(VBP_ENV_MP_POC_MEDIAN)]].tpo_index);

// --- iterate over price levels, get price metric level by flag
for (int i=0;i<ArraySize(segment.level);i++) {
  if (VariableFlag(segment.level[i].flags,VBP_ENV_VP_POC_MEDIAN)) {
    vp_poc_median_volume_total = segment.level[i].volume_total;
  }
  if (VariableFlag(segment.level[i].flags,VBP_ENV_MP_POC_MEDIAN)) {
    mp_poc_median_tpo_total = segment.level[i].tpo_total;
    ArrayCopy(mp_poc_median_tpo_index,segment.level[i].tpo_index);
  }
}

Data Environment Global Variables

 Usage: Extension / Developer
boolbool

Global Variable names are prefixed with 'VBP', and if specified environment name, uppercase underscore separated. Segment index, starting at zero and omitted for first, is appended enclosed with brackets. Note: For a snapshot of variables available to the terminal use command 'Global Variables' in the Tools menu. Example: Environment 'Env1' with variable filter
set Data Environment to Env1?filter=MP,VP
set Data Environment Global Variables to true
variables with names as VBP_ENV1_MP_POC_MEDIAN, VBP_ENV1[1]_MP_POC_MEDIAN, etc
Example: Code sample to access data with the GlobalVariableGet function datetime time_start = GlobalVariableGet("VBP_TIME_START");
long volume_total = GlobalVariableGet("VBP_VOLUME_TOTAL");
long volume_delta = GlobalVariableGet("VBP_VOLUME_DELTA");
int tpo_total = GlobalVariableGet("VBP_TPO_TOTAL");
double vp_poc_median = GlobalVariableGet("VBP_VP_POC_MEDIAN");
double mp_poc_median = GlobalVariableGet("VBP_MP_POC_MEDIAN");

References
"Global Variables of the Terminal - MQL5 Reference" https://www.mql5.com/en/docs/globals
"Global Variables of the Terminal - MQL4 Reference" https://docs.mql4.com/globals
"CopyBuffer - MQL5 Reference" https://www.mql5.com/en/docs/series/copybuffer
"iCustom - MQL5 Reference" https://www.mql5.com/en/docs/indicators/icustom
"iCustom - MQL4 Reference" https://docs.mql4.com/indicators/icustom

Data Environment Files

 Usage: Developer
boolbool

File names are prefixed with 'VBP', and if specified environment name, uppercase underscore separated. Segment index, starting at zero, is appended underscore separated. Note: For quick access to the terminal directory use command 'Open Data Folder' in the File menu of the terminal. Example: Environment 'Env1'
set Data Environment to Env1
set Data Environment Files to true
files at paths as C:\Program Files\MetaTrader 5\MQL5\Files\Volume by Price Indicator\Data Environment\VBP_ENV1_0.DAT, …VBP_ENV1_1.DAT, etc
Example: Code sample to access File Format 1 data with the FileRead functions int file_handle = FileOpen("Volume by Price Indicator\\Data Environment\\VBP_0.DAT",FILE_READ|FILE_BIN);
double price = FileReadDouble(file_handle);
long volume_total = FileReadLong(file_handle);
long volume_delta = FileReadLong(file_handle);
int tpo_total = FileReadInteger(file_handle,INT_VALUE);
int tpo_index[];
int size = FileReadInteger(file_handle,INT_VALUE);
ArrayResize(tpo_index,size);
for (int i=0;i<size;i++) tpo_index[i] = FileReadInteger(file_handle,INT_VALUE);

References
"Files and Folders - MetaTrader 5 Help" https://www.metatrader5.com/en/terminal/help/start_advanced/structure
"Terminal Start and Data Structure - MetaTrader 4 Help" https://www.metatrader4.com/en/trading-platform/help/userguide/start_comm

Data Environment Files Format

 Usage: Developer
intinteger

Note: File Format 2 data can be accessed with the FileReadStructure function. File Format: 1 binary, packed
LONG<MICROSECONDCOUNT>INT<SIZE>
DBL<PRICE>LONG<VOLUME_TOTAL>LONG<VOLUME_DELTA>INT<TPO_TOTAL>INT<SIZE>INT*SIZE<TPO_INDEX>
File Format: 2 binary
LONG<MICROSECONDCOUNT>INT<SIZE>
DBL<PRICE>LONG<VOLUME_TOTAL>LONG<VOLUME_DELTA>INT<TPO_TOTAL>INT*TPO_SET<TPO_INDEX>
Example: Data Environment Files Format file content 6 rows (output as text, tab delimited) 2714.400   906    26   10   19 20 21 22 23 25 26 27 28 30
2714.200   851   -21    9   19 20 21 22 23 25 26 27 30
2714.000   627   -39   13   16 17 18 19 20 21 22 23 24 25 26 27 30
2713.800   584   -24   12   16 17 18 19 20 21 22 23 24 25 26 30
2713.600   547    -9   10   16 17 18 19 20 21 23 24 25 30
2713.400   863    41    8   16 17 18 19 21 23 24 25

4. Environment Variables

Environment Variables

Variable Name Usage API Main Line Column Evaluation Column Panel
Time
TIMEFRAME Environment. Chart timeframe period. Seconds. x
SESSION Segment. Session name. Input parameter reference. x
TIME_START Segment. Time range start. x x
TIME_END Segment. Time range end. x x
Time - Last real-time tick data
CTIME Segment. Time last tick. x x
Price
PRICE Level. Price high or low. x
PRICE_SET Segment. Price level size. Input parameter reference. x x
PRICE_MEDIAN Level. Price median. x
PRICE_OPEN Segment. Price open. x x
PRICE_HIGH Segment/Level. Price high. x x x
PRICE_LOW Segment/Level. Price low. x x x
PRICE_CLOSE Segment. Price close. x x
Price - Last real-time tick data
CPRICE Segment. Price last tick. x x
CPRICE_CHG Segment. Price change last tick. x
CPRICE_CHG_S Segment. Price change last tick. Class colored circle symbol. x
Volume - Volume Profile
VOLUME_TOTAL Segment/Level. Volume Total. x x x
VOLUME_BUY Segment/Level. Volume Buy. x x x
VOLUME_SELL Segment/Level. Volume Sell. x x x
VOLUME_DELTA Segment/Level. Volume Delta. Class signed number. x x x
VOLUME_DELTA_N Segment/Level. Volume Delta. x x x
VOLUME_DELTA_PCT Segment. Volume Delta Percentage. x x
VOLUME_COUNT Segment. Volume Count. Class signed number. x x
VOLUME_COUNT_N Segment. Volume Count. x x
VOLUME_COUNT_PCT Segment. Volume Count Percentage. x x
VOLUME_COUNT_BUY Segment. Volume Count Buy. x x
VOLUME_COUNT_SELL Segment. Volume Count Sell. x x
Price - Volume Profile
VP_LOW Segment. Volume Profile Low. x x x
VP_HIGH Segment. Volume Profile High. x x x
VP_RANGE Segment. Volume Profile Range size. Symbol points. x x
VP_MEDIAN Segment. Volume Profile Median. x x x
VP_BALANCE Segment. Volume Profile Balance. x x x
VP_POC Level. Volume Profile Point of Control. x
VP_POC_MEDIAN Segment. Volume Profile Point of Control. x x x
VP_POC_LOW Segment. Volume Profile Point of Control Low. x x x
VP_POC_HIGH Segment. Volume Profile Point of Control High. x x x
VP_VA_LOW Segment/Level. Volume Profile Value Area Low. x x x x
VP_VA_HIGH Segment/Level. Volume Profile Value Area High. x x x x
VP_VA_RANGE Segment. Volume Profile Value Area Range size. Symbol points. x x
HVN Level. Volume Profile High Volume Nodes. x
LVN Level. Volume Profile Low Volume Nodes. x
Volume - Volume Profile - Last real-time tick data
CVOLUME_TOTAL Segment. Volume Total last tick. x x
CVOLUME_BUY Segment. Volume Buy last tick. x x
CVOLUME_SELL Segment. Volume Sell last tick. x x
CVOLUME_DELTA Segment. Volume Delta last tick. Class signed number. x x
CVOLUME_DELTA_N Segment. Volume Delta last tick. x x
CVOLUME_DELTA_S Segment. Volume Delta last tick. Class colored circle symbol. x
Volume - Volume Profile - Last real-time bar data
BVOLUME_TOTAL Segment. Volume Total last bar. x x
BVOLUME_BUY Segment. Volume Buy last bar. x x
BVOLUME_SELL Segment. Volume Sell last bar. x x
BVOLUME_DELTA Segment. Volume Delta last bar. Class signed number. x x
BVOLUME_DELTA_N Segment. Volume Delta last bar. x x
BVOLUME_DELTA_AVG Segment. Volume Delta Average last bar. x x
TPO - Market Profile TPO
TPO_SET Segment. TPO period amount. Input parameter reference. x x
TPO_TIME Segment. TPO period size. Seconds. x x
TPO_TIME_L Segment. TPO period size. Short formatted literal. x
TPO_TIME_LL Segment. TPO period size. Long formatted literal. x
TPO_TOTAL Segment/Level. TPO Total. x x x
TPO_INDEX Level. TPO period indices. Numbers array. x
TPO_COUNT Segment. TPO Count. Class signed number. x x
TPO_COUNT_N Segment. TPO Count. x x
TPO_COUNT_PCT Segment. TPO Count Percentage. x x
TPO_COUNT_BUY Segment. TPO Count Buy. x x
TPO_COUNT_SELL Segment. TPO Count Sell. x x
Price - Market Profile TPO
MP_LOW Segment. Market Profile TPO Low. x x x
MP_HIGH Segment. Market Profile TPO High. x x x
MP_RANGE Segment. Market Profile TPO Range size. Symbol points. x x
MP_MEDIAN Segment. Market Profile TPO Median. x x x
MP_BALANCE Segment. Market Profile TPO Balance. x x x
MP_BODY Level. Market Profile TPO Body. x
MP_BODY_LOW Segment. Market Profile TPO Body Low. x x
MP_BODY_HIGH Segment. Market Profile TPO Body High. x x
MP_TAIL Level. Market Profile TPO Tail. x
MP_POC Level. Market Profile TPO Point of Control. x
MP_POC_MEDIAN Segment. Market Profile TPO Point of Control. x x x
MP_POC_LOW Segment. Market Profile TPO Point of Control Low. x x x
MP_POC_HIGH Segment. Market Profile TPO Point of Control High. x x x
MP_VA_LOW Segment/Level. Market Profile TPO Value Area Low. x x x x
MP_VA_HIGH Segment/Level. Market Profile TPO Value Area High. x x x x
MP_VA_RANGE Segment. Market Profile TPO Value Area Range size. Symbol points. x x
HVN Level. Market Profile TPO High Volumes Nodes. x
LVN Level. Market Profile TPO Low Volumes Nodes. x
Price - Initial Balance
IB_LOW Segment. Initial Balance Low. x x x
IB_HIGH Segment. Initial Balance High. x x x
IB_RANGE Segment. Initial Balance Range size. Symbol points. x x
Price - Volume Weighted Average Price
VWAP Segment. Volume Weighted Average Price. x x x
Volume - Depth Of Market *
VOLUME_PENDING Level. Depth Of Market Volume Pending Buy and Sell. x
VOLUME_PENDING_BUY Level. Depth Of Market Volume Pending Buy. x
VOLUME_PENDING_SELL Level. Depth Of Market Volume Pending Sell. x
Miscellaneous
TC Environment. Distribution tick count. x x
RSIZE Environment. Distribution tick data count. x x

* Available via the Data Source API

Control API Global Variables

Control indicator instances operating on the terminal. Selectively control by prefixing environment name or appending chart ID, uppercase underscore separated. Control API variables are used as booleans with the GlobalVariableCheck function, any specified value is ignored.

Variable Name Usage
VBP_CTRL_INITInitialize Indicator
VBP_CTRL_SEGMENT_RANGE *Segment Range

* Available with flexible range segmentation

Example: Code sample to control indicator instance with environment name 'Env1' with the GlobalVariable function GlobalVariableSet(StringFormat("VBP_%s_CTRL_SEGMENT_RANGE","ENV1"),NULL); Example: Code sample to control indicator instance of the current chart with the GlobalVariable function GlobalVariableSet(StringFormat("VBP_CTRL_INIT_%s",(string)ChartID()),NULL);

References
"Global Variables of the Terminal - MQL5 Reference" https://www.mql5.com/en/docs/globals
"Global Variables of the Terminal - MQL4 Reference" https://docs.mql4.com/globals

5. Extension Parameters

Extension Parameters:  Tick Volumes module

Feed

enumenumeration
  • History Bars + Real-time Ticks
  • History Ticks + Real-time Ticks * Note: Extension output is cross-platform terminal compatible.

* Available for MetaTrader 5

Range

enum,uint,date/timeenumeration, unsigned integer, date/time
  • Specified Date/Time
  • Specified Days
  • Current Day
  • Current Week
  • Current Month

Output

strstring

Market Watch name for indicator API connection

Output Format

enumenumeration

Data Source file format.

  • 1
  • 4
  • 5

Output Rate

intinteger

Milliseconds file write rate.

Output Common Folder

boolboolean

Common Data Folder for shared use with all terminals installed on the operating system instead of the terminal directory location.

Output Time Offset

intinteger

Seconds.

Output Plan

enumenumeration

Tick data compression by price level range and time period. Note: For lossless compression respectively limit Output Plan Level and Output Plan Time to indicator Dataset Price Level and Dataset Market Profile TPO Period.

  • Performance
  • Balanced
  • Quality

Output Plan Range

date/timedate/time

Date/time picker. Range end. Default previous minute of initialization. Note: Implicitly set historical, and real-time data compression ranges might cause significant distribution changes on reinitialization.

Output Plan Level

uintunsigned integer

Symbol points. Maximum price range.

Output Plan Level

enumenumeration

Price level range inclusion.

  • High
  • Low

Output Plan Time

uintunsigned integer

Seconds. Maximum time period. Note: Real-time data compression is further limited by milliseconds set Output Rate.

Output Plan Time

enumenumeration

Historical data time period timestamp attribution.

  • First
  • Last

Extension Parameters:  Order Book - Time and Sales module

Feed

enumenumeration
  • History Ticks + Real-time Ticks * Note: Extension output is cross-platform terminal compatible.

* Available for MetaTrader 5

Range

enum,uint,date/timeenumeration, unsigned integer, date/time
  • Specified Date/Time
  • Specified Days
  • Current Day
  • Current Week
  • Current Month

Output

strstring

Market Watch name for indicator API connection.

Output Format

enumenumeration

Data Source file format.

  • 4
  • 5

Output Rate

intinteger

Milliseconds file write rate.

Output Common Folder

boolboolean

Common Data Folder for shared use with all terminals installed on the operating system instead of the terminal directory location.

Output Time Offset

intinteger

Seconds.

Output Plan

enumenumeration

Tick data compression by price level range and time period. Note: For lossless compression respectively limit Output Plan Level and Output Plan Time to indicator Dataset Price Level and Dataset Market Profile TPO Period.

  • Performance
  • Balanced
  • Quality

Output Plan Range

date/timedate/time

Date/time picker. Range end. Default previous minute of initialization. Note: Implicitly set historical, and real-time data compression ranges might cause significant distribution changes on reinitialization.

Output Plan Level

uintunsigned integer

Symbol points. Maximum price range.

Output Plan Level

enumenumeration

Price level range inclusion.

  • High
  • Low

Output Plan Time

uintunsigned integer

Seconds. Maximum time period. Note: Real-time data compression is further limited by milliseconds set Output Rate.

Output Plan Time

enumenumeration

Historical data time period timestamp attribution.

  • First
  • Last

Extension Parameters:  Order Book - Depth Of Market module

Feed

enumenumeration
  • Real-time Ticks * Note: Extension output is cross-platform terminal compatible.

* Available for MetaTrader 5

Output

strstring

Market Watch name for indicator API connection.

Output Time Offset

intinteger

Seconds.

Extension Parameters:  Traces module

Note: Alternatively use indicator line visualization of historical and developing price metrics, and additional styling parameters including for labels, with Highlight Main and Style Main Line Trace.

Multiple 'Traces' instances utilizing data from multiple distinct indicator instances on different chart timeframes

ID

strstring

Extension instance built time series data persistence on indicator dataset range changes and deinitialization. Note: With a user specified ID, to clear data a new chart must be used. To load data match metrics selection and order.

Data Environment

strstring

Data Environment name for indicator API connection.

Metric 1 to 23

enumenumeration
  • VP_HIGH
  • VP_LOW
  • VP_MEDIAN
  • VP_BALANCE
  • VP_POC_MEDIAN
  • VP_POC_HIGH
  • VP_POC_LOW
  • VP_VA_HIGH
  • VP_VA_LOW
  • MP_HIGH
  • MP_LOW
  • MP_MEDIAN
  • MP_BALANCE
  • MP_BODY_HIGH
  • MP_BODY_LOW
  • MP_POC_MEDIAN
  • MP_POC_HIGH
  • MP_POC_LOW
  • MP_VA_HIGH
  • MP_VA_LOW
  • IB_HIGH
  • IB_LOW
  • VWAP

Extension Parameters:  Events module

Name

strstring

Global Variable names are prefixed with 'VBP_EVENT', and if specified environment name, uppercase underscore separated. Segment index, starting at zero and omitted for first, is appended enclosed with brackets. Variable output is the conditions evaluation result a boolean value (0 or 1). Variable name appended with 'T", underscore separated, is time value in seconds elapsed since the event was last emitted, or empty value (-1) if not emitted. Note: For a snapshot of variables available to the terminal use command 'Global Variables' in the Tools menu. Example: Dynamically segment by events named 'VP_POC_CROSS_UP' and 'VP_POC_CROSS_DOWN'
set Segment to Specified Divisor
set Segment Divisor to VBP_%ID%_EVENT.DAT
attach Event Period extension instance to the chart:
Menubar > Insert > Indicator > Volume by Price Indicator > Segment Divisor > Event Period
set Output to VBP_%ID%_EVENT.DAT
set Default to 12h (also the maximum segment object width of the relative Style Main Size options)
set Event to VP_POC_CROSS_UP, VP_POC_CROSS_DOWN
Example: Code sample to access data of event named 'VP_POC_CROSS_UP' with the GlobalVariableGet function bool event_vp_poc_cross_up_is = (bool)GlobalVariableGet("VBP_EVENT_VP_POC_CROSS_UP");
int event_vp_poc_cross_up_time = (int)GlobalVariableGet("VBP_EVENT_VP_POC_CROSS_UP_T");
bool event_vp_poc_cross_up_was = !event_vp_poc_cross_up_is && event_vp_poc_cross_up_time != -1;

References
"Global Variables of the Terminal - MQL5 Reference" https://www.mql5.com/en/docs/globals
"Global Variables of the Terminal - MQL4 Reference" https://docs.mql4.com/globals

Iteration

strstring

Format: Bars, minutes, seconds and distribution tick rate (b, m, s and t). Environment event variable names comma separated. Example: Volume Point of Control cross events
attach two instances to the chart:
Menubar > Insert > Indicator > Volume by Price Indicator > Data Environment > Events
for the first instance:
set Name to VP_POC_CROSS_UP
set Iteration to VP_POC_CROSS_DOWN
set Condition 1 to CLOSE Greater Than VP_POC_HIGH
for the second instance:
set Name to VP_POC_CROSS_DOWN
set Iteration to VP_POC_CROSS_UP
set Condition 1 to CLOSE Less Than VP_POC_LOW
optionally, for time and price margins:
set Condition 1 Time to 15 (seconds)
set Condition 1 Right Value specific to applicable symbol price, e.g., +0.25 and -0.25 for each instance respectively

Condition 1 to 3 Data Environment

strstring

Data Environment name for indicator API connection. Note: To disable a condition set to false and use logical OR operator.

Condition 1 to 3 (Time)

intinteger

Seconds. Minimum time duration.

Condition 1 to 3 (Left Value) (Right Value)

enum,floatenumeration, float
  • OPEN
  • HIGH
  • LOW
  • CLOSE
  • VOLUME_TOTAL
  • VOLUME_DELTA
  • VOLUME_DELTA_N
  • VOLUME_DELTA_PCT
  • VOLUME_BUY
  • VOLUME_SELL
  • VOLUME_COUNT
  • VOLUME_COUNT_N
  • VOLUME_COUNT_PCT
  • VOLUME_COUNT_BUY
  • VOLUME_COUNT_SELL
  • CVOLUME_TOTAL
  • CVOLUME_DELTA
  • CVOLUME_DELTA_N
  • CVOLUME_BUY
  • CVOLUME_SELL
  • BVOLUME_TOTAL
  • BVOLUME_DELTA
  • BVOLUME_DELTA_N
  • BVOLUME_DELTA_AVG
  • BVOLUME_BUY
  • BVOLUME_SELL
  • VP_RANGE
  • VP_MEDIAN
  • VP_BALANCE
  • VP_POC_MEDIAN
  • VP_POC_LOW
  • VP_POC_HIGH
  • VP_VA_LOW
  • VP_VA_HIGH
  • VP_VA_RANGE
  • MP_RANGE
  • MP_MEDIAN
  • MP_BALANCE
  • MP_BODY_LOW
  • MP_BODY_HIGH
  • MP_POC_MEDIAN
  • MP_POC_LOW
  • MP_POC_HIGH
  • MP_VA_LOW
  • MP_VA_HIGH
  • MP_VA_RANGE
  • TPO_TOTAL
  • TPO_COUNT
  • TPO_COUNT_N
  • TPO_COUNT_PCT
  • TPO_COUNT_BUY
  • TPO_COUNT_SELL
  • IB_LOW
  • IB_HIGH
  • IB_RANGE
  • VWAP
  • Specified Value Format: Number or environment variable name. To shift extension instance chart timeframe period built time series data append name with index number enclosed with brackets. Example: Volume Point of Control cross up event condition
    set Left Value to Specified Value and EVENT_VP_POC_CROSS_UP
    set Comparison Operator to Equals To
    set Right Value to 1 (true)
    optionally, for time margin:
    set Left Value to Specified Value and EVENT_VP_POC_CROSS_UP_T
    set Comparison Operator to Greater than
    set Right Value to 15 (seconds)

Condition 1 to 3 (Left Value | Math Operation) (Right Value | Math Operation)

strstring

Optional math operation for values from enumeration. Format: Single arithmetic operator (+, -, * and /) and right operand value.

Condition 1 to 3 (Comparison Operator)

enumenumeration
  • Equal to
  • Not equal to
  • Less than
  • Greater than

Condition 1-2, 2-3 (Logical Operator)

enumenumeration
  • And
  • Or

Extension Parameters:  Notifications module

Name

strstring

Message variable NAME.

Iteration

strstring

Format: Bars, minutes, seconds and distribution tick rate (b, m, s and t). Environment event variable names comma separated. Example: Volume Point of Control cross alerts
attach two instances to the chart:
Menubar > Insert > Indicator > Volume by Price Indicator > Data Environment > Notifications
for the first instance:
set Name to VP_POC_CROSS_UP
set Iteration to VP_POC_CROSS_DOWN
set Condition 1 to CLOSE Greater Than VP_POC_HIGH
for the second instance:
set Name to VP_POC_CROSS_DOWN
set Iteration to VP_POC_CROSS_UP
set Condition 1 to CLOSE Less Than VP_POC_LOW
for both instances:
set Message Alert to true
set Data Environment Event to true (to create event used for iteration by each other instance)
optionally, for time and price margins:
set Condition 1 Time to 15 (seconds)
set Condition 1 Right Value specific to applicable symbol price, e.g., +0.25 and -0.25 for each instance respectively

Condition 1 to 3 Message

strstring

Format: Message and chart (ID, SYMBOL, TIMEFRAME, TIMECURRENT and TIMELOCAL) variable names enclosed with per cent sign (%). Use a semicolon (;) to specify line breaks for applicable message types.

Condition 1 to 3 Data Environment

strstring

Data Environment name for indicator API connection. Message variable ENVIRONMENT. Note: To disable a condition set to false and use logical OR operator.

Condition 1 to 3 (Time)

intinteger

Seconds. Minimum time duration. Message variable T_VALUE.

Condition 1 to 3 (Left Value) (Right Value)

enum,floatenumeration, float

Message variable LEFT_VALUE_L and RIGHT_VALUE_L for operation literals, and LEFT_VALUE and RIGHT_VALUE for product values.

  • OPEN
  • HIGH
  • LOW
  • CLOSE
  • VOLUME_TOTAL
  • VOLUME_DELTA
  • VOLUME_DELTA_N
  • VOLUME_DELTA_PCT
  • VOLUME_BUY
  • VOLUME_SELL
  • VOLUME_COUNT
  • VOLUME_COUNT_N
  • VOLUME_COUNT_PCT
  • VOLUME_COUNT_BUY
  • VOLUME_COUNT_SELL
  • CVOLUME_TOTAL
  • CVOLUME_DELTA
  • CVOLUME_DELTA_N
  • CVOLUME_BUY
  • CVOLUME_SELL
  • BVOLUME_TOTAL
  • BVOLUME_DELTA
  • BVOLUME_DELTA_N
  • BVOLUME_DELTA_AVG
  • BVOLUME_BUY
  • BVOLUME_SELL
  • VP_RANGE
  • VP_MEDIAN
  • VP_BALANCE
  • VP_POC_MEDIAN
  • VP_POC_LOW
  • VP_POC_HIGH
  • VP_VA_LOW
  • VP_VA_HIGH
  • VP_VA_RANGE
  • MP_RANGE
  • MP_MEDIAN
  • MP_BALANCE
  • MP_BODY_LOW
  • MP_BODY_HIGH
  • MP_POC_MEDIAN
  • MP_POC_LOW
  • MP_POC_HIGH
  • MP_VA_LOW
  • MP_VA_HIGH
  • MP_VA_RANGE
  • TPO_TOTAL
  • TPO_COUNT
  • TPO_COUNT_N
  • TPO_COUNT_PCT
  • TPO_COUNT_BUY
  • TPO_COUNT_SELL
  • IB_LOW
  • IB_HIGH
  • IB_RANGE
  • VWAP
  • Specified Value Format: Number or environment variable name. To shift extension instance chart timeframe period built time series data append name with index number enclosed with brackets. Example: Volume Point of Control cross up event condition
    set Left Value to Specified Value and EVENT_VP_POC_CROSS_UP
    set Comparison Operator to Equals To
    set Right Value to 1 (true)
    optionally, for time margin:
    set Left Value to Specified Value and EVENT_VP_POC_CROSS_UP_T
    set Comparison Operator to Greater than
    set Right Value to 15 (seconds)

Condition 1 to 3 (Left Value | Math Operation) (Right Value | Math Operation)

strstring

Optional math operation for values from enumeration. Format: Single arithmetic operator (+, -, * and /) and right operand value.

Condition 1 to 3 (Comparison Operator)

enumenumeration

Message variable OPERATION_L for operation literal and OPERATION for symbolic value.

  • Equal to
  • Not equal to
  • Less than
  • Greater than

Condition 1-2, 2-3 (Logical Operator)

enumenumeration
  • And
  • Or

Sound Alert

strstring

To enable/disable set to true/false, or specify a file name. Default 'alert.wav'. Note: Sound files are loaded from the MQL4|MQL5\Sounds folder of the terminal directory.

Message Alert

boolboolean

Pop-up window. Note: Alert window pop-up events are entered in the log.

Message Log

boolboolean

Note: For the log viewer use command 'Terminal/Toolbox' in the View menu and select the 'Experts' tab. Use command 'Viewer' in the context menu (right mouse click) of the tab to open the window to request and search records by filter string.

Message Push

boolboolean

Set MetaQuotes ID via the terminal options window (keyboard shortcut Ctrl-O) 'Notifications' tab.

References
"Push Notifications - MetaTrader 5 iPhone/iPad Help" https://www.metatrader5.com/en/mobile-trading/android/help/push
"Push Notifications - MetaTrader 5 Android Help" https://www.metatrader5.com/en/mobile-trading/iphone/help/push
"Notifications - MetaTrader 4 Help" https://www.metatrader4.com/en/trading-platform/help/setup/settings_notifications

Message Email

boolboolean

Set SMTP and email address via the terminal options window (keyboard shortcut Ctrl-O) 'Email' tab.

References
"Platform Settings - MetaTrader 5 Help" https://www.metatrader5.com/en/terminal/help/startworking/settings#mail
"Email - MetaTrader 4 Help" https://www.metatrader4.com/en/trading-platform/help/setup/setup_email

Data Environment Event

boolboolean

Data Environment Event. Global Variables output. Global Variable name is Name prefixed with 'VBP_EVENT', and if specified environment name, uppercase underscore separated. Segment index, starting at zero and omitted for first, is appended enclosed with brackets. Variable output is the conditions evaluation result a boolean value (0 or 1). Variable name appended with 'T", underscore separated, is time value in seconds elapsed since the event was last emitted, or empty value (-1) if not emitted. Note: For a snapshot of variables available to the terminal use command 'Global Variables' in the Tools menu.

Chart Picture

boolboolean

Save chart as picture in PNG, GIF or Bitmap file format. Attach Chart Pictures extension instance in Service mode. Select format and specify file name via the extension properties window 'Inputs' tab. Note: Uses the Windows API (user32.dll), requires explicit authorization with 'Allow DLL Imports' via the extension properties window 'Common/Dependencies' tab.

References
"GetClientRect function (winuser.h) - Win32 apps | Microsoft Learn" https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getclientrect

Chart Object

boolboolean
'Chart Object' = 'true', 'Type' = 'Arrow Up', 'Anchor' = 'Bottom' and 'Price' = 'Value Right'

Note: Delete objects via 'Object List' (keyboard shortcut Ctrl-B) in the context menu (right mouse click) of the chart window.

Style Chart Object Type

enumenumeration
  • Arrow Up
  • Arrow Down
  • Check Sign
  • Stop Sign
  • Price Label Left
  • Price Label Right

Style Chart Object Anchor

enumenumeration
  • Top
  • Bottom

Style Chart Object Price

enumenumeration

Last Condition Value Left or Right with logical AND operator use.

  • Open
  • High
  • Low
  • Close
  • Value Left
  • Value Right

Style Chart Object Size

intinteger

Style Chart Object Color

colorcolor

Extension Parameters:  Reports module

Name

strstring

Report variable NAME.

Data Environment

strstring

Data Environment name for indicator API connection. Report variable ENVIRONMENT.

Segment

strstring

Segment number, time series indexing, starting at one for the last segment. If historical unloads after output. Report variable SEGMENT. Format: Comma separated or by hyphen (-) to specify as range.

Output

strstring

File name.

Output Format

enumenumeration

Open HTML and CSV in browser and spreadsheet applications. Parse CSV and JSON files, and execute SQL statement files to create SQL databases, to query and access application format data programmatically. Note: Resources include Database extension to export directly as SQL database in SQLite application format.

  • HTML
  • CSV
  • JSON
  • SQL

References
"HTML: HyperText Markup Language | MDN" https://developer.mozilla.org/en-US/docs/Web/HTML
"Import CSV data to a spreadsheet | Google for Developers" https://developers.google.com/apps-script/samples/automations/import-csv-sheets
"Spreadsheet Project - Apache OpenOffice - The Free and Open Productivity Suite" https://www.openoffice.org/sc/
"JSON - JavaScript | MDN" https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON
"SQLite - Create A New Database Using The Command Line Interface" https://www.sqlite.org/quickstart.html
"MySQL :: MySQL Tutorial :: 4 Creating and Using a Database" https://dev.mysql.com/doc/mysql-tutorial-excerpt/5.7/en/database-use.html
"Create a database - SQL Server | Microsoft Learn" https://learn.microsoft.com/en-us/sql/relational-databases/databases/create-a-database?view=sql-server-ver16
"SQL Language Reference - Database" https://docs.oracle.com/en/database/oracle/oracle-database/18/sqlrf/toc.htm

Output Rate

uintunsigned integer

Seconds. If divisible by 60 output is timed at the start of each minute and reported distribution tick time is rounded down to the minute. Zero for milliseconds distribution tick rate.

Output Template

strstring

HTML, CSV, JSON or SQL template file name. Default 'report.html', 'report.csv', 'report.json' or 'report.sql'. File Format: Report and environment variable names enclosed with per cent sign (%). For signed and unsigned change values append 'CHG' and 'CHG_N' underscore separated to names. HTML format 'CHG_L' and 'CHG_S' for literal booleans to use with CSS and SVG link attributes with symbols. Note: SQL CREATE TABLE statement is automatically generated from template file INSERT statement if output file does not exist.

'Output Format' = 'HTML' and 'Output Template' = 'report.html'. Cell background fill color and arrow symbols with CHG_L and CHG_S appended to variable names.

References
"CSS: Cascading Style Sheets - MDN Web Docs" https://developer.mozilla.org/en-US/docs/Web/CSS
"href - SVG: Scalable Vector Graphics | MDN" https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/href

Extension Parameters:  Database module

Note: MetaTrader 5 has builtins for all essential SQL database engine functions. For MetaTrader 4 uses the Windows and SQLite APIs (kernel32.dll and sqlite3.dll), requires explicit authorization with 'Allow DLL Imports' via the extension properties window 'Common' tab. DLL files are loaded from the Windows System32 or MQL4\Libraries application level folders.

References
"Working with databases - MQL5 Reference" https://www.mql5.com/en/docs/database
"SQLite Download Page - Precompiled Binaries for Windows - 32-bit DLL (x86)" https://www.sqlite.org/download.html#win32

Name

strstring

Table name.

Data Environment

strstring

Data Environment name for indicator API connection.

Segment

strstring

Segment number, time series indexing, starting at one for the last segment. If historical unloads after output. Format: Comma separated or by hyphen (-) to specify as range.

Output

strstring

File name. Example: Code sample to access data with the Database functions* int database = DatabaseOpen("<File_Name>.sqlite",DATABASE_OPEN_READONLY);
int strings = DatabasePrint(database,"SELECT * FROM '<Table_Name>'",DATABASE_PRINT_STRINGS_RIGHT);
DatabaseClose(database);

* Available for MetaTrader 5

References
"Working with databases - MQL5 Reference" https://www.mql5.com/en/docs/database

Output Rate

uintunsigned integer

Seconds. If divisible by 60 output is timed at the start of each minute and reported distribution tick time is rounded down to the minute. Zero for milliseconds distribution tick rate.

Extension Parameters:  Chart Scale Fix Auto module

Note: For maximized charts, window height is by various factors as operating system taskbar size, fonts settings, scaling mechanisms, and terminal toolbar arrangement, for example use Chart Subwindow, or any other subwindow, as a ruler to adjust.

Best Practices
Base Level Symbol Points on price level size of default automatic chart price scale, e.g., for 0.47633000 of a two digit symbol:
For slight padding of the visible segment ranges, set 45.
For slight clipping of the visible segment ranges, set 50.
To allow higher values in multiples of, non-negative Level Threshold Out.
To allow lower values, e.g., down to a tenth set 5 (50 / 10 = 5), and non-negative Level Threshold In.

Level Symbol Points

intinteger

Minimum. Note: If chart dimensions are invalid for specified price level size an exact size in multiples is tried to be set, if not set, price level size is invalid for chart price range, inspect actual price level size with Panel preset Dataset Price Level, and get details in the log with Level Precision Validation.

Level Pixels

intinteger

Level Threshold In/Out

intinteger

Limit automatic price scale by price range size of the visible, or object width based, time range, in amount of price levels, moving inside, i.e., smaller, and outside, i.e., larger, of initial range. Set to -1 for no reset, to 0 for no limit.

Level Precision Validation

boolboolean

Chart dimensions validation log. Note: For the log viewer use command 'Terminal/Toolbox' in the View menu and select the 'Experts' tab. Resources include Chart Scale Fix (type 'Script') extension to validate chart dimensions and adjust by on-chart scale.

Position

boolboolean

Reposition price scale if current price moves outside of visible range.

Extension Parameters:  Volume by Time

Note: Order Book extension to feed real-time and historical trade operation tick data with volume classification by order type. Tick Volumes extension to feed real-time and historical bid price tick data with volume classification by price action.

Object

enumenumeration
  • Histogram
  • Bubble Graph

Segment

boolboolean

Single segment for Dataset Range or separate ranges by Dataset Segment.

Time Period

enum,uintenumeration, unsigned integer
  • Specified Bars
  • 1 Minute
  • 5 Minutes
  • 15 Minutes
  • 30 Minutes
  • 1 Hour
  • 4 Hours
  • Daily
  • Weekly

Highlight

enumenumeration
  • Total - Gradient Horizontal
  • Total - Gradient Vertical
  • Delta
  • Buy/Sell
  • Buy/Sell - Ordered
  • Delta - Balance

Highlight Opacity

enumenumeration

Time period value color opacity visualization.

Color (positive, total) (negative)

colorcolor

Color Border (positive, total) (negative)

colorcolor

Color Gradient

enum,stringenumeration, string
  • Blue-Red
  • Yellow-Red
  • Green-Red
  • Blue-Green-Red
  • Blue-Green-Orange
  • Blue-Purple
  • Blue-Purple-Yellow
  • Specified Format: Web color name, MQL literal RGB or integer values. Comma or hyphen separated.

References
"Web Colors - MQL5 Reference" https://www.mql5.com/en/docs/constants/objectconstants/webcolors
"Web Colors - MQL4 Reference" https://docs.mql4.com/constants/objectconstants/webcolors
"Color Type - MQL5 Reference" https://www.mql5.com/en/docs/basis/types/integer/color
"Color Type - MQL4 Reference" https://docs.mql4.com/basis/types/integer/color

Anchor Histogram Price

boolboolean

Anchor histogram to bottom of range selection with Range Drag & Drop Time/Price.

Anchor Bubble

enumenumeration
  • Start
  • End
  • Median

Anchor Bubble Price

enumenumeration
  • Close
  • High
  • Low
  • Median
  • Axis

Layer

enumenumeration
  • Foreground
  • Background

Subwindow

enumenumeration

Window index, starting at one for the first subwindow. Default zero is disabled. Note: Chart Subwindow extension for dedicated subwindow.

Size

enum,uintenumeration, unsigned integer
  • Small
  • Medium
  • Large
  • Specified Pixels

Size Window

enumenumeration

Window absolute or dataset highest time period value relation.

  • Relative
  • Absolute

Border

boolboolean

Border Merge Histogram

boolboolean

Histogram bar borders overlap, i.e., 1 pixel inaccuracy, for aesthetics. Effective if time period size is greater than 2 pixels.

6. Appendix

Appendix

Parameter Naming Convention and Defaults

The indicator has a large amount of input parameters which increases further by extensions. Convention is to derive parameter function and usage for most from the name and list order itself alone. Therefore the specification list in this user manual is non-exhaustive. On the indicator properties window 'Inputs' tab, and throughout this user manual, full parameter names are deduced by section names. With all features, to improve accessibility certain extensions are solely to decrease the amount of parameters in the main interface and section further.

In most cases use is only of the Object, Dataset and Highlight section parameters, and a select amount of applicable Style subsection parameters. For basic data I/O extension connections only a single parameter switch is required. The input parameter lists provide quick reference to each. For compatibity on all chart timeframes, due to the amount of parameters for all features and customizability, default settings are counter-intuitive for users. Create and save custom defaults to .set files for quick setup.

Files and Folder Structures

Indicator configuration and data files are located in a subfolder named 'Volume by Price Indicator' in Data Folder MQL4|MQL5\Files of the terminal directory. Optionally, for selected functions data files in the Common Data Folder for shared use with other terminals on the operating system. For significant distinction, all indicator managed file names are uppercase prefixed with 'VBP'. Similarly optional, extensions and resources are located in 'Volume by Price Indicator' named folders in each respective application and file type folder, i.e., Templates, Experts, Indicators, Scripts and Include. Access to files by MetaTrader 4 and 5 indicators is strictly controlled, terminals utilize the highest user security and privacy standards with a file sandbox for all applications types, no read or write permissions outside of the MQL4|MQL5\Files subfolders. For quick access to the terminal directory use command 'Open Data Folder' in the File menu of the terminal, for the Common Data Folder use command 'Open Common Data Folder' in the File menu of the MetaEditor.

Values of text input parameters can be set by reference to a configuration file. Specified paths are relative with optional use of chart property names for automatic data and configuration association, e.g., Market Profile TPO marker configuration Style Main Marker Character Letter = Market Profile TPO Letters.ini and Style Highlight Marker Color Sequence = Market Profile TPO Colors.ini, or dynamic segmentation configuration with automatic association by chart symbol name and timeframe period variables Dataset Segment Divisor = %SYMBOL%_%TIMEFRAME%.ini.

Platform Implementations and Indicator Limitations

MetaTrader 5 is the next-generation platform with many advantages over its predecessor. For the indicator, implemented are only historical tick data, real trade volumes, and additional chart timeframe periods. Through shims, extensions and imports, on both platforms the indicator has identical technical functionality, e.g., for tick-by-tick data and trade volumes extended data structures and the input data program interface, Utilization of tick data and trade volume order type classes is via extensions.

The additional chart timeframe periods are exclusively supported for MetaTrader 5. Indicator Buffers, and styling via the 'Colors' tab, as for standard and most custom indicators is not implemented. An extension is included to output environment variables as the buffers, with the added advantage of selection, ordering, labeling and stateless functionalities, as well as persistant data storage on disk.

Reporting Bugs

Please report all bugs found. But first, make sure that it really is a bug, and that it appears in the latest version. The latest version is available via the Toolbox \ Market \ Purchased tab. Once you have determined that a bug actually exists, submit it via email at report@volumebyprice.com. If you have a fix, or suggestions and 'philosophical' bug reports please mail those as well!

All bug reports should include:

  • Version number
  • Hardware and operating system
  • Platform and terminal version numbers
  • Description of bug behaviour
  • Log file
  • Configuration file or 'recipe' which exercises the bug and may be used to reproduce it

Version: 10.98 · Last updated 2025-02-23 UTC