The indicator displays market profiles of any duration in any place on the chart.
Simply create a rectangle on the chart and this rectangle will be automatically filled by the profile. Change the size of the rectangle or move it - the profile will automatically follow the changes.
You can manage the indicator using the buttons on the chart and the edit boxes for entering parameters. The settings are saved for each timeframe separately.
The upper right corner of the chart window contains a pop-up button AP of the main menu, which is divided into two halves. Press the left half to toggle the group of control buttons, press the right half to toggle the group of text boxes for entering parameters.
Groups of control buttons
- AS - manual or automatic plotting of profiles.
- MD - profile modes:
- regular profile.
- profile with a delta coloring.
- profile of difference between the buyer volumes and seller volumes, or the delta profile.
- profile of open interest, mathematically obtained by successively zeroing the mutually exclusive volumes.
- TPO profile.
- CD - draw the profile as contour lines.
- PS - summary profile: right / left / disabled.
- AT - price area type:
- normal distribution based on the POC level.
- distribution based on the amount of volume traded in the profile.
- PE - enable/disable extension of the POC level as a ray.
- EX - profile extremums: peaks / valleys / peaks and valleys / disabled.
- PC - display profiles taking into account the comparison of the volume at POC levels.
- CT - enable/disable the values on profile clusters.
- BT - enable/disable labels above and below profiles.
- BV - enable/disable the profile frame.
- VV - enable/disable the histogram bars for volume.
- SM - in this mode, the profiles will be displayed only on the period and in the position where they have been created.
- VT - type of volumes:
- tick volumes (VT).
- real volumes if broadcasted by broker (VR).
- ignore volumes (VN).
- PF - dynamic floating profile, profiles are arranged from right to left starting from the current candle, shifted right by one candle.
- PA - alert:
- for POC (PA).
- for price area (AA).
- disabled (NA).
- RS - reset parameters to default values, the reset is performed only for the current timeframe.
- RT - apply parameters of the current timeframe to all other timeframes of the given symbol.
- DR - by default, the balance and delta are calculated in terms of market orders. This function activates the calculation mode in terms of limit orders.
- FD - enable/disable the color fading mode.
- LM - several modes for the TPO profile.
- LT - enable/disable binding the letters of the TPO profile to date/time.
Groups of fields for entering parameters
- PSP - fixed step of profile calculation grid. It is set in "old" points, a value of 0.1 correspond to one "new" point.
- PSPP - dynamic step of profile calculation grid, in monitor pixels.
- Price Area - price area size as a percentage.
- Init Balance - length of the initial balance profile as a percentage of the main profile length.
- Period - profiles are arranged in periods in bars, from right to left, starting from the current candle.
- Offset - shift in bars, can be a positive or a negative value.
- Lenght - length of the profile, specified in monitor pixels, which cannot exceed the specified value regardless of the capture area.
- Contrast - contrast of delta, from 1 to 4.
- Begin time/bar - initial time (or candle number) of the summary profile. Values not exceeding 1440 are perceived by the indicator as the candle number.
- Finish time/bar - end time (or candle number) of the summary profile. Values not exceeding 1440 are perceived by the indicator as the candle number.
- QuantityLimit - the maximum allowed number of profiles, including the summary profile.
- TimingRefresh - refresh rate in milliseconds.
- RectanglePrefix - prefix of the reference rectangle name.
The remaining inputs refer to settings of line color, width and font size, and their purpose is clear from their names.
The indicator is compiled in MT5 build 2650.
The indicator is recompiled in MT5 build 2485.
The button BV now has several modes:
1. The profile border is disabled, and the value area is marked with strokes.
2. The profile border is disabled, and the value area is marked with border.
3. The profile border is enabled, and the value area is marked with border.
1. Display POC levels.
2. Display VAL and VAH levels.
3. Display VAL, VAH and POC levels.
The input variable VolumeProfileCalculation has two states:
Normal - normal algorithm for calculating volume profiles.
Fast - accelerated algorithm for calculating volume profiles, with some loss of quality for Delta and MathOI modes on timeframes from H1 and above.
Any value not exceeding 1440 will be perceived by the indicator not as a date/time, but as a pointer to the candle number.
Note: the candles are numbered from right to left, starting with one. Accordingly, the number of the initial candle is always greater than the number of the final candle.
Added the RS (reset) button to reset the indicator parameters to their default values.
Added the RT (remaining timeframes) button to apply the indicator parameters from the current timeframe to all other timeframes.
Optimized the algorithm for plotting the profiles to improve its operation speed.
Added the "PE" button (POC extend), which enables/disables the display of horizontal lines as continuations of POC levels, from left to right, until the intersection with the price chart.
Added the "PA" (POC alert) button, which enables/disables showing signals in Alert boxes in case the price touches any POC level. The signal is generated only for POC levels that had not been previously covered by the price chart.
Note: when installing this version of the indicator, it is necessary to delete all files from the terminal folder …MQL5/Files/AnyProfile.
The pop-up button of the main menu is located in the lower right corner of the chart. It is divided into two halves - pressing on the left half changes the group of control buttons, pressing the right half changes the group of text boxes for entering parameters.
The indicator remembers selected values separately for each profile of each timeframe.
The ProfileRectanglePrefix input variable sets the name prefix of the rectangle that will be used by the indicator as a reference.
Now, in the ProfileAutoSet mode, the last (not closed) profile develops in real time, not at each candlestick opening.
In addition, the indicator displays the volume of each profile as a histogram column at the lower border of the chart window. The column height is automatically adjusted in the aggregate comparison with the volumes of other profiles present on the chart. The display of the volume columns is activated using the VolumeVisible input variable. This function is not performed for the summary profile.
1. Mode of displaying the profile in the form of two lines, separately for buy and sell volumes. In a sense, such display method represents a graph of supply and demand.
2. Mode of open interest, mathematically obtained by successively zeroing the mutually exclusive volumes. Only the volumes not affected by this operation are displayed in the profile. This function is not performed for the summary profile.
3. The indicator calculates the resulting profile of the balance. The balance is displayed by one number below the profile and it represents the ratio between the buy and sell volumes.
The value of balance is always not less than one. For example, if the balance value is 1.18 and the number is colored in green, this means that the buy volumes exceed sell volumes by 18%. And conversely, if the number is colored in red, this means that the sell volumes exceed the buy volumes by 18%.
If the balance value is equal to or very close to one, this means that the profile is almost balanced, that is, the buy are very close or equal to the sell volumes.
4. By default, the balance and delta are calculated in terms of market orders. The new ProfileDeltaReverse function activates the calculation mode in terms of limit orders.
Set the profile in such a way as to capture the beginning and the end of the trend, and you will see clearly enough the green layers of buyers and the red layers of sellers within this trend.
ProfileImbalance - in this mode, not simply the volume profile is displayed, but the profile of the difference between the volumes of buyers and the volumes of sellers, that is the delta profile.
ProfileInitBalance - in this mode, the profile of the initial balance is displayed inside the mail profile. This profile is calculated based on the data, the capture range of which is set as a percentage of the total length of the main profile, from left to right, starting from the beginning of the main profile. For example, if the main profile has a length of 8 hours, then the value of 12.5% is equivalent to 1 hour of the initial balance. The color of the initial balance profile is set using the ProfileInitBalanceColor variable. This function is not performed for the summary profile, as well as for the profiles directed from right to left. If the value is zero the function is not performed.
ProfileMaxLengthPix - the maximum length of the profile, specified in monitor pixels. In this mode, regardless of the profile capture area, its total visible length will not be greater than the specified value. If the value is zero the function is not performed.
Fixed the error with the summary profile becoming a normal profile when it is overlapped by new candles on the chart. The reference rectangle of the summary profile is now automatically positioned at the bottom, under the summary profile.
The ProfileStepPoint input variable now has a fractional type. This allows to set the grid step of the profiles in «new» points. The value of 0.1 corresponds to one «new» point.
The color of the reference rectangles automatically adjusts to the chart background color, but with a darker tone (slightly brighter tone for a black background). If you want to apply a different color, then set the ProfileRectangleColor input variable to any other color, except White.
Improved the visual appearance and extended the indicator capabilities.
When the scale of the calculated grid is increased (ProfileStepPoint or ProfileStepPointPix), the numerical value of volume is specified not only along the POC line, but also on each cluster of profiles.
The initial position as well as the final position is displayed above the profiles. Depending on the timeframe, those will be the initial and final – time, and/or session (day of the week, month, date).
Added the ability to display the total (cumulative) profile. Create a rectangle in an empty space on the right beyond the graph, and the summary profile will appear in that area.
Scrolling the chart to history is allowed for the summary profile. When scrolling the chart, the summary profile will be plotted based on the data in the visible area, that is, the data to the left and right beyond the chart window are not considered in the calculations.
Added the color fading visual effect - ProfileFading.
Added the function of color difference delta - ProfileDelta. In this mode, the areas of prevailing Buys on the profiles is colored in green, that of Sells - in red. On the summary profile, respectively, blue/red.
Separate color variables are introduced for the summary profile:
ProfileSumInAreaColor – summary profile color in the price area.
ProfileSumOutAreaColor – summary profile color outside the price area.
ProfileSumPocColor – color of the POC line of the summary profile.
ProfileSumTextColor – text color on the summary profile.
Now it is possible to create multiple custom profiles within one indicator running on the chart. Simply create a rectangle of required length on the chart and this rectangle will be automatically filled by the profile. The color of this rectangle will also automatically change according to the ProfileRectangleColor input parameter.
Note: If you do not want the rectangle to be filled by a profile, then rename it to any other name which does not include the word «Rectangle».