Issue - VPS files management

 

I've experimented a strange behaviour on VPS side upon EAs migration. Actually I don't know whether it is an issue or the normality.

In few words, I've an EA which create many files if and only if they do not exist and it works fine locally, i.e. if I start it twice, the first time the files are create but the second one. At the contrary, if I migrate twice the EA  on the VPS, the files are always created from scratch as if the migration would cause the systematic deletion of such files.

Is this a normal behavior or something is wrong?

Just to clarify the procedure, I've tried the following code within the OnInit() function of the EA, obtaining the aforementioned result.

int fm_fhEa2;
   
if (!FileIsExist("rls\\foo.txt", FILE_COMMON)) {
   fm_fhEa2 = FileOpen("rls\\foo.txt", FILE_TXT|FILE_COMMON|FILE_WRITE|FILE_READ);
      
   if (fm_fhEa2 != INVALID_HANDLE)
      Print("File '" + "rls\\foo.txt" + "' created");
}

Everytime I get the message "File 'rls\foo.txt' created"

Virtual hosting for MetaTrader 5
Virtual hosting for MetaTrader 5
  • www.mql5.com
Virtual hosting for MetaTrader 4/5 is the best VPS solution for Forex. It is cheap, it requires no configuration and it features minimum delays to the server. For only $10 per month, you obtain a virtual platform that works around the clock, saves your profit and pays off. Create a remote copy of the application directly from the platform...
 

What payment method do you want to use?
...i used bank card

2. Are there enough funds in your wallet or card?
...yes

3. Please provide the accurate error message text and attach a screenshot for more visibility.
...my vps disappeared from my account 

4. If you want to buy a product or a signal, provide its name and the link to it.
...i attached expert advisors 




Please help me connect my account back to the vps service and guide me through the process.

 
I did not understand your reply...
 
Can someone tell me if it's normal that files are automatically deleted at every new migration?

The documentation does not mention such aspect. 
 
Massimiliano Francone:
Can someone tell me if it's normal that files are automatically deleted at every new migration?

The documentation does not mention such aspect. 

What files?

 

Maybe I did not explain clearly my needs. I'm talking about personal (custom) file the EA creates at startup in the COMMON directory. Let's suppose of only one file, the procedure is the following:

  1. At startup the EA checks the existence of the file
  2. If the file does not exist, then the EA creates the file
  3. Upon the EA closure, the file is not deleted by the EA
I would expect that once I migrate the EA several time toward the VPS, the file should remain in the VPS hard disk, but it seem to be not the case. Then I started supposing that at each migration the file(s) is automatically deleted. Am I right?
Virtual hosting for MetaTrader 5
Virtual hosting for MetaTrader 5
  • www.mql5.com
Virtual hosting for MetaTrader 4/5 is the best VPS solution for Forex. It is cheap, it requires no configuration and it features minimum delays to the server. For only $10 per month, you obtain a virtual platform that works around the clock, saves your profit and pays off. Create a remote copy of the application directly from the platform...
 
Anybody knows whether the migration process wipe out the common folder's files?

Please tell me your experience because I've no clue on how figure out the problem. 
 
Massimiliano Francone:
Anybody knows whether the migration process wipe out the common folder's files?

Please tell me your experience because I've no clue on how figure out the problem. 

With MQL5 VPS you don't have access to such folders anyway.

 
Eleni Anna Branou:

With MQL5 VPS you don't have access to such folders anyway.

Are you sure? Because if I create a file I can actually write/read it.

I face the same behaviour even if I use the FILE_COMMON. 

Thank you Eleni
 
Massimiliano Francone:
Are you sure? Because if I create a file I can actually write/read it.

I face the same behaviour even if I use the FILE_COMMON. 

Thank you Eleni

If you mean the common directory of the computer the VPS is functioning on, with MQL5 VPS you don't have direct access to that folder/computer.

 
Eleni Anna Branou:

If you mean the common directory of the computer the VPS is functioning on, with MQL5 VPS you don't have direct access to that folder/computer.

The FILE_COMMON directory is where terminal(s) are installed. I don't know...I need these files to save the EA transactions and I think the unique way to have these files available and updated is to store them in a hosted web server and to use the WebRequest functions to GET/POST them.