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.

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:
menubar insert indicators custom volume by price

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

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

For the dataset, set range, segmentation, price level and TPO parameters, e.g., Dataset Range = 10 Days, Dataset Segment = Session Chart Symbol, Dataset Price Level = 100 Symbol Points and Dataset Market Profile TPO = 48.

For further indications, select by on-object visualization, e.g., Indication Main Market Profile TPO = Sequence and Indication Column Mini Volume Profile = Value Area, and/or by visualization method, e.g., Indication Main Marker POC = Box Border and Indication Main Marker VA = Box Border.

Set styling parameters by object type and/or visualization method. For segment relational and/or absolute indications for histogram and line graph object types, e.g., Style Column Size Mini Histogram = Relative. Indication context class color parameters, e.g., Style Main Color (positive) and Style Main Color (negative) for Indication Main Volume Profile = Value Area to indicate Value Area and the range(s) outside, or for Indication Main Volume Profile = Delta prices higher and lower. Set color list parameters by presets, or specify as text value to type or create with included resources, e.g., for Market Profile TPO green color for first marker, white for second and gray for third (and remaining markers) Style Main Marker Color Sequence = Green,White,Gray.

Data Source API parameters for advanced data connectivity and integration with third-party data feeds and exports. Use MetaTrader 5 Time and Sales and Depth Of Market data with included Order Book extension.

Data Environment API for programmatic access to dimensions and metrics. Advanced selection and use of metrics by specifying environment variable names as values of text input parameters.

Object

Main

  • 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

Minimum price level size for text to display is 8 pixels. Note: Align text characters vertically with a monospaced font (e.g., set Style Column Font Text to Consolas). Note: Style columns with Style Column Fill and/or Style Column Border to display as stacked bar or table. Example: Color visualization
set Column to Volume Profile Delta or Volume Profile Positive ; Volume Profile Negative
set Style Column Fill to true - Class
Example: Color fill opacity visualization
set Column to Volume Profile Total
set Style Column Fill to true - Class
set Indication Column Volume Profile to Total - Opacity

  • Volume Profile Total
  • Market Profile TPO Total
  • Volume Profile Total ; Market Profile TPO Total
  • Volume Profile Delta
  • Volume Profile Positive ; Volume Profile Negative
  • Market Profile TPO Letters ; Market Profile TPO Total
  • Market Profile TPO Indices ; Market Profile TPO Total
  • Price Median
  • Price Low ; Price High
  • Volume Profile Total ; Price Median
  • Market Profile TPO Total ; Price Median
  • Specified Format: Environment variable names enclosed with per cent sign (%). Use a semicolon (;) to specify columns. Example: Set Column to %PRICE_MEDIAN%;%VOLUME_TOTAL%;%TPO_TOTAL%

Column Mini

  • Volume Profile - Histogram

Background

  • Volume Profile

Panel

  • Summary
  • Extended Summary
  • Data Coverage
  • Price Level and TPO Precision
  • Specified Format: Environment variable names enclosed with per cent sign (%). Use a semicolon (;) to specify line breaks, for horizontal rules three three hyphens and a semicolon (---;). Set direct or by file. Values longer than 229 characters can only be set by file. Note: Resource pack includes example and built-in preset reference configuration files. Example: Set Panel to %TIME_START%-%TIME_END%;TPOC=%MP_POC_MEDIAN% VPOC=%VP_POC_MEDIAN% Example: Set Panel to Folder\Panel.txt
    create file named Panel.txt at path C:\Program Files\MetaTrader 5\MQL5\Files\Folder\Panel.txt
    edit file to content %TIME_START%-%TIME_END%;TPOC=%MP_POC_MEDIAN% VPOC=%VP_POC_MEDIAN%

Grid

Minimum price level size to display is 3 pixels.

  • Segment
  • Window

Separator

  • Start
  • End
  • Start / End

Object Position

Anchor Main

  • Window Note: Window side with Direction Main.
  • Segment - Start
  • Segment - End

Anchor Column

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

Anchor Column Mini

  • Right
  • Left

Anchor Panel

  • Window
  • Segment / Window
  • Segment / Segment - Bottom

Direction Main

  • Right
  • Left

Direction Column Mini

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

Offset Main

Offset Column

Margin Column Mini

Offset Panel

Layer Main

Note: Toggle with keyboard shortcut B. Control native price chart layer with Chart on foreground via the chart properties window (keyboard shortcut F8) 'Common' tab.

  • Foreground
  • Background

Layer Column

  • Foreground
  • Background

Subwindow Panel

Note: Extension pack includes Window application file for dedicated sub window.

Dataset

Feed

Volume Profile

  • Real Volume
  • Tick Volume

Market Profile TPO

Amount of indexed TPO periods. TPO period size is segment range divided by amount of TPO periods. Block marker structures up to 65025. Letter marker structures up to 230. Default is 52 (upper and lower case alphabet) increase and/or customize character sequence with Style Main Marker Character Letter. Note: Inspect TPO period size with Panel preset Price Level and TPO Precision. Example: 15-minute TPO for Europe, London (07:00-16:00, Mon-Fri)
calculate periods required by dividing session duration by required TPO period size
(9-hour session duration / 15-minute TPO = 36)
set Market Profile TPO to 36

Price Real-time

Real-time price data distributions. Stored in memory. Reinitialization on dataset range and price level grid changes. Note: Inspect real-time price data coverage with Panel preset Data Coverage.

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

Price History Timeframe

Historical price data distributions. Fallback to higher timeframes if unavailable. Note: Inspect historical price data coverage with Panel preset Data Coverage. Note: Control the terminal's historical data limit with Max bars via the options window (keyboard shortcut Ctrl-O) 'Charts' tab. To preload historical data and build time series data before attaching an indicator instance to a chart request the required range(s) via the terminal once.

  • Chart Timeframe
  • All Available 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)

Price History Plan

Historical data timeframe period limit by maximum bars and coverage.

  • Performance
  • Standard
  • Quality

Price Level

Adjusted by chart height and price scale for 'pixel perfect' price level visualizations. Underlying price calculations with not less than 8 digits. Minimum price level size for Market Profile TPO marker structures is 8 pixels. Note: Inspect actual price level size in pixels and symbol points with Panel preset Price Level and TPO Precision. If actual size not exactly matches Specified Symbol Points it can be set by adjusting chart height and/or price scale. This is a general software/hardware limitation regarding the 'pixel perfect' concept.

  • Specified Pixels
  • Specified Symbol Points

Price Level Grid

Implicit or explicit fix by fractional part of decimal number. Note: Maintain price level grid with a price level size greater than or equal to one symbol point of chart with dimensions where price level size in symbol points is divisible by price level size in pixels. Control chart price scale with Scale Fix via the chart properties window (keyboard shortcut F8) 'Common' tab.

  • Dynamic
  • Static

Range

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

Range, Date/Time

Range, Days

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, Bars

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, Minutes

Adjusted for chart timeframe period. 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

Reinitialize relative range selections on end. Note: Manually reinitialize range with keyboard shortcut R.

Segment

Time and chart timeframe period based methods. Adjusted dataset and segment ranges respectively for division without remainder.

  • Specified Session
  • Specified Divisor Format: Prefix with equal sign (=) to specify as product in seconds, minutes, hours or days (s, m, h and d). Example: Single segment composite, previous two days
    set Range, Days to 3:2
    set Segment to Specified Divisor
    set Segment Divisor to 1
    Example: Single segment composite, previous two day sessions
    set Range, Days to 3:2
    set Segment to Specified Session
    set Segment Session Group to 2
    Example: 12 x 4-hour segments, previous and current day
    set Range, Days to 2
    set Segment to Specified Divisor
    set Segment Divisor to =4h

Segment Session

