Questions from a "dummy" - page 109

 
Yedelkin:
Yes, I haven't looked at it thoroughly. But you got the gist right :)
FileIsExist() returns the pipe with flag FILE_COMMON
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы ввода/вывода / Флаги открытия файлов
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы ввода/вывода / Флаги открытия файлов
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы ввода/вывода / Флаги открытия файлов - Документация по MQL5
 
openlive:
FileIsExist() returns the pipe with the flag FILE_COMMON
When tested, does it return?
 

In MT5, the possibilities and flexibility of strategy tester settings are much wider than in MT4. However, the vast majority of brokerage companies all over the world still only work with MT4. Is it possible to convert the history, downloaded from a certain brokerage company in MT4 format, to MT5 format in order to run it in the MT5 tester?

 
Yedelkin:
Does it return when tested?

No, I just checked with a script.

string file_name="primer_massivstarihpatternovdlyaraboty.csv";

   bool com=FileIsExist(
   file_name,  
       FILE_COMMON  
   );
   Print(TerminalInfoString(TERMINAL_COMMONDATA_PATH),com);
 
 
DenisR:

In MT5, the possibilities and flexibility of strategy tester settings are much wider than in MT4. However, the vast majority of brokerage companies all over the world still only work with MT4. Is it possible to convert the history, downloaded from a certain brokerage company in MT4 format, to MT5 format in order to feed it to the MT5 Strategy Tester?

You cannot do it directly. You cannot. MetaQuotes Software Corp. is against it. // I think it is wrong, but they may know better.

There is one rather time consuming option - to use math mode. If it's not too much trouble, give it a try.

Торговая платформа MetaTrader 5 для организации брокерского обслуживания / MetaQuotes Software Corp.
  • www.metaquotes.net
Торговая платформа MetaTrader 5 предназначена для проведения торговых операций на различных финансовый рынках. Терминал обладает большой базой аналитических возможностей и поддерживает более 70 различных инструментов для выполнения технического анализа
 
openlive:
FileIsExist() returns the pipe with flag FILE_COMMON
I have a vague suspicion that files have nothing to do with it. Perhaps the tester doesn't want to test your EA for another reason. What does it say in the logs?
 
FileIsExist() in the tester too
 
openlive:
FileIsExist() in the tester too
Exactly.
 
MetaDriver:
I have a vague suspicion that the files have nothing to do with it. Maybe the tester doesn't want to test your EA for another reason. What does it say in the log?
2012.02.26 10:57:51 Tester quality of analyzed history is 100%
2012.02.26 10:57:51 Core 1 EURUSD,H1: testing of experts\pattern10000.ex5 from 2009.12.01 00:00 to 2012.02.10 00:00 started
26 10:57:51 Core 1 EURUSD,H1 (MetaQuotes-Demo): 1 minutes OHLC ticks
2012.02.26 10:57:51 Core 1 EURUSD: history synchronized from 1971.01.04 to 2012.02.10
2012.02.26 10:57:51 Core 1 EURUSD: load 27 bytes of history data to synchronize
2012.02.02.26 10:57:51 Core 1 EURUSD: symbol tick base found
2012.02.26 10:57:51 Core 1 Intel Atom N450 @ 1.66GHz, 1013 MB
2012.02.26 10:57:51 Core 1 33 Kb of total initialization data received
2012.02.02.26 10:57:51 Core 1 successfully initialized
2012.02.26 10:57:51 Core 1 initial deposit 3000.00 USD, leverage 1:100
2012.02.26 10:57:51 Core 1 expert file added: Experts\pattern10000.ex5. 33944 bytes loaded
2012.02.26 10:57:50 Core 1 common synchronization completed
2012.02.26 10:57:50 Tester EURUSD,H1 (MetaQuotes-Demo): testing of Experts\pattern10000.ex5 from 2009.12.01 00:00 to 2012.02.10 00:00
2012.02.26 10:57:49 Core 1 authorized (agent build 597)
2012.02.26 10:57:49 Core 1 connected
2012.02.26 10:57:49 Core 1 connecting to 127.0.0.1:3000
 
openlive:

No, I just checked it with a script.

I assumed that a check like this would be inserted into OnInit(), then the code would be run for testing, the results of which "we'll see".

string file_name="primer_massivstarihpatternovdlyaraboty.csv";
if(FileIsExist(file_name,FILE_COMMON)
  {
   ResetLastError();
   handle=FileOpen(...);
   switch(handle)
     {
      case INVALID_HANDLE: 
           Print("error = ",_LastError);
           return(-1);
     }
  }  
else 
  {
   Print(file_name," не найден в ",TerminalInfoString(TERMINAL_COMMONDATA_PATH));
   return(-2);
  }
Reason: