Discussing the article: "From Basic to Intermediate: Handling Mouse Events"

 

Check out the new article: From Basic to Intermediate: Handling Mouse Events.

This article belongs to the category of materials where simply looking through and studying the code is definitely not enough to understand the processes involved. In fact, you need to create an executable application and run it on any chart. This is done so that you can understand small details that would otherwise be extremely difficult to grasp, such as using the keyboard and mouse together to create certain elements.

So, let us begin by understanding the following point: the mouse is an extremely inefficient, inconvenient, and difficult-to-handle control element that creates significant difficulties in programming. It behaves in seemingly random ways, without taking into account either the way the code works or the programmer’s own constraints. Although the MetaTrader 5 graphical interface is very useful and provides considerable flexibility, by default it does not generate mouse events for any applications running on this platform. But why? The reason is precisely that MetaTrader 5 is focused on providing excellent performance and efficiency. Mouse handling, in turn, can negatively affect performance and efficiency. Moreover, chart-based applications are usually very poorly optimized for mouse-related events.

You may not have a clear idea of how serious a problem mouse events can become if an application is poorly optimized to handle them. However, we will examine this issue in more detail in the following articles. But first we need to understand some other things.

Perhaps you have already begun to think about the first of them: "Well, dear author, I think you are mistaken about using the mouse on this platform. When we right-click on the chart, we gain access to a set of elements that can be used directly there. In addition, we can send and process orders using the One Click function in MetaTrader 5. Therefore, your claim that the mouse is a problem is simply a sign of a lack of knowledge on your part."


Author: CODE X