Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

aChartsAndMW5Class - MetaTrader 5 Library - MT4/MT5 Resources

author EAcpu | 3 reads | 0 comments |

This class allows you to easily determine from an MQL5 program any changes in the Market Watch window (changes in symbol sorting, addition, deletion of a symbol or a group of symbols), opening and closing of charts, and the availability of one-click trading options on the current chart on which the program is running. This class sends custom events to the control program.

The following public methods are provided in the program:

Identifier values ​​are related to identifiers from the graphics library by Anatoly Kazharsky , although you can set them at your own discretion.

The value passed to the control program with the event:

In order to include this class into your program, you must include the file in the global zone and create an instance of the class:

Then, in the timer () program function, add the class timer:

Add class event handler ChartEvent ():

Events returned by this class can now be accepted and handled programmatically by chart events ().

An example of receiving events from a class can be found in the accompanying Expert Advisor exTestChartsMWClass.mq5


Attachment download

📎 achartsandmwclass.mqh (56.37 KB)

📎extestchartsmwclass.mq5 (12.74 KB)

Source: MQL5 #17448

Verification code Refresh