Chart timeframe up to Daily (D1). Built-in presets Coordinated Universal Time (UTC) intended. For charts with high scale and timeframe Safe Mode Segment Width might need to be set to a lower value. Default minimum segment width to display is 24 pixels.

  • Chart Symbol
  • Pacific, Sydney (22:00-07:00, Sun/Mon-Thu/Fri)
  • Asia, Tokyo (23:00-08:00, Sun/Mon-Thu/Fri)
  • Europe, London (07:00-16:00, Mon-Fri)
  • South-America, Sao Paolo (11:00-17:15, Mon-Fri)
  • North-America, New York (12:00-20:00, Mon-Fri)
  • Custom Format: 24-hour (hh:mm). Week day names (full or abbreviated) comma separated or by hyphen (-) to specify as range.

Segment Session Offset

Offset custom and built-in preset sessions.

Segment Session Group

Concatenate session filtered data as single segment.

Segment Session Group TPO

Indexing of TPO periods.

  • Group
  • Session

Indication

Main Volume Profile

  • Value Area
  • Total - Gradient
  • Delta
  • Delta - Stack
  • Delta - Stack Ordered

Main Market Profile TPO

  • Value Area
  • Total - Gradient
  • Sequence
  • Sequence - Gradient

Column Volume Profile

Note: Color fill column cells with Style Column Fill.

  • Total - Opacity
  • Delta - Opacity

Column Mini Volume Profile

  • Nodes
  • Value Area
  • Delta
  • Delta - Stack

Background Volume Profile

  • Total - Gradient
  • Total - Opacity
  • Total - Contour
  • Delta - Opacity
  • Delta - Contour

Indication Main

Current

  • true
  • true - Line

Median

  • true - Line

Balance

  • true - Line

Imbalance

  • true - Background Fill

POC

Point of Control.

  • true
  • true - Line Note: Line visualization of both Volume Profile and Market Profile TPO metrics with Indication Main Custom.
  • true - Background Fill

VA

Value Area. Note: On-object visualization with Indication Main.

  • true - Background Fill

VAH/VAL

Value Area High and Low.

  • true
  • true - Line Note: Line visualization of both Volume Profile and Market Profile TPO metrics with Indication Main Custom.

LVN

Low Volume Nodes. Volume Profile or Market Profile TPO by Evaluation LVN/HVN.

  • true
  • true - Background Fill

HVN

High Volume Nodes. Volume Profile or Market Profile TPO by Evaluation LVN/HVN.

  • true
  • true - Background Fill

IB

Initial Balance.

  • true
  • true - Line

OHLC

Open, High, Low and Close.

VWAP

Volume Weighted Average Price.

Custom

Line visualization of metrics. Format: Environment variable names comma separated. Optional custom text labels colon (:) separated, for style append name-value pairs (propSize, propOpacity and/or propColor) semicolon (;) separated. Set direct or by file. Values longer than 229 characters can only be set by file. Note: Resource pack includes Main Line application file for user interface to create input files. Note: Default style with Style Indication Line Size, Opacity and Size. Display text labels with Style Indication Line Label. 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 custom text labels set by file.
set Custom to Folder\Line.txt
create file named Line.txt at path C:\Program Files\MetaTrader 5\MQL5\Files\Folder\Line.txt
edit file to content MP_POC_MEDIAN:Label1,VP_POC_MEDIAN:Label2
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

Indication Main Marker

POC

  • true - Box Border
  • true - Box

VA

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

Start

End

Start Row

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

End Row

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

Letter Start

First TPO marker replacement character.

Letter End

Last TPO marker replacement character.

Letter POC

Additional marker character at row's end.

Evaluation

Volume Profile Total

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

Volume Profile Delta

Volume classification.

  • Price High/Low
  • By Data Source API Class Note: Order Book extension to feed MetaTrader 5 Time and Sales trade operation data with volume classification by order type.

Market Profile TPO Total

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

Price Level

Price level range inclusion.

  • High
  • Low

Imbalance

  • POC
  • Median

Imbalance

  • Include
  • Exclude

VA

VA

  • POC
  • Median

VA

  • Any
  • Exceed

