GetIndicatorCount

Description

The GetIndicatorCount method retrieves the number of indicators attached to a specified chart window.

Syntax

public GetIndicatorCount(chartId: number, subWindow: number): number

Parameters

  • chartId: A number representing the chart ID

  • subWindow: A number representing the subwindow index

Return Value

Returns a number representing the count of indicators in the specified window.

Example

const chartId = this.api.GetCurrentChartId()
try {
    const count = this.api.GetIndicatorCount(chartId, 0)
    console.log(`Number of indicators in main window: ${count}`)
} catch (error) {
    console.error('Failed to get indicator count:', error.message)
}

Last updated