Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1502

 

Of course I'm having a party tonight... so I've decided on

"never feed them after midnight". Don't use CXxx(standard library) in projects with a scope of more than half a year. The worst thing that could be done with MQL5 is done in it

 
double arr[];
   ArrayResize(arr,100000,100000);
This is an example from the help, but I get a compilation error. What should I do? I've tried, specifying types in array size, less errors, but they don't go away, tried returning function value in the same way, doesn't help either. Why doesn't the example from the help work?
 
pribludilsa:
This is an example from the help, but I get a compilation error. What should I do? I've tried, specifying types in array size, the errors are less, but they don't go away, I've also tried returning a function value in the same way, also doesn't help. Why doesn't the example from the help work?
What error does generate?
 
MakarFX:
What error does generate?

If you copy these two lines directly from the help. Errors like this.

 
pribludilsa:

If you copy these two lines directly from the help. Such errors.

Check the brackets
 
MakarFX:
Check the brackets.
There's nothing wrong with them. You don't need to look at my mistakes. You check your own. Or show an example where you were able to use this function without a compilation error.
 
pribludilsa:
There's nothing wrong with them. You don't need to look at my mistakes. You check your own. Or show an example where you were able to use this function without a compilation error.


0 errors:

youf

 
Vladislav Andruschenko:


0 errors:


Thank you.
 
Vladislav Andruschenko:


0 errors:


Well, yes, it turns out I can't allocate memory to an array globally. I can't in initialization either, then it's not available in ontika. How can I allocate a reserve array size so that I don't have to reallocate memory on every tick?
 
pribludilsa:
Well, yes, it turns out I can't allocate memory to an array globally. I can't in initialization either, then it's not available in ontika. How can I allocate a reserve size of an array so that on every tick I don't have to reallocate memory?
Maybe there is a better way to do what I do. So that I don't have to call the position enumeration twice, in order to offload the internet, I'm writing the position ticks to an array to close the trades later. I haven't got this piece together yet, I have a problem with separation of sell and buy ticket, I've sort of worked it out in my head. But i will be glad to get your advices, thanks.
Reason: