Actually, the most versatile and flexible variant is, of course, pointers to functions. You need to be able to sort by different parameters, and there is only one class method. At the moment there are no delegates in MQL, so we have pointers to static methods of the class. It looks like this:
If you press TAB right after the words if, else, while, for, do, there will be a little extra construction...
And not only after them. Also after OnInit, OnTick, OnCalculate, OnDeinit, class, etc. And it would be very nice if you could set the template of these constructions yourself.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
That is - you need to use pointers to functions
Not necessarily. Classes with an overridden operator () are also great for this
Is it possible to overload this operator in MQL?
Actually, the most versatile and flexible variant is, of course, pointers to functions. You need to be able to sort by different parameters, and there is only one class method. At the moment there are no delegates in MQL, so we have pointers to static methods of the class. It looks like this:
Can this operator be overloaded in MQL?
Thank you all who responded. I'll try and figure it out.
If you press TAB immediately after the words if, else, while, for, do, there will be a little extra construction...
If you press TAB right after the words if, else, while, for, do, there will be a little extra construction...