This is based on the original TSI Indicator that's already built in.
The PC is originally taken as the change between the current price - the previous price. I substituted that with Rate of Change. Using a 1 period ROC it's quite similar to the TSI Indicator and increasing the length results in a smoother TSI.