Errors, bugs, questions - page 281

 
uncleVic:

From the help:

FileReadArray

Reads arrays of any type except string arrays (can be an array of structures containing no strings and dynamic arrays) from a binary file from the current position of the file pointer.

Then what does the FileReadArray note at the very bottom of the help refer to:

" A string array can only be read from a file of type TXT. The function tries to increase the size of the array if necessary." ?

 
DV2010:

Then what exactly is the reference at the very bottom of the same help description referring to:

"Note A string array can only be read from a TXT file. If necessary, the function tries to increase the size of the array." ?

And where did you specify that you were opening a file of type TXT? Use the FILE_TXT flag
Документация по MQL5: Файловые операции / FileOpen
Документация по MQL5: Файловые операции / FileOpen
  • www.mql5.com
Файловые операции / FileOpen - Документация по MQL5
 
DV2010:

Then what exactly does the bottom of the same description refer to?

"Note A string array can only be read from a TXT file. If necessary, the function tries to increase the size of the array. " ?

My bad, I didn't notice that the array is a string array.

It says in the help section "File opening flags":

If no FILE_CSV, FILE_BIN or FILE_TXT is specified, then FILE_CSV is implied.

Probably helps:

 handle=FileOpen(filename,FILE_READ|FILE_COMMON|FILE_TXT);
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы ввода/вывода / Флаги открытия файлов
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы ввода/вывода / Флаги открытия файлов
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы ввода/вывода / Флаги открытия файлов - Документация по MQL5
 
stringo:
And where did you specify that you're opening a TXT file? Use FILE_TXT flag

Thought the software would figure it out : ))))

Thanks, it worked!

 

Please provide answers to 2 questions:

1. How can I make the strategy tester not go online during optimisation (single run) when the connection is enabled ? When the tester is blocked by a firewall, it does not work.

2. does MetaEditor5 have help like the navigator in MeaEditor4 ?

 

There are two variables local int e and global int ErrorLot

Four lines of the following code are executed inside the Expert Advisor:

ErrorLot=0;
int e=ErrorLot;
ErrorLot=1;
Print(e);

the Print() operator always outputs one.

The error cannot be repeated in a separate code.

The error is corrected by replacing the e variable with a global one.


When working with large position sizes the tester stops calculating losses at position closing and only writes off Swap:


Build 384

 
-Alexey-:

In last build some mistake appeared. Function

started to trigger on every tick, and even without ticks. As if it is looped (4 times per second steadily). And the terminal at the same time loads something continuously, although I'm not scrolling the window, and the indicator needs few candlesticks (what's on the screen). At the same time in task manager outputs chart values at maximum on both cores, CPU load also, and MT slows down (in this function I have calculation, if I remove it - no load, but looping remains). If you remove the indicator from the graph, the loading stops after some time. It wasn't like this before - it worked once, as it should. There is a code in front of it:

The data is enough, as the messages from the code are not printed. But from

There is a test message going on continuously.

As I was writing this post, 20 MBt has downloaded and continues.

Please fix it as it was as soon as possible.

If anyone has a not the latest build, please share.

It started again. I tried to install the Expert Advisor from the article on the chart:

https://www.mql5.com/ru/articles/100

Terrible lags and terminal keeps loading something. There was no such a thing before. There is no function if (prevcalculated==0) in the EA. What is going on? I also noticed that the terminal takes 200-500 MB in memory during such events, while when everything is OK, it takes 10 times less. Someone already wrote about the size in memory, they say - why half a gigabyte happens.

Пошаговое руководство по написанию MQL5-советников для начинающих
Пошаговое руководство по написанию MQL5-советников для начинающих
  • 2010.06.09
  • Samuel
  • www.mql5.com
Написание советников на MQL5 проще чем кажется, вы легко можете этому научиться. В этом руководстве вы познакомитесь с основными моментами, необходимыми для написания простого советника на основе конкретной торговой стратегии. Рассмотрена структура советника, использование встроенных технических индикаторов и торговых функций, вопросы отладки и тестирования советника на исторических данных.
 
Burgunsky:

Please provide answers to 2 questions:

1. How can I make the strategy tester not go online during optimisation (single run) when the connection is enabled ? When the tester is blocked by a firewall, it does not work.

Does MetaEditor5 have help similar to the navigator in MeaEditor4?

1. During a single run, the tester does not go to the Internet by itself, it contacts your own machine.

At the same time, it receives information about the market environment and history data from the trading terminal (if necessary, the history data will be synchronized).

By blocking the tester, you are interfering with the work of the tester agents, thereby violating the basic algorithms of interaction between the Strategy Tester and the trading terminal (which is located on your own computer).

2. Help is available only as a separate file, PDF or CHM (the latter is included) + Online version.

 
The tester agent does not go online, but only works with the terminal. The traffic between the terminal and the agents is counted as shared.
 

Wow. The tester really isn't connecting to the internet. All tester connections go to localhost:loopback, i.e. to itself, on a loopback.

You don't have one of these?Help in the MetaEditor4 navigator

Reason: