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
It's not about my implementation. You can measure it the old-fashioned way.
Nevertheless, I would like to hear a reasoned opinion in support of working with pointers. All that has been expressed so far is: "allegedly faster", "allegedly makes programmers watch the memory and not allocate unnecessary space" and "you're a fool" - of course.
Left-right confused too or not?
It's just an outrageous mess in the head. Pointers are slower, not faster. About the need to watch out for memory the talk was in the context of the differences of programming style in languages with and without Garbage Collector.
Vasya, you don't remember what position you took in the argument after 2-3 posts already, it's going this way and that that way.
An example of a potential problem would be good.
One more point. It's better to create arrays of objects by means of a pointer. Otherwise you will get an array in stack memory which is very low:
I had an example of stack memory exhaustion just in case of recursive sorting with large amount of data.
The program just hung.
Besides, you may use global declaration and in this case it is not stack memory.
Don't you agree?
It's not a problem, much less a potential problem. It's just the peculiarities of memory handling in MT. Here is a static array:
And here is a dynamic array:
In this case everything compiles and works.
I agree, but I've never had such volumes in my practice.
As a rule, I need a quick calculation of an indicator "tail", for instance, without calling the built-in indicator (library) function itself,
, therefore, I applied a faster formula-based calculation of indicator values. In this case, the memory consumption in general is very low.
In general, I recommend this approach to all developers in the future to save memory and time of calculation of functions with floating point.
If possible, many data should be converted into integer format - it really speeds up the process.
P.S.: Of course, the above is a case of saving, for example, a few hundred milliseconds.
I'm making a class like this.
Now I want to call an object array:
How then to quickly create an array of objects if the constructor has parameters at global level?
For example? create objects first by changing the constructor and then how do I replace the objects in OnInit with symbols?
May be there is an easier solution?
In the declaration of the Strategy2 class, the name of the class constructor itself lacks "2", otherwise it's not a constructor.