True Strength Index (TSI) double smoothens the price changes, thus filtering out the noise. TSI can be used to identify trends and reversals as well as to to determine overbought and oversold conditions.

Hierarchy

Constructors

  • Parameters

    • priceChart: TradingChart
    • chart: ChartXY<UIBackground>
    • openValues: number[]
    • highValues: number[]
    • lowValues: number[]
    • closeValues: number[]
    • lineColor: Color
    • lineWidth: number
    • rowIndex: number

    Returns TrueStrengthIndex

Methods

  • Gets the indicator name.

    Returns string

    The indicator name.

  • Sets the color of the True Strength Index line.

    Parameters

    • newColor: string

      New line color as string, should be in HEX format e.g. #FFFFFF.

    Returns void

  • Sets the line width of the indicator.

    Parameters

    • newWidth: number

      New line width.

    Returns void

  • Sets the types of moving averages used to calculate the smoothings and the Signal line.

    Parameters

    • firstSmoothMovingAverage: MovingAverageType

      Moving average type for the first smoothing.

    • doubleSmoothMovingAverage: MovingAverageType

      Moving average type for the second (double) smoothing.

    • signalMovingAverage: MovingAverageType

      Moving average type for calculating the Signal line.

    Returns void

  • Sets the name of the indicator.

    Parameters

    • name: string

      New indicator name.

    Returns void

  • Moves the indicator from its calculated position forward or backward.

    Parameters

    • newOffset: number

      New offset value.

    Returns void

  • Sets the various time period counts used to calculate the indicator.

    Parameters

    • pricePeriodCount: number

      The number of time periods used to calculate the price change (value - value n periods ago).

    • firstSmoothPeriods: number

      The number of time periods used to calculate the first smoothing.

    • doubleSmoothPeriods: number

      The number of time periods used to calculate the second (double) smoothing.

    • signalPeriods: number

      The number of time periods used to calculate the Signal line.

    Returns void

  • Sets the color of the Signal line.

    Parameters

    • newColor: string

      New line color as string, should be in HEX format e.g. #FFFFFF.

    Returns void

  • Sets which values the indicator calculations are based on.

    Parameters

    • source: Source

      Values to base the calculations on.

    Returns void

  • Sets the type of the indicator's value label(s).

    Parameters

    Returns void

  • Sets the visibility of the indicator. Hiding the indicator via setVisible(false) does not remove it. Use dispose() to delete any indicator.

    Parameters

    • visible: boolean

      Visibility of the indicator.

    Returns void

  • Programmatically opens the indicator settings menu.

    Returns void