# Program 30 | True Strength Index (TSI) divergence

Program 30 is a TradeStation Indicator developed using EasyLanguage designed to look for potential divergences between price and the True Strength Index (TSI). It works similar to program 27  and program 28 which look for divergence between price and MACD and price and stochastics respectively.

The True Strength Index (TSI) is a momentum-based indicator, originally developed by William Blau. It is used to find the trend and overbought/oversold conditions. Some technical analysts believe that bullish and bearish divergences in the TSI may foreshadow reversals.

I have used the following formulae to calculate TSI in this program:

// Calculate True Strength Index
Value1 = XAverage( XAverage( Price – Price[1], TSIPeriod1 ), TSIPeriod2  ) ;
Value2 = XAverage( XAverage( AbsValue( Price – Price[1] ), TSIPeriod1 ), TSIPeriod2 );
TrueStrengthIndex = 100 * _Divide( Value1, Value2 );
XAvgTSI = XAverage( TrueStrengthIndex, TSIPeriod3 );

In addition to looking for divergence, program 30 plots TSI, an exponential moving average of TSI, the difference between the TSI and the exponential moving average of TSI (smoothed TSI)  as well as a horizontal lines at the zero level.

The program also looks for divergence between price and the TSI. The user may select (by user input) whether to use:

• TSI,
• exponential moving average of TSI (smoothed TSI), or
• The difference between TSI and the exponential moving average of TSI

to search for divergence (see user inputs below). The width of the plot of the type of TSI chosen is made wider so that you can easily see which line the program is using.

When a potential divergence is found a line is drawn between price pivots corresponding to pivots in the TSI. Since price and TSI pivots do not necessarily occur on exactly the same bar, the program has a user input to determine how many bars apart the price pivot and the TSI pivot can occur. The price pivot can occur before the TSI pivot, or vice versa.

This UNPROTECTED program (i.e. the TradeStation EasyLanguage indicator) is available for immediate download for \$97.95 by clicking the ‘add to cart’ button to pay using Credit card or PayPal.

• a user guide in PDF format
• a video that explains how to modify the program to use a different indicator (e.g. RSI).
• a plain text version of the program

You may also download a bundled package consisting of programs 27, 28, and 30 for \$195-. This is a substantial discount when compared with buying the three programs separately. These programs are available for immediate download by clicking the ‘add to cart’ button to pay using Credit card or PayPal.

A bundled package of program 28 (Stochastic divergence for charts, scanner and RadarScreen), program 30 (True Strength Index (TSI) divergence) and program 42 (RSI Divergence Indicator and Showme Study) is also available for immediate download for \$149.95.

The programs were developed in TradeStation 9.0 and work on intraday, daily, weekly, and monthly charts. The indicator may be applied to tick charts, but the pattern text may not display correctly due to an EasyLanguage drawing tool limitations. Because the programs are unprotected you can open them up and see the program code as well as modify it.

As usual, Gold Pass members get an additional 20% discount off all program and tutorial prices. If you are a Gold Pass member make sure you enter the special coupon code to get 20% discount off these prices.

This program uses a different method from that employed in some of the earlier CCI divergence programs. I explain this in a video which accompanies the download.

The program may be applied to charts, RadarScreen, and/or the scanner. I demonstrate this in the video below. It also includes alert functionality for RadarScreen which my be controlled by the indicator settings.

### Inputs

MaxArraySize( 3 ), // Maximum = 5. Determines how many previous pivots are compared each time a new price pivot and corresponding TSI pivot are discovered
PriceL( Low ),
PriceH( High ),
Price( Close ), // Input to True Strength Index calculation
WhichTSI( 1 ), // 1 = True Strength Index, 2 = Exponential Moving Average of True Strength Index
TSIPeriod1( 25 ), // Input to True Strength Index calculation
TSIPeriod2( 13 ), // Input to True Strength Index calculation
TSIPeriod3( 5 ), // Input to True Strength Index calculation
LowerColor( Darkgreen ), // Color of lines indicating possible bullish divergence
UpperColor( DarkRed ), // Color of lines indicating possible bearish divergence
LineSize( 3 ), // Determines thickness of line drawn on chart
LeftStrength( 3 ), // Left strength of pivots
RightStrength( 2 ), // Right strength of pivots
BarTol( 3 ); // The number of bars within which the price and TSI pivot must occur for the pivots to be considered to have occurred on the same bar

### Video demonstration of program 30

This UNPROTECTED program (i.e. the TradeStation EasyLanguage indicator) is available for immediate download for \$97.95 by clicking the ‘add to cart’ button to pay using Credit card or PayPal.

• a user guide in PDF format
• a video that explains how to modify the program to use a different indicator (e.g. RSI)
• a plain text version of the program

You may also download a bundled package consisting of programs 27, 28, and 30 for \$195-. This is a substantial discount when compared with buying the three programs separately. These programs are available for immediate download by clicking the ‘add to cart’ button to pay using Credit card or PayPal.

A bundled package of program 28 (Stochastic divergence for charts, scanner and RadarScreen), program 30 (True Strength Index (TSI) divergence) and program 42 (RSI Divergence Indicator and Showme Study) is also available for immediate download for \$149.95.

The programs were developed in TradeStation 9.0 and work on intraday, daily, weekly, and monthly charts. The indicator may be applied to tick charts, but the pattern text may not display correctly due to an EasyLanguage drawing tool limitations. Because the programs are unprotected you can open them up and see the program code as well as modify it.

As usual, Gold Pass members get an additional 20% discount off all program and tutorial prices. If you are a Gold Pass member make sure you enter the special coupon code to get 20% discount off these prices.

Please note that any screen shots on this site are examples and are not meant to imply that any of these programs will generate profitable trades. THESE INDICATORS, SHOW ME STUDIES, STRATEGIES AND OTHER PROGRAMS HAVE BEEN INCLUDED SOLELY FOR EDUCATIONAL PURPOSES.

TO THE BEST OF MARKPLEX CORPORATION’S KNOWLEDGE, ALL OF THE INFORMATION ON THIS PAGE IS CORRECT, AND IT IS PROVIDED IN THE HOPE THAT IT WILL BE USEFUL. HOWEVER, MARKPLEX CORPORATION ASSUMES NO LIABILITY FOR ANY DAMAGES, DIRECT OR OTHERWISE, RESULTING FROM THE USE OF THIS INFORMATION AND/OR PROGRAM(S) DESCRIBED, AND NO WARRANTY IS MADE REGARDING ITS ACCURACY OR COMPLETENESS. USE OF THIS INFORMATION AND/OR PROGRAMS DESCRIBED IS AT YOUR OWN RISK.

ANY EASYLANGUAGE OR POWERLANGUAGE TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (AND PARTS THEREOF) AND ASSOCIATED TECHNIQUES REFERRED TO, INCLUDED IN OR ATTACHED TO THIS TUTORIAL OR PROGRAM DESCRIPTION ARE EXAMPLES ONLY, AND HAVE BEEN INCLUDED SOLELY FOR EDUCATIONAL PURPOSES. MARKPLEX CORPORATION. DOES NOT RECOMMEND THAT YOU USE ANY SUCH TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (OR ANY PARTS THEREOF) OR TECHNIQUES. THE USE OF ANY SUCH TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS AND TECHNIQUES DOES NOT GUARANTEE THAT YOU WILL MAKE PROFITS, INCREASE PROFITS, OR MINIMIZE LOSSES.