• Overview
  • Reviews (2)
  • Comments (2)
  • What's new

ID Numbers of bars

A free indicator for determining the numbers of bars on the chart or selecting a specified number of bars using the number histogram. In addition, it automatically displays the date, time, Open, High, Low and Close of the bar with the selected static or dynamic number and highlights it by drawing a vertical line.

ID Numbers of bars offers several ways for selecting the required bars and combining them: automatic change of the histogram color after a specified number, limit on the number of the histogram columns, the vertical line on the desired bar.

The same analyzer is available for MetaTrader 5: https://www.mql5.com/en/market/product/5111


Useful When You Need to:

  • Determine the number of a bar and/or get information on a particular bar. In particular, highlight it on the chart with a static or dynamic number. For example, for a trade analysis, for an indicator, Expert Advisor or script.
  • Visually highlight the required number of bars. For example, if the strategies and tactics take into account the periods that can be set as a number of bars.
  • Check or adjust the correctness of the indicators, scripts and Expert Advisors if their functions use calculations on the basis of specific bars.

When showing information on open, high, low and close prices, the indicator automatically adjusts to the number of decimal places displayed in the chart window of the terminal.


How to Use ID Numbers of Bars

The indicator is very easy to use. Try it, and you will see it. And the following guidelines will help you to use the best of its properties.

If you do not change the parameters of the indicator in its properties when attaching it to the chart, then you will see the following:

  • An additional window with the histogram bars will appear on the chart. When you move the crosshair or cursor on them, the numbers of the bars above them will appear.
  • A vertical line drawn through the zero (current) bar.
  • Information on the zero bar in the upper right corner of the histogram window.

To save space on the chart, you can attach it to the sub-windows of other indicators.


Ways to Set the Display of Information on the Required Bar

  1. Double-click on the vertical line of the indicator and drag it to the required bar.
  2. Or open the properties of the vertical line and change the date and/or time to the required ones.
  3. Or enter the number of the bar in the "The vertical line on the bar" parameter of the indicator properties.
If you set the movement of the vertical line to the bar that does not exist on the chart, the indicator will display information that there is no bar.


Various Options of Selecting Groups of Bars

Use parameters "Change the color histogram after #" and/or "Columns of histogram" and/or "The vertical line on the bar":

  • In "Change the color histogram after #" specify the number of the bar, after which the histogram will change color;
  • In "Columns of histogram" set the number of the bar, after which the histogram will not draw its bars on the chart. Therefore, in "Change the color histogram after #" specify the number less than in "Columns of histogram";
  • In "The vertical line on the bar" specify the number of the bar, at which the vertical line will be drawn. Instead of changing the value of the parameter in the properties, you can simply move the vertical line to the desired place on the chart. This parameter is not connected with "Columns of histogram", so the recommendations for "Change the color histogram after #" to limit depending on the number specified in "Columns of histogram" do not apply to it.

If necessary, you can add horizontal levels on the histogram in the Levels tab of the indicator properties. For example, when you want to highlight bars with numbers greater than and/or less than a specific number.

When specifying numbers of bars, remember that the current bar (the first one on the right of the chart) has a zero number in the trading terminal.


If You Only Need Histogram and Do Not Need Vertical Line and Values

Select "No" in the "Vertical line" parameter of the indicator properties. The default is "Yes" - show a vertical line and the information of the selected bar.

Use the Colors tab of the indicator properties to select color for the histogram bars.

Note: When attaching the indicator to the chart, remember that default colors are designed for a light background.
If necessary, change the colors.


Choosing to Display a Static or Dynamic Bar Number

If you use the default true in "Dynamic number of bar", then with the appearance of new bars the vertical line on a selected bar will move to the left together with the bar. Only the number of the bar will change (increase) in the information displayed by the indicator. Other details will not change.

If you set false in "Dynamic number of bar", the color of the vertical line will change and it will stay at the number of the bar that you have specified. The indicator will update information on the date, time and price, depending on the bars that appear at the selected position.