VA TPO

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

LVN/HVN

  • By Main Type
  • Volume Profile
  • Market Profile TPO

LVN/HVN VA

Separate evaluation ranges based on Value Area.

LVN

Maximum percentage of highest price level value.

HVN

Minimum percentage of highest price level value.

LVN Limit

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

HVN Limit

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

IB

Amount of minutes.

IB TPO

Open at first TPO period.

Evaluation Column

Volume Profile

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

Market Profile TPO

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

Price Level

Filter by price level metric types.

Style Main

Size

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

  • Relative
  • Absolute

Size

  • Small
  • Medium
  • Large
  • Specified Pixels

Color (total) (positive) (negative)

Color Gradient

  • Blue-Red
  • Yellow-Red
  • Green-Red
  • Blue-Green-Red
  • Blue-Purple
  • Blue-Purple-Yellow
  • Specified Format: Color list.

Style Main Histogram

Border

Border Merge

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

Color Border (positive, total) (negative)

Style Main Marker

Structure

Adjusted for alignment to chart timeframe period.

  • Collapse
  • Expand

Character Letter

Format: ASCII characters.
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789#@
Additional ASCII and selected ANSI characters.
(Windows-1252 CP intended, code 128 and above, 'nonprintables' with unique replacement symbol)
Set direct or by file. Values longer than 229 characters can only be set by file.
Note: Resource pack includes Main Marker application file for user interface to create input files. Note: Code pages are used by operating systems to display symbols (characters) by codes. Windows US-English systems have as default code page (ANSI) CP-1252. Maximum amount of unique characters usable might be lower than 230.

Style Letter

  • Regular
  • Bold

Size Letter

  • Small
  • Medium
  • Large
  • Specified Pixels

Padding Letter

Note: Negative options for strong condensed structures.

Style Block

  • Solid
  • Outline

Size Block

  • Small
  • Medium
  • Large
  • Specified Pixels

Size Height Block

Size Width Block

Padding Block

Color

Color used for markers without on-object visualization.

Color Sequence

Default 26 unique colors repeated once. Format: Color list. Note: Resource pack includes Main Marker application file for user interface to create input files.

Color Sequence Groups

Grouping of TPO periods for color visualization. Format: Comma separated. Example: First two hours green, third hour white and remaining hours gray, with 30-minute TPO
set Indication Main Market Profile TPO to Sequence
set Style Main Marker Color Sequence Groups to 4,2
(4 x 30-minute for first group and 2 x 30-minute for remaining groups)
set Style Main Marker Color Sequence to clrGreen,clrWhite,clrGray

Color Gradient Sequence

Format: Color list. Note: Resource pack includes Main Marker application file for user interface to create input files.

Color Gradient Sequence Groups

Grouping of TPO periods for color visualization with gradual progression between group colors by gradient shades. Format: Comma separated.

Style Main Line Graph

Area

Size Line

Color Area

Smooth/Interpolate TPO

Factor for removal of data points and cubic spline interpolation.

Style Line Smooth/Interpolate TPO

  • Solid
  • Dashed

Style Column

Text

Fill

  • true
  • true - Class

Size

Minimum column widths in pixels. Format: Comma separated. Example: Three columns, first and second column sized 200 pixels and third column sized to column's largest cell width
set Column to %VOLUME_DELTA%;%VOLUME_TOTAL%;%PRICE_MEDIAN%
set Style Column Size to 200,200,0

Padding

Border

  • true
  • true - Window

Size Text

Size Mini Histogram

Size relation between segments. Absolute for each segment or relative to the dataset segment with the highest price level value. Note: Scaling with relative object sizes and if chart width available for segment is less than required for pixel ratioed scale visualization. Underlying scale calculations with not less than 8 digits. Rounding in scale calculations might cause minor visual distribution changes. Note: Prevent coarse initial size and color visualization of the dataset's first segment with Evaluation Volume Profile Total.

  • Relative
  • Absolute

