
07-22-2007, 02:10 PM
|
|
Senior Member
|
|
Join Date: Feb 2006
Posts: 525
|
|
Quote:
Originally Posted by MQL4
subtracting the counted_bars from the total count of the bars on chart.
Thanks.
|
Take a look to the mql4 help file:
Quote:
int IndicatorCounted( )
The function returns the amount of bars not changed after the indicator had been launched last. The most calculated bars do not need any recalculation. In most cases, same count of index values do not need for recalculation. The function is used to optimize calculating.
Note: The latest bar is not considered to be calculated and, in the most cases, it is necessary to recalculate only this bar. However, there occur some boundary cases where custom indicator is called from the expert at the first tick of the new bar. It is possible that the last tick of the previous bar had not been processed (because the last-but-one tick was being processed when this last tick came), the custom indicator was not called and it was not calculated because of this. To avoid indicator calculation errors in such situations, the IndicatorCounted() function returns the count of bars minus one.
|
|