Documentation
The long-awaited program of the website beta testing has been launched. For some time the website operation may be inconsistent. The website developers are filling up its contents now doing their best to make it maximum convenient for you. Please accept our apologies for the temporary inconvenience.
MQL5 ReferenceChart Operations 

Chart Operations

These are functions for working with charts. All chart operations are allowed in Expert Advisors and scripts only.

Function

Action

ChartApplyTemplate

Applies a specific template from a specified file to the chart

ChartWindowFind

Returns the number of a subwindow where an indicator is drawn

ChartOpen

Opens a new chart with the specified symbol and period

ChartClose

Closes the specified chart

ChartFirst

Returns the ID of the first chart of the client terminal

ChartNext

Returns the chart ID of the chart next to the specified one

ChartSymbol

Returns the symbol name of the specified chart

ChartPeriod

Returns the period value of the specified chart

ChartRedraw

Calls a forced redrawing of a specified chart

ChartSetDouble

Sets the double value for a corresponding property of the specified chart

ChartSetInteger

Sets the integer value (datetime, int, color, bool or char) for a corresponding property of the specified chart

ChartSetString

Sets the string valuefor a corresponding property of the specified chart

ChartGetDouble

Returns the double value property of the specified chart

ChartGetInteger

Returns the integer value property of the specified chart

ChartGetString

Returns the string value property of the specified chart

ChartNavigate

Performs shift of the specified chart by the specified number of bars relative to the specified position in the chart

ChartID

Returns the ID of the current chart.

ChartWindowOnDropped

Returns the number (index) of the chart subwindow, the Expert Advisor or script has been dropped to

ChartPriceOnDropped

Returns the price coordinate of the chart point, the Expert Advisor or script has been dropped to

ChartTimeOnDropped

Returns the time coordinate of the chart point, the Expert Advisor or script has been dropped to

ChartXOnDropped

Returns the X coordinate of the chart point, the Expert Advisor or script has been dropped to

ChartYOnDropped

Returns the Y coordinate of the chart point, the Expert Advisor or script has been dropped to

ChartSetSymbolPeriod

Changes the symbol value and a period of the specified chart.

ChartScreenShot

Provides a screenshot of the chart of its current state in a gif format