In essence, it is simply the standard deviation of the last x bars of a y-bar moving average. Thus, the TAI is a simple trend indicator when prices trend with authority, the slope of the moving average increases, and when prices meander in a trendless range, the slope of the moving average decreases.
You can change long to short in the Input Settings WARNING: - For purpose educate only - This script to change bars colors.