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.
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...