New article MQL5 Cookbook: Handling Custom Chart Events has been published at mql5.com:
This article is a logical continuation of the article MQL5 Cookbook: Handling Typical Chart Events.
It covers methods of work with custom chart events. Here the reader can
find examples of developing and handling of custom events. All the
ideas discussed in this article were implemented with object-oriented
As the theme of custom events is rather broad, it is the case when a
programmer and developer can introduce creativity to their work.
It is clear that this event is defined by the user. It is up to a programmer to decide what exactly and which
task or a program block could take the form of an event. The MQL5
developers can create their own events, which expands the language
capabilities for implementation of complex algorithms.
A custom event is the second possible type of a chart event. The
first one is a typical event. Although there is no such a term as
"typical chart event" in the Documentation, I still suggest using it for the first ten types of chart events.
The developers suggest only one enumeration for all chart events—ENUM_CHART_EVENT.
According to the Documentation, there are 65535 identifiers of custom
events. The first and the last identifiers of the custom events are set
by the the explicit values of CHARTEVENT_CUSTOM and
CHARTEVENT_CUSTOM_LAST, which is numerically equal to 1000 and 66534
Fig.1 The first and the last identifiers of custom events
Author: Dennis Kirichenko