Get the number of decimal places of any numbers (not just quotes) bypassing Digits() in MQL4 and MQL5 - page 17

 
Dmitry Fedoseev:

So he wrote.

He replied that he didn't understand.

Dmitry Fedoseev:

Who will control this multiplicity?

Someone who wants to write a universal conversion.

The universal one is laid out, so still have to go to a more practical task.

 
Dmitry Fedoseev:

Who will control this multiplicity?

I think that after defining the details of the implementation there will be a follow-up where the author will think through all the details and nuances... And now we are just testing different variants. More precisely the same variant, as it seems there are no special variants

 
Ilya Malev:

Here's another interesting task: to make an array sorting function faster than the built-in ArraySort.

P.S. I searched through sorting algorithms and couldn't find anything even close in speed to built-in ArraySort. )))) The closest thing was a binary tree...

 
fxsaber:

He replied that he didn't understand.

...

Here's a template for a union that includes a structure and an array.

template <typename S>
union UX{
   S s;
   char a[sizeof(S)];
};

If you fill in the structure that is part of the union, the array is ready right away. You can already send it somewhere, pass it as a parameter, you don't need an additional array.

The reverse conversion is ArrayCopy(). Copy some array to the array included in the union and the structure is ready, you can use it directly from the union, you can copy it to another structure, just sign =

 
fxsaber:
dll is it possible?
 
Dmitry Fedoseev:

Here's a template for a union that includes a structure and an array.

If you fill in the structure that is part of the association, the array is ready. You can already send it somewhere, pass it as a parameter, you don't need an additional array.

The reverse conversion is ArrayCopy(). You can copy an array to an array in the union, and the structure is ready.

Apparently I'm dumb, but I still don't get it. If you don't mind, could you formalise your idea in code?

The script for measuring each variant is in the branch, so you just need to insert the appropriate code there.

 
TheXpert:
dll is possible?

With a piece of memory, of course, it's easy, but everything has to work inside the MT. Therefore a DLL is not possible.

 
fxsaber:

With a piece of memory, of course, it's easy, but everything has to work inside the MT.

that's how everything will work inside the MT.

 
TheXpert:

this is how things will work inside the MT.

Without going outside the MQL.

 
fxsaber:

Apparently I'm dumb, but I still don't get it. If you don't mind, could you put your idea into code?

The script for measuring each option is in the branch, so you just need to insert the appropriate code there.

Apparently, but don't despair, all is not lost yet, I believe in you.

Reason: