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)
1 2 3 4 5 6 |
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 |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
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
I think if you substitute Momentum for ROC in the code you get the tool values.
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)
I confirm too that the formula given above differs from the predefined TSI. Why this missmatch?
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
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”