Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1030

 
Igor Makanu:

But I want the file in "MQL5\Files" !!!

There's no harm in wanting. You just need to understand the difference in testing and real work. From the "Tester" folder the files are deleted after the end of the test, while in real life they are saved. If I remember correctly.

 
Alexey Viktorov:

There's no harm in wanting to. You just need to understand the difference between testing and real work. From the "Tester" folder the files are deleted when the test is finished, while in real life they are saved. If I remember correctly.

I understand the difference and that's why I asked for help.

 
Igor Makanu:

I understand the difference and that's why I asked for help

If you understand the difference, you must also understand the impossibility of implementing such a request with MQL tools

 
Alexey Viktorov:

If you understand the difference, you must also understand that it is impossible to do this with MQL tools

OK

then this is the only right solutionhttps://www.mql5.com/ru/forum/227192

Запись и чтение файла
Запись и чтение файла
  • 2018.02.08
  • www.mql5.com
Сохраняю в тестере файл .bin экспертом №1, через FileOpen...
 
Alexey Viktorov:

There is no harm in wanting. You just have to understand the difference between testing and real work. Files are deleted from the Tester folder after completing a test, while they are saved in the real world. If I remember correctly.

The log file in the "Tester" folder is not deleted. Files saved in the test are not removed from the default folders either. But "I want to go there" is a limitation of MQ.

 
how in MQL5 to catch errors like "array out of range in ......" for example with this code in an indicatorPrint(high[rates_total]);
"
 
Tango_X:
how to catch errors in MQL5 like "array out of range in ......"? For example, with the following code in the Print(high[rates_total]) indicator;
"

you can always check if the array is out of range with ArraySize()https://www.mql5.com/ru/docs/array/arraysize

in your case Print(high[rates_total-1]) is enough; https://www.mql5.com/ru/docs/event_handlers/oncalculate

const intrates_total,//size of input times eries

the entire rates_total time series, but the numbering starts from zero high[ rates_total-1 ], like in all arrays, so the last element of the array will have the index high[ rates_total-1 ]

Документация по MQL5: Операции с массивами / ArraySize
Документация по MQL5: Операции с массивами / ArraySize
  • www.mql5.com
"Нулевое измерение = Размер массива / (Первое измерение * Второе измерение * Третье измерение)"
 
Greetings to all))

Question .
From which part of the code could the error message be coming: " array out range in 'Ind.mq5' (353,37) "?

This message appears when I start MT5. And when I connect to the line, the same message appears, but several more times (by the asset symbol and the active period of the indicator screen).

Seems to have looked at everything, but the message goes on. Or how to remove it from the log MT5, what would not write to the log ?

Thanks for the tips.


 
kopeyka2:
What part of the code could the error message be coming from: " array out range in 'Ind.mq5' (353,37) "

I looked in my crystal ball and saw that the problem is in line #353, 37 character...

 
Igor Zakharov:

I looked in my crystal ball and saw that the problem was in line 353, character 37...

I got rid of the function references here. It got better but it says error 255,38 and again array out of range. Now what does it (MT5) want?

Reason: