For AI agents: a documentation index is available at the root level at /llms.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
The ChartControl class provides access to a wide range of properties and methods related to the location of objects on a chart and other chart-related properties. The ChartControl object provides information related to the entire hosting grid of the chart, which overlap with the ChartPanel, ChartScale and ChartBars.
The ChartControl object is ONLY guaranteed to be available when a NinjaScript type initiates from a Chart Window. There are situations where an indicator or strategy starts from another Windows (such as the Control Center’s Strategies Grid, or from a Strategy Analyzer), where the ChartControl object is NOT accessible. Therefore, the ChartControl object should always be safely accessed (e.g., from within a try-catch, or conditionally using null reference checks).
Warning: The ChartControl and its methods and properties should ONLY be accessed once the State has reached State.Historical.