True Strength Index (TSI)

View as Markdown

Description

The True Strength Index (TSI) is a momentum-based indicator, developed by William Blau. Designed to determine both trend and overbought/oversold conditions, the TSI is applicable to intraday time frames as well as long term trading.

Syntax

TSI(int fast, int slow)

TSI(ISeries\<double\> input, int fast, int slow)

Returns default value

TSI(int fast, int slow)[int barsAgo]

TSI(ISeries\<double\> input, int fast, int slow)[int barsAgo]

Return Value

double; Accessing this method via an index value [int barsAgo] returns the indicator value of the referenced bar.

Parameters

ParameterDescription
fastPeriod of the fast smoothing factor
inputIndicator source data (Series<T>)
slowPeriod of the slow smoothing factor

Examples

1// Prints the current value of a 20 period TSI using default price type
2double value = TSI(20, 10)[0];
3Print("The current TSI value is " + value.ToString());
4
5// Prints the current value of a 20 period TSI using high price type
6double value = TSI(High, 20, 10)[0];
7Print("The current TSI value is " + value.ToString());

Source Code

You can view this indicator method source code by selecting the menu New > NinjaScript Editor > Indicators within the NinjaTrader Control Center window.