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

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
On the road for now. You can try it yourself. The idea is to use unions with arrays of structures of different sizes, e.g. 10, 100, 1000, 10000...
This idea was used. In this case
Forum on trading, automated trading systems and trading strategies testing
Getting the number of decimal places of any numbers (not just quotes) bypassing Digits() in MQL4 and MQL5
fxsaber, 2018.12.08 16:25
Tried different sizes of course. For some reason don't affect the result.
This idea was used. In doing so
You can see everything in the sourcebook.Yeah, looked it up. Strange that it has no effect.
There is a line in the source that controls the size
You can change this value and see the result. If the value is greater than a hundred, the speed does not increase. It is actually easy to explain, because all the same number of elements are copied in total. And the slowdowns associated with small copy portions are eliminated.
I'm afraid we're already locked into maximum performance.
Yes, I agree.
I tried it - the same result as in your TicksToIntArray_fxsaber4/IntArrayToTicks_fxsaber4
You have the source code, you can measure it yourself.
So measure it. I'm pretty sure I don't, so I don't see the point in wasting time on either the article or the measurement.
I'm afraid we're already at the limit of performance.
To be honest, I'm very surprised that they managed to get so close to memcpy. It just can't be. Something is wrong.
I'm afraid we're already stuck with maximum performance.
I think I understand a very serious miscalculation of yours.
Your BANCH selects the minimum of 50 absolutely identical runs.
But the compiler is a big smartass and lazy. It won't do the same job 50 times and will optimize the code. That's why you should at least change the arrays on each run. Or you may replace 50 with 1 and increase the number of tests. Then the results will be quite different and more objective.
When the difference compared to memcpy is 40% it's more plausible
I wonder if compressing the array will have an effect. An array of ticks can be compressed by a factor of 10-12. Only question is whether this will save the resultant time in sending and receiving through the resource.
I think I understand a very serious miscalculation of yours.
Your BANCH selects the minimum of 50 absolutely identical runs.
But the compiler is a big smartass and lazy. It won't do the same job 50 times, it will optimise the code.
The code is written in such a way that it will do exactly what it is supposed to do. The compiler won't be able to affect the speed of memcpy, but the results of the passes are as follows
A loop of one pass
Out of 50
The code is written in such a way that it will do exactly what you want it to do. The compiler is unable to affect the speed of memcpy, but the results of the passes are
A loop of one pass
Out of 50.
So measure it. I'm pretty sure I don't, so I don't see the point in wasting time on either the article or the measurement.
I don't have to.