I can't find any documentation on how to implement the sorting of Lists in mql5. I see that CList calls the Compare() from the CObject pointer. So how can I call the child class Compare() overridden method from the parent pointer?
I figured it out, but I'm leaving the solution here in case anyone else runs into the same problem.
I forgot to and the keyword const after the method override which changed its signature.
for this you have to use the keyword 'override' always when you override methods, this way the compiler shouts if the method signature is changed:
it won't compile because of the 'const' difference
And you also forgot the 'virtual' keyword on both cases: