True Strength Index (TSI) Divergence

Hi all,
I am looking for the program for detecting divergences with True Strength Index (TSI) as the indicator . I could not find any in this forum as well as in the Amibroker members zone. I could not proceed further since I dont know programming.

I am sure it must be available somewhere. Can some one help me ?

@umrperumal you mention that

If you are going to use AmiBroker you are going to need to learn how to do at least some basic code writing. This forum has many helpful members but they want to see that the posters are actually attempting to learn how to use AmiBroker. So I would suggest that you start learning and post your attempts here on the forum if you find problems that you can not solve. That's when you are likely to find this forum the most helpful.

Here is an example of one way to code the TSI.

// William Blau's True Strength Index, this version is 
// from 1995 book "Momentum, Direction, and Divergence", 
// formula on Page 5, with addition of a signal line (pg 4 chart)
// though he first published the TSI in Nov 1991 TASC article

// Blau used the letters "r" and "s" for his two smoothing periods

r 			= Param( "TSI 1st Smoothing - r", 25, 1, 100, 1 );
s 			= Param( "TSI 2nd Smoothing - s", 13, 1, 100, 1 );
SignalPds	= Param( "Signal Line Pds", 7, 1, 100, 1 );

Mtm 		= C - Ref( C, -1 );
AbsMtm 		= abs( Mtm );
Numerator 	= EMA( EMA( Mtm, r ), s );
Denominator	= EMA( EMA( AbsMtm, r ), s );
TSI 		= 100 * Nz( Numerator / Denominator );

tsiSignalLine = EMA( TSI, SignalPds );

// Charting
if( Status( "action" ) == actionIndicator )

    Plot( TSI, "TSI(" + r + "," + s + ")", colorLightBlue, styleLine | styleThick );
    Plot( tsiSignalLine, "TSI Signal Line(" + SignalPds + ")", colorRed, styleDashed );
    PlotGrid( 0, colorYellow, 9 );

And many examples of detecting divergence are mentioned in the forum, for example in this post (so you can code versions of these divergence codes using the TSI now that you've seen it coded).

Welcome to the forum and good luck!


Thanks a lot Mr Larry, for your reply.

I am using Amibroker with some understanding in coding. I can do some basic coding using the functions given in the software.

Frankly, I already have the code for TSI and I am using it as an indicator. I am having the code for TSI in a separate file, and including it in the main program as an "include" file.

TSI is an index, as I see, throws out reliable divergences, which I want to make use of for my investing. But I am at a loss to do it, because I am not knowledgeable enough to code a program for detecting divergences in TSI. I have searched members forum as well as community forum. There are some pieces of codes in members forum, but it is mainly for divergences in RSI indicator (with upper limit 70, bottom 30 and center 50), whereas TSI indicator construction oscillates above zero and below zero (with upper limit of 15 (approx), bottom limit of -15 (approx), and zero at the center.
Because of this I could not adopt the codes already available in the forum.

Hence I approached this community, since, as you have rightly said, there are many helpful members in the forum.

1- Positive divergence
2- Negative divergence
3- Inverse positive divergence
4- Inverse negative divergence

It will be very helpful if some one can help. Thanking you once again.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.