You will need a counter adding +1 for each new candle passing since. You'll need a variable to do that. Are you familiar with variables?