Size Mini Histogram

  • Specified Pixels
  • Specified Percentage

Opacity Fill

Color Text

Color Fill

Color Fill (total) (positive) (negative)

Color Border

Color Mini Histogram Nodes

Color visualization relation between segments. Absolute for each segment or relative to the dataset segment with the highest price level value.

  • Relative
  • Absolute

Color Mini Histogram Nodes

Color visualization of price level sizes by ranging in percentages. Format: Comma separated. Example: Nodes 0-30%, 30-60% and 60-100%
set Indication Column Mini Volume Profile to Nodes
set Style Column Color Mini Histogram Nodes to 30,60,100

Color Mini Histogram Nodes

Format: Color list.

Font Text

Align Text

  • Left
  • Right

Format Text Number

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

Format Text Number Digits

Style Background

Opacity

Shade

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

Color

Background fill color for contour visualizations.

Color (total) (positive) (negative)

Color Gradient

  • Blue-Red
  • Yellow-Red
  • Green-Red
  • Blue-Green-Red
  • Blue-Purple
  • Blue-Purple-Yellow
  • Specified Format: Color list.

Style Panel

Size Text

Color Text

Color Fill

Color Border

Font Text

Format Text Number

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

Format Text Number Digits

Format Text Date/Time

Format Text Date/Time Offset

Style Grid

Style

  • Solid
  • Dashed

Opacity

Color

Style Separator

Style Start

  • Solid
  • Dashed

Style End

  • Solid
  • Dashed

Color Start

Color End

Style Indication

Fill Histogram

Histogram bar fill in addition to border.

Opacity Area Line Graph

Opacity Background Fill

Ray Background Fill

Shade Background Fill

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

Color Current

Color Median

Color Balance

Color Imbalance (positive) (negative)

Color POC

Color VAH

Color VAL

Color VA (positive) (negative)

Color LVN

Color HVN (positive) (negative)

Size IB

  • Small
  • Medium
  • Large

Size OHLC

  • Small
  • Medium
  • Large

Offset OHLC

Color IB

Color OHLC (positive) (negative)

Color Wick OHLC (positive) (negative)

Color VWAP

Style Indication Marker

Size Line

Opacity Box

Color Box POC

Color Box Border POC

Color Box VA

Color Box Border VA

Color Bracket VA

Color Start

Color End

Color Start Row

Color End Row

Color Letter POC

Style Indication Line

Style

  • Solid
  • Dashed

Label

Size

Size Label

Margin

Margin Label

Opacity

Ray

Color

Color Label Text

Color Label Fill

Font Label Text

Align Vertical Label Text

  • Top
  • Middle
  • Bottom

Align Horizontal Label Text

  • Right
  • Left

User Interface

On-Chart Controls

Configuration file on-chart controls. To enable set to 'true' (text value) or specify a configuration file name. Default 'osc.ini'. Note: Configuration files are located in the terminal's data folder. Edit with a text file editor. To restore delete file and reload the indicator. For quick access use command 'Open data folder' in the File menu.

Keyboard Shortcuts

Configuration file keyboard shortcuts. To enable set to 'true' (text value) or specify a configuration file name. Default 'hotkeys.ini'. Note: Configuration files are located in the terminal's data folder. Edit with a text file editor. To restore delete file and reload the indicator. For quick access use command 'Open data folder' in the File menu.

Drag & Drop Size Line

Note: Toggle display with keyboard shortcut G.

  • Small
  • Medium
  • Large

Drag & Drop Color Line

Drag & Drop Color Fill

Drag & Drop Anchor Panel

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

Application Program Interface

Data Source

Real-time and historical data file input. Enable with Dataset Feed parameter. Timeframe period and trade operation based data row processing methods. Default file name 'VBP_%SYMBOL%.csv' with chart symbol Market Watch name expansion. MetaTrader 4 and 5 Market Watch bar data default export file formats based. 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 Profile Delta. Built time series data stored in memory. Reinitialization on chart timeframe changes. Note: Order Book extension to feed MetaTrader 5 Time and Sales trade operation data with volume classification by order type. Example: File name 'VBP_NAME.csv'
set Dataset Feed to Data Source API
set Data Source to VBP_NAME.csv
content file named VBP_NAME.csv at path C:\Program Files\MetaTrader 5\MQL5\Files\VBP_NAME.csv
Example: File name 'VBP_NAME.csv' with common file folder location
set Dataset Feed to Data Source API
set Data Source to VBP_NAME.csv
set Data Source Common Folder to true
content file named VBP_NAME.csv at path C:\Users\Username\AppData\Roaming\MetaQuotes\Terminal\Common\Files\VBP_NAME.csv
Example: Data Source Format 5 content file 4 rows, 6 ticks, 8 buy and 5 sell orders 2022.09.14  18:52   3950.75 3950.75 3950.50 3950.75 1   1   25 1
2022.09.14  18:52   3950.75 3950.75 3950.50 3950.50 1   1   25 0
2022.09.14  18:52   3950.75 3950.75 3950.50 3950.75 2   8   25 6
2022.09.14  18:52   3950.75 3950.75 3950.50 3950.75 2   3   25 1
Example: Data Source Format 4 content file 6 rows, 6 ticks, 8 buy and 5 sell orders 2022.09.14,18:52,3950.75,3950.75,3950.50,3950.75,1,1,1
2022.09.14,18:52,3950.75,3950.75,3950.50,3950.50,1,1,0
2022.09.14,18:52,3950.75,3950.75,3950.50,3950.75,1,6,6
2022.09.14,18:52,3950.75,3950.75,3950.50,3950.50,1,2,0
2022.09.14,18:52,3950.75,3950.75,3950.50,3950.75,1,1,1
2022.09.14,18:52,3950.75,3950.75,3950.50,3950.70,1,2,0

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

Dimensions and metrics data output as Global Variables of the terminal. To enable set to 'true' (text value) or specify an environment name. Optional filter query. Global Variables are prefixed by 'VBP', and if specified environment name, underscore separated. Segment index, starting at zero and omitted for first, is appended enclosed with brackets. Note: Resource pack includes code samples to access and evaluate metrics for automated algorithmic trading strategies. Example: Environment name 'NAME' with variable filter
set Data Environment to NAME?filter=MP,VP,IB
(metrics accessible as 'VBP_NAME_MP_POC_MEDIAN', 'VBP_NAME[1]_MP_POC_MEDIAN', etc)
Example: MQL code to access and store metric value double metric1 = 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

Chart Properties

Color Scheme

  • default
  • Gray On White
  • Black On White
  • Black On Yellow
  • Green/White On Black
  • Green/Red On White
  • Blue/Red On Turquoise
  • Green/White On Blue

Price Chart

  • default
  • Hide
  • Show

Price Chart Layer

  • default
  • Foreground
  • Background

Common Period Separator

  • default
  • Hide
  • Show

Common Grid

  • default
  • Hide
  • Show

Common Y-axis

  • default
  • Hide
  • Show

Common X-axis

  • default
  • Hide
  • Show

Indicator Z-order

Object mouse click and hover event priority.

Extension Order Book

Installation and setup: Order Book application file. Instructions Copy application file to '<Terminal_Directory>\MQL4|MQL5\Experts' and refresh the 'Navigator' window or restart the terminal.
Attach extension and indicator instances to a chart:
Menubar > Insert > Experts > Volume by Price > Order Book
Menubar > Insert > Indicators > Custom > Volume by Price
For Time and Sales:
set indicator Dataset Feed to Data Source API
set indicator Data Source and extension Output to default, or specify either name if indicator and extension chart symbol Market Watch names do not match
set indicator Data Source Common Folder and extension Output Common Folder to true for cross-platform setup
set indicator Evaluation Volume Profile Delta to By Data Source API Class
For Depth Of Market:
set extension Output to default, or specify name if indicator and extension chart symbol Market Watch names do not match
set indicator Object Column with VOLUME_PENDING value(s)

