GetIndicatorName

Description

The GetIndicatorName method retrieves the name of an indicator at the specified index in a chart window.

Syntax

public GetIndicatorName(chartId: number, subWindow: number, index: number): string

Parameters

  • chartId: A number representing the chart ID

  • subWindow: A number representing the subwindow index

  • index: A number representing the indicator index

Return Value

Returns a string representing the indicator's name.

Example

const chartId = this.api.GetCurrentChartId()
try {
    const indicatorName = this.api.GetIndicatorName(chartId, 0, 0)
    console.log(`First indicator name: ${indicatorName}`)
} catch (error) {
    console.error('Failed to get indicator name:', error.message)
}

Last updated