Algorithms, solution methods, comparison of their performance - page 16

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
This is an interesting and useful proposal. Maintaining parallel records. Did it in my other solutions.
The only thing we don't know is the number of orders which will be placed by the Expert Advisor. What size should we set for the int array?
That's why I decided to take the string.
You set a margin of 100 elements and add 100 elements at a time... String has the same implementation
I can't find theGeneric file, it seems to be an old build. So, how will the navigation principle be provided - what is the source code?
https://www.mql5.com/ru/forum/221917
Peter, there is a great function called ArrayResize(). It allows you to increase the size of an array at runtime.
As an option, I was thinking about it.
1. I doubted it from the viewpoint of speed.
2. From the code point of view - more lines and more confusion.
When the array is resized, the data disappear from it (if I'm not mistaken).
So, they have to be stored in another array which must also be incremented.
This results in the back and forth rewriting I mentioned earlier.
As an option - thought about it.
1. In terms of speed - questioned.
2. From the code point of view - more lines and more confusion.
When the array is resized, the data disappear from it (if I'm not mistaken).
So they have to be reserved in another array, which also has to be increased.
You get the back and forth rewriting I was talking about earlier.
No, they don't.
No, they don't.
Are you sure?
Yes. The data doesn't disappear.
Are you sure?
in fact, it's the line.... that's causing all the fuss. adds an element to the end of the array. Everything else is trivial.
The principle is the same in the sheet but packed into a class.2. In terms of code - more lines and more confusion.
How confusing, how much effort it takes to read......
Your solution is 100% prettier, more elegant and faster.
An approximate solution on CHashMap:
in fact, it's the line.... that's causing all the fuss. adds an element to the end of the array. Everything else is trivial.
in a sheet the principle of adding is the same only packed into a classIt seems the perfect variant has been found. I ask everyone to check it.
If I was sure that the data would not disappear from the array when it was resized, the solution would be this: