HPotter

Trend Analysis Index

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.

Skript med en öppen källkod

I sann TradingView-anda har författaren publicerat detta skript med öppen källkod så att andra handlare kan förstå och verifiera det. Hatten av för författaren! Du kan använda det gratis men återanvändning av den här koden i en publikation regleras av våra ordningsregler. Du kan ange den som favorit för att använda den i ett diagram.

Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 28/05/2014
// 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.
////////////////////////////////////////////////////////////
study(title="Trend Analysis Index", shorttitle="TAI")
AvgLen = input(28, minval=1)
TAILen = input(5, minval=1)
hline(0, color=purple, linestyle=dashed)
xPrice = close
xSMA = sma(xPrice, AvgLen)
xHH = highest(xSMA, TAILen)
xLL = lowest(xSMA, TAILen)
nRes = (xHH - xLL) * 100 / xPrice
plot(nRes, color=blue, title="TAI")