Testing with the cloud and data files

To add comments, please log in or register
John May
3044
John May  

I have a calender file (txt format) that my EA reads during the init process. When using the cloud, it is completely ignored by the testing agents.

 

I have included the property

#property tester_file "CALGBPUSD.CSV"

 to send the file.

 

Here is the code when it is called

  string subfolder="calender";
  string fname=subfolder+"\\CALGBPUSD.CSV";
  int handle=FileOpen(fname,FILE_READ|FILE_CSV|FILE_COMMON|FILE_ANSI ,",");

 The file is located in a sub directory named calender under the COMMON files directory. I tried copying the file into the expert/files directory, but it did not have any effect.  When I optimize without using the cloud, there is no problem. The program reads the file.

 

I searched through the documentation but I must be missing something.

Distributed Computing in the MQL5 Cloud Network
Distributed Computing in the MQL5 Cloud Network
  • cloud.mql5.com
Connect to the MQL5 Cloud Network (Cloud Computing) and earn extra income around the clock — there is much work for you computer!
Alain Verleyen
38385
Alain Verleyen  
CappinJack:

I have a calender file (txt format) that my EA reads during the init process. When using the cloud, it is completely ignored by the testing agents.

 

I have included the property

 to send the file.

 

Here is the code when it is called

 The file is located in a sub directory named calender under the COMMON files directory. I tried copying the file into the expert/files directory, but it did not have any effect.  When I optimize without using the cloud, there is no problem. The program reads the file.

 

I searched through the documentation but I must be missing something.

Is it working if you place the file directly in COMMON directory ?
John May
3044
John May  
angevoyageur:
Is it working if you place the file directly in COMMON directory ?

Yes it does. But only if it is in the COMMON directory. The call for the file is now.

  string fname="CALGBPUSD.CSV";
  int handle=FileOpen(fname,FILE_READ|FILE_CSV|FILE_COMMON|FILE_ANSI ,",");

But in order for the terminal to find the file it has to be in the COMMON/FILES directory. I am going to mess around with it for a while and see what I can find out.

Pasi Hakamaki
17581
Pasi Hakamaki  
CappinJack:

Yes it does. But only if it is in the COMMON directory. The call for the file is now.

But in order for the terminal to find the file it has to be in the COMMON/FILES directory. I am going to mess around with it for a while and see what I can find out.

Thank you. I will wait with interest.

Br,

Candles

John May
3044
John May  
Candles:

Thank you. I will wait with interest.

Br,

Candles

Well, the only way I can get it to work is if the file is located in the COMMON file directory, and the COMMON/FILES directory. I did notice that if I tried to declare a sub directory like in my first post, the cloud agents would ignore the file regardless of where it was. 
Pasi Hakamaki
17581
Pasi Hakamaki  
CappinJack:
Well, the only way I can get it to work is if the file is located in the COMMON file directory, and the COMMON/FILES directory. I did notice that if I tried to declare a sub directory like in my first post, the cloud agents would ignore the file regardless of where it was. 

That is suprising I thought that as long as it is in the "sandbox" it should work. This is good to know. Thanks for it.

Br,

To add comments, please log in or register