Quote:
|
Originally Posted by newdigital
I have a questions.
It was difficult for me to understand the logic but seems I got it.
1. int Counted_bars = IndicatorCounted ();
if (counted_bars > 0) counted_bars --;
It means that indicator is counting all the bars which was appeared on the chart.
counted_bars-- is minus 1 every time. So, it should be started from some maximum value.
Why it is counting like -- and not ++ (starting from zero and counted_bars ++?
|
I have the same question, because counted bars should equal the total number of bars. What if it is 3994 bars? and you subtract 1, then you have 3993 bars, but what you want is the current bar, bar [0], correct? How is decrementing the counted_bars by 1 going to use bar 0??