Errors, bugs, questions - page 2676
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
MT5 (build 2347) Why such a big overhead when adding one element at a time to an array using ArrayResize, if memory has been reserved for them in advance?
Please consider improving the internal reservation algorithm with ArrayResize.
For example, for classes we can assume that they perform some kind of "internal registering in lists" in addition to calling the constructor.
And within the framework of reservation with ArrayResize, apart from direct memory allocation, you can try to optimize the process:
- take data from the adjacent created element (e.g. pointer to a virtual function table);
- pre-execute or reserve space for "internal registration" of classes that have not yet been created;
Thanks for the message.
The ArrayResize code is protected from being called empty (when there is no change in the number of elements), so the function code does not work.
Whereas a real change in the number of elements triggers one or the other part of the ArrayResize function, depending on the array
Thanks to the code you presented, I was able to reduce the complexity of one part of ArrayResize to zero, this will speed up the function for arrays of objects
Can you tell me how to reduce the memory consumption of the terminal? When I run an EA, I request a few million ticks. I make calculations on them and don't need them anymore. I only use tick functions to load fresh ticks so there are no gaps.
Because of those million ticks the terminal consumes 500 Mb of memory and doesn't hurry to free it. To be more exact, it simply doesn't free it. Is it possible to force Terminal to clear all its caches to minimize consumption? For a VPS, 0.5 GB per terminal is too much.
Can you tell me how to reduce the memory consumption of the terminal? When I run an EA, I request a few million ticks. I make calculations on them and don't need them anymore. I only use tick functions to load fresh ticks so there are no gaps.
Because of those million ticks the terminal consumes 500 Mb of memory and doesn't hurry to free it. To be more exact, it simply doesn't free it. Is it possible to force Terminal to clear all its caches to minimize consumption? For VPS, 0.5 GB per terminal is too much.
ArrayFree
If your program needs to manage memory in complex dynamic environments, the ArrayFree() function allows you to explicitly and immediately free memory occupied by a dynamic array which is no longer needed.
ArrayFree
Free, of course. The terminal itself stores ticks in its cache, which I don't need during operation.
It's better for me to raise these ticks again when I'm cold. I need a mechanism to "cool down" the Terminal.
Hello, encountered a problem that CopyTicks and CopyTicksRange in the tester can't get data from other tools... When added to the chart, everything works.
Build 2363 (and the same was on 2361)
May I have made a mistake? Please help, thank you!
Hello, encountered a problem that CopyTicks and CopyTicksRange in the tester can't get data from other tools... When added to the chart, everything works.
Build 2363 (and the same was on 2361)
May I have made a mistake? Please help, thank you!
CopyTicks does not initiate a data upload in the tester
Request CopyRates of the desired instrument first. At least 1 bar. Then pumping and generation of tick sequence will take place.
After that, quietly request ticks
Thanks for the message.
Thanks to the code you presented, I managed to reduce the complexity of one part of ArrayResize to zero, this will speed up the function for arrays of objectsThe ArrayResize code has protection against an empty call (when there is no change in the number of elements), so the function code does not work.
Whereas a real change in the number of elements, triggers one or the other part of the ArrayResize function, depending on the array
Good afternoon, thank you very much.
I haven't used the new operator before, as it should be slower by logic than ArrayResize with reserved memory.
But I'm impressed with the results obtained, it turns out that it's vice versa, the native array via new operator is faster.
MT5 (build 2363):
CopyTicks does not initiate a data upload in the tester
Request CopyRates of the desired instrument first. At least 1 bar. Then pumping and generation of tick sequence will take place.
After that, quietly request ticks
Thank you very much, it helped. I couldn't find it in the documentation... Or I searched badly? It would be good to write about it there :)
It would be better to make automatic uploads like on CopyRates.
Cleaned up the list of "old" inactive agents in my profile yesterday
A day later I go to the profile and see that the list of agents has been restored to the entries that were deleted.
And the date of creation and activity of agents has been changed