Time and Sales

Real-time and historical buy and sale order trade operation data file output. Indicator data utilization via Data Source API.

Depth Of Market

Real-time pending buy and sale order trade operation data file output. Indicator data utilization via chart symbol Market Watch name. Object Column visualization via environment variable names. Stored in memory by segment. Reinitialization on chart timeframe changes.

Extension Tracing

Line visualization and data window display (including iCustom buffers) of developing metrics. Data window configuration file 'tracing.ini' to set custom labels. Reinitialization on dataset range changes. Utilizes indicator Data Environment API calls.

Installation and setup: Tracing application file. Instructions Copy application file to '<Terminal_Directory>\MQL4|MQL5\Indicators' and refresh the 'Navigator' window or restart the terminal.
Attach indicator and extension instances to a chart:
Menubar > Insert > Indicators > Custom > Volume by Price
Menubar > Insert > Indicators > Custom > Volume by Price > Tracing
Set indicator and extension Data Environment to default, or specify names if using multiple indicator instances on the same terminal.
Note: Configuration files are located in the terminal's data folder. Edit with a text file editor. To restore delete file and reload the indicator. For quick access use command 'Open data folder' in the File menu.

References
"iCustom - MQL5 Reference" https://www.mql5.com/en/docs/indicators/icustom
"iCustom - MQL4 Reference" https://docs.mql4.com/indicators/icustom

Extension Notifications

Notifications by evaluation of metrics with basic condition input parameters. Display alert windows, save screenshots and/or log messages. Remote options with email and mobile device push notifications. Utilizes indicator Data Environment API calls.

Installation and setup: Notifications application file. Instructions Copy application file to '<Terminal_Directory>\MQL4|MQL5\Indicators' and refresh the 'Navigator' window or restart the terminal.
Attach indicator and extension instances to a chart:
Menubar > Insert > Indicators > Custom > Volume by Price
Menubar > Insert > Indicators > Custom > Volume by Price > Notifications
Set indicator and extension Data Environment to default, or specify names if using multiple indicator instances on the same terminal.

Extension Volume by Time

Object

  • Histogram
  • Bubble Graph

Time Period

  • Specified Bars
  • 1 Minute
  • 5 Minutes
  • 15 Minutes
  • 30 Minutes
  • 1 Hour
  • 4 Hours
  • Daily
  • Weekly

Indication

  • Total - Gradient Horizontal
  • Total - Gradient Vertical
  • Delta
  • Delta - Stack
  • Delta - Stack Ordered

Indication Opacity

Color (positive, total) (negative)

Color Border (positive, total) (negative)

Color Gradient

  • Blue-Red
  • Yellow-Red
  • Green-Red
  • Blue-Green-Red
  • Blue-Purple
  • Blue-Purple-Yellow
  • Specified Format: Color list.

Anchor Histogram Price

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

Anchor Bubble

  • Start
  • End
  • Median

Anchor Bubble Price

  • Close
  • High
  • Low
  • Median
  • Axis

Layer

  • Foreground
  • Background

Subwindow

Note: Extension pack includes Window application file for dedicated sub window.

Size

  • Small
  • Medium
  • Large
  • Specified Pixels

Border

Border Merge Histogram

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

Environment Variables

Environment variables contain the dimensions and metrics data. For setups can be specified by name as values of text input parameters. Programmatically access via the Data Environment API as Global Variables of the terminal.

