GetChartInformation

Returns information about the current chart state and properties.

Syntax

GetChartInformation(): TChartInfo | null

Return Value

Returns a TChartInfo object containing chart information, or null if the operation fails.

Description

The GetChartInformation method provides detailed information about the current chart state, including visible bar indices, paint rectangle dimensions, bar width, and current zoom level. This information is useful for indicators that need to understand the chart's visual state and coordinate system.

The returned TChartInfo object contains the following properties:

  • firstIndex - Index of the leftmost visible bar on the chart

  • lastIndex - Index of the rightmost visible bar on the chart

  • paintRect - Rectangle defining the chart's paint area

  • barWidth - Width of each bar in pixels

  • currZoom - Current horizontal zoom level

Example

Last updated