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.
The indicator works on every timeframe available in the terminal, but it uses the history data of the smaller timeframes (relative to the current) - M1, M5, H1, H4 and D1. Before attaching the indicator, download the history of those periods by scrolling the chart using the mouse.
Below the profile, its resulting balance is displayed, which 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%.
The summary profile is calculated based on the data present within the visible area only.
Indicator operation modes (ProfileMode)
- Profile - regular profile.
- ProfileDelta - profile with a color-difference delta.
- ProfileImbalance - the mode of difference between the buyer volumes and seller volumes, or the delta profile.
- ProfileMathOI - profile of open interest, mathematically obtained by successively zeroing the mutually exclusive volumes.
Automatic arrangement of profiles (ProfileAutoSet)
- None - disabled.
- WithoutProfileSum - without the summary profile.
- WithLeftProfileSum - the summary profile on the left.
- WithRightProfileSum - the summary profile on the right.
Price area calculation method (ProfileAreaMode)
- AreaOfPocND - mathematical normal distribution based on the POC level.
- AreaOfTotalVolume - distribution based on the amount of total volume traded in the profile.
Type of the used volumes (ProfileVolumes)
- NoVolumes - in this mode the candle volumes are not considered at all, profiles are plotted based on the "TPO" principle.
- TickVolumes - tick volumes are used in calculations.
- RealVolumes - real volumes are used in calculations, if broadcasted by the broker.
- ProfileSmartMode - in this mode, the profiles will be displayed only on the period and in the position where they have been created.
- ProfileLineDrawing - draw the profile as a contour line.
- ProfileDeltaReverse - by default, the balance and delta are calculated in terms of market orders. This function activates the calculation mode in terms of limit orders.
- ProfileFading - enable/disable the color fading mode.
- BorderVisible - profile border visible/invisible.
- VolumeVisible - show/hide the profile volume column.
Description of Other Variable
- ProfileStepPoint - fixed step of profile calculation grid. It is set in "old" points, a value of 0.1 correspond to one "new" point. If set to zero, the calculation step is taken from the ProfileStepPointPix variable.
- ProfileStepPointPix - dynamic step of profile calculation grid, in monitor pixels.
- ProfileMaxLengthPix - length of the profile, specified in monitor pixels, which cannot exceed the specified value regardless of the capture area.
- ProfilePriceArea - profile price area size as a percentage.
- ProfileInitBalance - in this mode, the profile of the initial balance is displayed inside the main profile, with its length set as a percentage of the main profile length. This function is not performed for the summary profile, as well as profiles directed from right to left.
- ProfileDeltaContrast - contrast of the delta.
- ProfileTimingCalculation - recalculation timing in milliseconds.
- ProfileRectanglePrefix - name prefix of the reference rectangle.
- ProfileLineWidth - contour line width for the ProfileLineDrawing mode.
- ProfileFontSize - font size of the text on the profile.
- BorderFontSize - font size of the text above the profile.
The remaining input parameters are related to color settings, and their purpose is clear from their names.
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».