How to calculate the number of candlesticks between the previous MACD cross over and the current MACD cross over in Trade script?

you can not calculate the number of candlesticks between two signals in tradescript