TickCounter provides information regarding the current number of ticks that are contained within the bar. The indicator can not only count starting from 0 but can also be set to count from a specified number down to 0. TickCounter can display the value either as absolute or as a percentage. It only works with candle charts in which the bars are established based on a fixed number of ticks.
When programming your own scripts, please use Bars, TicksCountForLastBar, or Bars, LastBarCompleteness.