Download MetaTrader 5
To add comments, please log in or register
Find out the most discussed Forum topics. Have a look at the Wall section!
John May
3659
John May 2013.11.24 18:43 

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
Moderator
28651
Alain Verleyen 2013.11.24 18:58  
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
3659
John May 2013.11.24 19:33  
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
3654
Pasi Hakamaki 2013.11.24 21:50  
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
3659
John May 2013.11.25 04:27  
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
3654
Pasi Hakamaki 2013.11.25 23:10  
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