Indicator - Trend Analysis Index
Function - TAI
Category: Indicator > Trend Identificator
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.
The characteristics and uses of this simple indicator are similar to the far more complex average directional index (ADX).
Price - data type to analyze
AvgLen - number of bars to calculate MA
TaiLen - number of bars to calculate TAI
PLOT1(IFF(CURRENTBAR > AVGLEN, TAI(PRICE, AVGLEN, TAILEN), 0),"PLOT1");