GetChartTimeframe

Description

The GetChartTimeframe method retrieves the timeframe setting of the specified chart.

Syntax

public GetChartTimeframe(chartId: number): number

Parameters

  • chartId: A number representing the chart ID

Return Value

Returns a number representing the chart's timeframe

Example

const chartId = this.api.GetCurrentChartId()
const timeframe = this.api.GetChartTimeframe(chartId)
console.log(`Chart ${chartId} timeframe: ${timeframe}`)

Last updated