Errors, bugs, questions - page 2244

 
Ilyas:

It doesn't matter what data is contained in an uninitialized array, at any moment, the data can change, no one guarantees its value.
That's why using uninitialized variables (read memory) sometimes leads to situations, with a long search for the cause:

  1. Works on one computer, not on the other
  2. Works in the terminal, not in the tester
  3. After upgrading terminal/OS program behaved differently
  4. I added Print it did not work anymore.
  5. etc.

I can only give some advice.
You should get into the habit of always initializing data, so that in the future you don't waste a lot of time searching for errors related to the lack of initialization.

Thanks for the clarification and advice.

 
Ilyas:

ArrayResize doesn't clean up memory, so it contains rubbish from the previous "consumer".

This is done for speed, because after memory is allocated to an array, in 99.99(9)% of cases, the user will "fill" it with their data.


This is not the right explanation, which may cause problems for newbies; the ArrayResize help file has the right explanation.

In essence, the newbies need to first understand what an array is and how it is stored in memory, how it is created and how the memory is allocated to it, then they won't have any problems.

ps. in general, the implementation of arrays in MQL5 is worse than in C++, as well as the structures.

In simple programs the implementation of arrays is successful, in complex ones it becomes a problem

 
Artyom Trishkin:

What do you mean "no"? No one takes the memory stick out of the motherboard slot. Once the memory is present and freed (not initialized with a value, but freed), it will be used for other program needs.

Memory, is the stored information, not the storage medium, which is the RAM bar.

I didn't know that memory is not zeroed out, but only freed/allocated addresses to store it and you have to organise the clearance yourself.

Thanks.
 

I've noticed for a long time that the search for brokers/trading servers doesn't work properly when opening a demo account via Terminal.

I enter the name of broker and get nothing


If I enter the full name of trade server I get the desired result


 

Installation of MT5 1882, file downloaded from website (https://download.mql5.com/cdn/web/metaquotes.software.corp/mt5/mt5setup.exe?utm_source=www.mql5.com&utm_campaign=download).
UAC enabled, error occurs before granting admin rights.
Running as admin does not solve the problem, only hides the error message box.




 

Any advice? Build 1881 mt5. I am running normal optimization. Result is that optimization is re-run, but local agents don't start - only connect and disconnect. Nothing in agents logs.

Only restarting mt helps.

 

In the same build I encountered a problem. Mt doesn't want to append to the end of the file as it was before - it always rubs it in

int f = FileOpen(file,FILE_COMMON|FILE_READ|FILE_WRITE|FILE_TXT);

 

2018.07.26 19:23:56.269 Core 01 tester agent authorization error

How is it ))) ? and what to do?

 
Anton Ohmat:

2018.07.26 19:23:56.269 Core 01 tester agent authorization error

How is it ))) ? and what to do?

At best, the renderer window is not closed. At worst, an ancient known problem.

 
Anton Ohmat:

In the same build I encountered a problem. Mt doesn't want to append to the end of the file as it was before - it always rubs it in

int f = FileOpen(file,FILE_COMMON|FILE_READ|FILE_WRITE|FILE_TXT);

Do you perform a FileSeek on the end of the file before writing the file?