Nicolas

True Strength Index TSI

Category: Indicators By: Nicolas Created: October 26, 2015, 8:36 PM
October 26, 2015, 8:36 PM
Indicators
6 Comments
True Strength Index TSI

The true strength index (TSI) is a technical indicator used in the analysis of financial markets that attempts to show both trend direction and overbought/oversold conditions. It was first published William Blau in 1991. The indicator uses moving averages of the underlying momentum of a financial instrument. Momentum is considered a leading indicator of price movements, and a moving average characteristically lags behind price. The TSI combines these characteristics to create an indication of price and direction more in sync with market turns than either momentum or moving average. (source: wikipedia)

a = (ExponentialAverage[13](ExponentialAverage[25](ROC[1](close))))
b = (ExponentialAverage[13](ExponentialAverage[25](ABS(ROC[1](close)))))

TSI = 100 * (a/b)

RETURN TSI as "True Strength Index", 0

 

Download
Filename: True-Strength-Index.itf
Downloads: 274
Nicolas
Nicolas Legend
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

Anonymous
2 years ago
#

Hi I had same problem, so I translated from NinjaTrader TSI's formula to PRT code, seems the same values now! Fast = 3 Slow = 14 constant1 = 2 / (1 + Slow) constant2 = 1 - (2 / (1 + Slow)) constant3 = 2 / (1 + Fast) constant4 = 1 - (2 / (1 + Fast)) IF BarIndex = 0 THEN fastAbsEma = 0 fastEma = 0 slowAbsEma = 0 slowEma = 0 Valor = 0 ELSE momento = Close[0] - Close[1] slowEma = momento * constant1 + constant2 * slowEma fastEma = slowEma * constant3 + constant4 * fastEma slowAbsEma = Abs(momento) * constant1 + constant2 * slowAbsEma fastAbsEma = slowAbsEma * constant3 + constant4 * fastAbsEma[1] IF fastAbsEma = 0 THEN Valor = 0 ELSE Valor = 100 * fastEma[0] / fastAbsEma[0] ENDIF ENDIF Return Valor AS "TSI"

Bateson
3 years ago
#

Bonjour. L'indicateur fonctionne remarquablement. Je n'arrive cependant pas à l'intégrer dans une stratégie "croisement TSI / TMA". Pourriez-vous m'indiquer comment faire ? Cordialement

gelex911
6 years ago
#

I confirm too that the formula given above differs from the predefined TSI. Why this missmatch?

marzibre
7 years ago
#

Hello Nicholas I confirm you that the formula it is not the same. Could you please give me a link where I can find the predifined code of True Strenght Index? I need to it to take as example to create the True Directional Index (another William Blau indicator)

Dunkelmann
8 years ago
#

I think if you substitute Momentum for ROC in the code you get the tool values.

Martial Schaff
9 years ago
#

Hello, The formula you describe in this post is not the same as in the prorealtime tool (predefined indicators). Could you please show the formula used in prorealtime? Thanks

ProRealCode ProRealCode
Loading...