- Functions for getting the basic properties of the current chart
- Chart identification
- Getting the list of charts
- Getting the symbol and timeframe of an arbitrary chart
- Overview of functions for working with the complete set of properties
- Descriptive chart properties
- Checking the status of the main window
- Getting the number and visibility of windows/subwindows
- Chart display modes
- Managing the visibility of chart elements
- Horizontal shifts
- Horizontal scale (by time)
- Vertical scale (by price and indicator readings)
- Colors
- Mouse and keyboard control
- Undocking chart window
- Getting MQL program drop coordinates on a chart
- Translation of screen coordinates to time/price and vice versa
- Scrolling charts along the time axis
- Chart redraw request
- Switching symbol and timeframe
- Managing indicators on the chart
- Opening and closing charts
- Working with tpl chart templates
- Saving a chart image
Checking the status of the main window
The pair of functions ChartSetInteger/ChartGetInteger allows you to find out some of the chart state characteristics, as well as change some of them.
Identifier |
Description |
Value type |
---|---|---|
CHART_BRING_TO_TOP |
Chart activity (input focus) on top of all others |
bool |
CHART_IS_MAXIMIZED |
Chart maximized |
bool |
CHART_IS_MINIMIZED |
Chart minimized |
bool |
CHART_WINDOW_HANDLE |
Windows-handle of the chart window (r/o) |
int |
CHART_IS_OBJECT |
A flag that a chart is a Chart object (OBJ_CHART); true is for a graphic object and false is for a normal chart (r/o) |
bool |
As expected, the Window handle and the attribute of the chart object are read-only. Other properties are editable: for example, by calling ChartSetInteger(ID, CHART_BRING_TO_TOP, true), you activate the chart with the specified ID.
An example of applying properties is given in the ChartList4.mq5 script in the next section.