Properties of ID Numbers of Bars in the Inputs Tab

Name Description
Vertical line yes - show the vertical line and information on the selected bar;
no - do not show.
The vertical line on the bar To enter the required bar. The default is 0 - the number of the current (zero) bar.
Dynamic number of bar yes - with the appearance of new bars the vertical line on a selected bar will move to the left together with the bar. Only the number of the bar will change (increase) in the information displayed by the indicator. Other data will not change;
no - the color of the vertical line will change and it will stay at the number of the bar that you have specified. The indicator will update information on the date, time and price, depending on the bars that appear at the selected position.
Change the color histogram after # The number of the bar, after which the histogram will change color.
Columns of histogram The number of the bar, after which the histogram will not draw its bars on the chart.
The color of the information lines of the indicator The color of the information lines of the indicator
The color of the vertical line when dynamic number of bar = Yes The color of the vertical line when "Dynamic number of bar"="Yes"
The color of the vertical line when dynamic number of bar = No The color of the vertical line when "Dynamic number of bar"="No"
The width of the vertical line The width of the vertical line.
The style of the vertical line The style of the vertical line, where:
  • Solid - solid line;
  • Dash - dashed line;
  • Dot - dotted line;
  • Dashdot - dash-dot line;
  • Dashdotdot - Dot-dash line with double dots.
Vertical line in the background true - background display of the vertical line;
false - normal.
Izzatilla Ikramov
13054
2015.09.21 05:43 
 

User didn't leave any comment to the rating

Vadim Strelkov
7889
2014.05.13 12:20 
 

User didn't leave any comment to the rating

Version 1.80 - 2015.08.11
1. If you shift the vertical line of the indicator to the right part of the chart having no bars, the indicator will show the number of bars from this line to the zero (current) bar.
2. To enhance the indicator's operation, we have supplemented the code with additional tests for robust operation of many functions of the analyzer.
3. When you shift the vertical line of the indicator by changing a date, you will hear a sound alert if there are no bars on the specified date. This can happen if, for example, you specify a holiday in properties of the vertical line. In this case the sound alert also notifies you about a date of the nearest bar which is located before the absent bar at the specified time. The line will automatically shift to this bar.
Version 1.55 - 2014.10.10
Fixed spelling errors in the indicator properties: "dinamic" changed to "dynamic".

Fixed spelling of word "number" in "The color of the vertical line when dynamic number of bar = No".
Version 1.53 - 2014.10.03
The indicator has been modernized:

1. Control of its main parameters is now on the panel right on the chart. Indicator's color and the vertical line appearance can be managed in the indicator inputs.

2. If the terminal language is Russian, all texts of the indicator appear in Russian. If a different language is selected, the indicator texts appear in English.
The indicator's input parameters are still only in English.

3. The names of the indicator parameters are now easier to understand.

4. The operation of the indicator functions has been improved.

5. The control panel now displays the relevant total number of bars on the chart.
Version 1.5 - 2014.02.13
Fixed display of date and time of a bar when moving the vertical line of the analyzer manually, when DinamicNumberOfBar = true.

If DinamicNumberOfBar = false, then in case the vertical line is moved manually, it will return to the bar specified in DefineBar, the same as before.
Version 1.2 - 2014.02.10
1. Added "Decimal digits of price" parameter to the indicator. It is used in case there is a need to round displayed Open, High, Low and Close values, for example, when working with 5-digit quotes.

If "Decimal digits of price" is left equal to zero, the indicator automatically adjusts to the number of decimal places corresponding to the chart quotes.

To change the display of values, enter an integer value to this parameter.

Suppose that "ID Numbers of bars" is applied to the chart with quotes having five decimal places. If we put 4 in "Decimal digits of price" parameter, the indicator will display the values of necessary bars rounded to four decimal places.

2. Added brief description in About tab of the indicator settings.

3. Fixed an error that could occur in build 604 on the timeframes exceeding M1.