Примеры использования Zero bar на Английском языке и их переводы на Русский язык
{-}
-
Official
-
Colloquial
For example, the zero bar in Fig.
The processed tick is the first tick of a new zero bar.
Shift size of the zero bar from the right border in percentage values.
The zero bar is a current yet unformed bar. .
In a chart window the zero bar is the last right one.
For example, the value of Open[0]is the opening price of a zero bar.
Zero bar is a current bar that has not fully formed yet.
Except values of Open[] and Time[] that do not change on the zero bar.
A new tick is the first tick of a zero bar happens from time to time.
There is a simple andreliable way to do this- analyzing the opening time of a zero bar.
In this case values of indicator lines on the zero bar are used, that is why index 0 is specified.
Bars(and corresponding indexes of arrays-timeseries) counting is started from the zero bar.
A new tick comes during the formation of the current zero bar the most common situation.
The values of array-timeseries elements with the index[0]are values that characterize the zero bar.
In the above example, all pending orders were placed at zero bar at the moment shown in Fig.
It is necessary to calculate the current value of the indicator line only on each new tick of the zero bar.
A new tick is the first tick of a new zero bar, but the last but one tick is not processed rare case.
In other words, the new position of an indicator line on the zero bar will be calculated.
Now this new bar will be a zero bar and the one hat has just formed will become the first one with the index 1.
In the Expert Advisor callindicator. mq4 the technical indicator function iMA()returns the value calculated for the zero bar.
Opening time of a zero bar is the bar characteristic that does not change during the bar's formation.
Taking into account that indicator array is not shifted relative to the chart,MA value is obtained for the zero bar.
That is why it is enough to remember the opening price of a zero bar and at each tick compare it to the last known zero bar opening price.
The index of a new added element will be equal to 0,the value of this element will be a new value reflecting coordinate of the indicator line on a zero bar.
After that the client terminal will draw indicator lines on the zero bar based on just calculated values of array elements with zero indexes.
It means calculation of indicator array values in while()loop at the appearance of a new bar will be performed both for the last bar and for the new zero bar.
In such acase control is passed to'if'operator body, where the new opening time of the zero bar is remembered and the true value is assigned to New_Bar.
Two possible situations are considered in the function start():(1) the object has been occasionally deleted by the user(block 3-4) and(2)it is necessary to move the object to the right when a new zero bar is formed block 4-5.
In this example the right border of the object must always be on the zero bar, that is why the value of the second coordinate corresponds to the opening time of the zero bar. .