GetChartInformation
Returns information about the current chart state and properties.
Syntax
GetChartInformation(): TChartInfo | nullReturn 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 chartlastIndex- Index of the rightmost visible bar on the chartpaintRect- Rectangle defining the chart's paint areabarWidth- Width of each bar in pixelscurrZoom- Current horizontal zoom level
Example
Last updated