MQL4参考 标准常量,列举和架构 图表常量

Chart Constants

Constants describing various properties of charts are divided into the following groups:

 

What's new in MQL5

The new generation platform has two times more timeframes (21 vs 9). It also features new graphical objects and analytical tools. Object anchors can be placed in any position between the chart bars up to a minute. Moreover, when switching between timeframes, the accurate positioning of the control points of the object is preserved.

You can set any chart properties directly from an MQL5 program. The number of properties has been increased. CHART_SHOW and CHART_IS_DOCKED are among the most notable ones. They allow moving any chart beyond the terminal turning it into a full-fledged separate trading panel. Disable the display of unnecessary areas on the chart and place OBJ_CHART objects, indicators and an EA on it to get your own trading control center with all the necessary technical analysis tools.

The table shows the new properties allowing you to fully manage a symbol chart.

ID

Description

Property Type

CHART_SHOW

Price chart drawing. If false, drawing any price chart attributes is disabled and all chart border indents are eliminated, including time and price scales, quick navigation bar, Calendar event labels, trade labels, indicator and bar tooltips, indicator subwindows, volume histograms, etc.

Disabling the drawing is a perfect solution for creating a custom program interface using the graphical resources.

The graphical objects are always drawn regardless of the CHART_SHOW property value.

bool

CHART_IS_OBJECT

Identifying "Chart" (OBJ_CHART) object –C returns true for a graphical object. Returns false for a real chart

bool   r/o

CHART_CONTEXT_MENU

Show chart on top of other charts

bool  (default is 'true')

CHART_CROSSHAIR_TOOL

Enabling/disabling access to the context menu using the right click.

When CHART_CONTEXT_MENU=false, only the chart context menu is disabled. The context menu of objects on the chart remains available.

bool  (default is 'true')

CHART_MOUSE_SCROLL

Enabling/disabling access to the Crosshair tool using the middle click.

bool

CHART_EVENT_MOUSE_WHEEL

Scrolling the chart horizontally using the left mouse button. Vertical scrolling is also available if the value of any following properties is set to true: CHART_SCALEFIX, CHART_SCALEFIX_11 or CHART_SCALE_PT_PER_BAR

When CHART_MOUSE_SCROLL=false, chart scrolling with the mouse wheel is unavailable

bool  (default is 'true')

CHART_EVENT_MOUSE_MOVE

Sending messages about mouse wheel events (CHARTEVENT_MOUSE_WHEEL) to all mql5 programs on a chart

bool

CHART_EVENT_OBJECT_CREATE

Send notifications of mouse move and mouse click events (CHARTEVENT_MOUSE_MOVE) to all mql5 programs on a chart

bool

CHART_EVENT_OBJECT_DELETE

Send a notification of an event of new object creation (CHARTEVENT_OBJECT_CREATE) to all mql5-programs on a chart

bool

CHART_KEYBOARD_CONTROL

Allow managing the chart using a keyboard ("Home", "End", "PageUp", "+", "-", "Up arrow", etc.). Setting CHART_KEYBOARD_CONTROL to false disables chart scrolling and scaling while leaving intact the ability to receive the keys pressing events in OnChartEvent().

bool

CHART_SHOW_OBJECT_DESCR

Display textual descriptions of objects (not available for all objects)

bool

CHART_SHOW_ONE_CLICK

Showing the "One click trading" panel on a chart

bool

CHART_IS_MAXIMIZED

Chart window is maximized

bool

CHART_IS_MINIMIZED

Chart window is minimized

bool

CHART_IS_DOCKED

The chart window is docked. If set to false, the chart can be dragged outside the terminal area

bool

CHART_FLOAT_LEFT

The left coordinate of the undocked chart window relative to the virtual screen

int

CHART_FLOAT_TOP

The top coordinate of the undocked chart window relative to the virtual screen

int

CHART_FLOAT_RIGHT

The right coordinate of the undocked chart window relative to the virtual screen

int

CHART_FLOAT_BOTTOM

The bottom coordinate of the undocked chart window relative to the virtual screen

int