Period

Description

The Period method returns the timeframe period of the current chart.

Syntax

public Period(): number

Return Value

Returns a number representing the current chart's timeframe period.

Example

try {
  const period = this.api.Period();
  console.log(`Current chart timeframe: ${period} minutes`);
} catch (error) {
  console.error("Failed to get chart period:", error.message);
}

Last updated