IndicatorCounted() - let's clarify this once and for all - page 2

 
maximo #: Why would Metatrader in any case use the following if " It does not work at all."  😆
Improperly formatted code corrected by moderator. 

Please always use the CODE button (Alt-S) when inserting code.

Code button in editor

 
@maximo #:

Why would Metatrader in any case use the following if " It does not work at all."  😆

Improperly formatted code corrected by moderator. 

 This alternative works for me also instead of the previous line.  Comments are meant as a reminder to the new names appropriated to older functions.

   int counted_bars=prev_calculated; //IndicatorCounted();  prev_calculated only works if code ends with return(rates_total) which=Bars as in number of historical bars available.  

I just corrected your original post and instructed you to use the code button, yet you totally ignored the instructions and added new code improperly.

Pay attention please, use the CODE button to insert code.

 
maximo #: Why would Metatrader in any case use the following if " It does not work at all."  😆

A variable does not work; it just is a value. Metaquotes used that Ternary because they returned rates_total. My link shows how it is unnecessary.

 
William Roeder #:

A variable does not work; it just is a value. Metaquotes used that Ternary because they returned rates_total. My link shows how it is unnecessary.

 Okay, so the variable prev_counted performs the same function as the old function IndicatorCounted()  which is to return the counted bars.



 It would be nice if a certain other moderator would be consistent in his application of "Use the CODE button" in numerous other previous comments.

 Not you William.