TII (trend intensity index) indicator

How can I define or implement a TII (trend intensity index) indicator inside the algo?

Hi @sunita_sriv
can you share the pine script / math formula for TII.

If we can get the formula, we can simply call the historical data, and apply the function for TII on it to get its values