Name Usage Global Variable Main Custom Column Evaluation Column Panel
Time range
TIME_START x x
TIME_END x x
SESSION x
SESSION_NLONG Long formatted literal x
Real-time price data total accumulated
CSIZE Data rows reference x x
Real-time price data last accumulated
CTIME x x
CPRICE x x
CPRICE_CHG x
CPRICE_CHG_N Symbol points size x
CPRICE_CHG_LED Class colored circle symbol, first entry of line x
Volume Profile
VOLUME_TOTAL x x x
VOLUME_POSITIVE x x x
VOLUME_NEGATIVE x x x
VOLUME_DELTA Class signed number x x x
VOLUME_DELTA_N x x x
VP_LOW x x x
VP_HIGH x x x
VP_RANGE Symbol points size x x
VP_MEDIAN x x x
VP_BALANCE x x x
VP_POC x
VP_POC_MEDIAN x x x
VP_POC_LOW x x x
VP_POC_HIGH x x x
VP_VA_LOW x x x x
VP_VA_HIGH x x x x
VP_VA_RANGE Symbol points size x x
VP_VOLUME_COUNT_POSITIVE x x
VP_VOLUME_COUNT_NEGATIVE x x
VP_VOLUME_COUNT_DELTA Class signed number x x
VP_VOLUME_COUNT_DELTA_N x x
PRICE_SET Input parameter reference x x
PRICE_MEDIAN x
PRICE_LOW x
PRICE_HIGH x
HVN x
LVN x
Volume Profile - Real-time price data last accumulated
CVOLUME_TOTAL x
CVOLUME_POSITIVE x
CVOLUME_NEGATIVE x
CVOLUME_DELTA x
CVOLUME_DELTA_LED Class colored circle symbol, first entry of line x
Volume Profile - Real-time price data last bar
BVOLUME_TOTAL x
BVOLUME_POSITIVE x
BVOLUME_NEGATIVE x
BVOLUME_DELTA Class signed number x
BVOLUME_DELTA_N x
Market Profile TPO
MP_TPO_SET Input parameter reference x x
MP_TPO_TIME x x
MP_TPO_TIME_NSHORT Short formatted literal x
MP_TPO_TIME_NLONG Long formatted literal x
MP_TPO_TOTAL x x x
MP_TPO_INDEX x
MP_TPO_LETTER x
MP_LOW x x x
MP_HIGH x x x
MP_RANGE Symbol points size x x
MP_MEDIAN x x x
MP_BALANCE x x x
MP_POC x
MP_POC_MEDIAN x x x
MP_POC_LOW x x x
MP_POC_HIGH x x x
MP_VA_LOW x x x x
MP_VA_HIGH x x x x
MP_VA_RANGE Symbol points size x x
MP_TPO_COUNT_POSITIVE x x
MP_TPO_COUNT_NEGATIVE x x
MP_TPO_COUNT_DELTA Class signed number x x
MP_TPO_COUNT_DELTA_N x x
PRICE_SET Input parameter reference x x
PRICE_MEDIAN x
PRICE_LOW x
PRICE_HIGH x
HVN x
LVN x
Initial Balance
IB_LOW x x x
IB_HIGH x x x
IB_RANGE Symbol points size x x
Volume Weighted Average Price
VWAP x x x
Depth Of Market Extension Order Book
VOLUME_PENDING x
VOLUME_PENDING_POSITIVE x
VOLUME_PENDING_NEGATIVE x

Shortcut Controls

Shortcut controls for selected parameters. Enable and customize with On-Chart Controls and Keyboard Shortcuts parameters.

Default Key Usage
RInitialize Range
QIncrease Price Level
WDecrease Price Level
TToggle Type Main
LToggle Type Panel
BToggle Layer Main
SToggle Style Size Main
HToggle Display All
XToggle Display Separator
CToggle Display OHLC
GToggle Display Range Selection Line

Color Lists

Color lists to specify sequences and gradient bases as value of text input parameters.

Create color list file 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26

Format: MQL color names, e.g., clrPurple,clrGold or literal RGB values, e.g., C'235,64,52',C'33,102,176'. Comma or hyphen separated. Lists longer than 229 characters can only be set by file. Example: Set parameter (e.g., Style Background Color Gradient) to clrRed,clrWhite,clrBlue Example: To use color list file C:\Program Files\MetaTrader 5\MQL5\Files\Volume by Price Indicator\ColorList.txt
set parameter (e.g., Style Main Marker Color Sequence) to ColorList.txt

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

Updated: 2023.03.20 Published: 2017.11.24