Using files together with Strategy tester.

 

The documentation states that files that shpuld be accessable when running the strategy tester should be in the "tester" directory under   Agent...  MQL5\Files

That works, I am not doing optimisation, I am testing and debugging so its enough to put the file in the first local agents directory.

What is extremely annoying is that the Strategy Tester erases the file so I have to copy it there for each run. Is there a better place to put the file?. And as

another point this would not really work when using the cloud with remote agents

 
ingvar_e:

The documentation states that files that shpuld be accessable when running the strategy tester should be in the "tester" directory under   Agent...  MQL5\Files

That works, I am not doing optimisation, I am testing and debugging so its enough to put the file in the first local agents directory.

What is extremely annoying is that the Strategy Tester erases the file so I have to copy it there for each run. Is there a better place to put the file?. And as

another point this would not really work when using the cloud with remote agents

I assume that if you used the Cloud your file would be sent with the other data . . .  history data, EA, etc. to facilitate testing on another User's PC,  otherwise the Cloud would be pretty useless.
 
ingvar_e:

The documentation states that files that shpuld be accessable when running the strategy tester should be in the "tester" directory under   Agent...  MQL5\Files

That works, I am not doing optimisation, I am testing and debugging so its enough to put the file in the first local agents directory.

What is extremely annoying is that the Strategy Tester erases the file so I have to copy it there for each run. Is there a better place to put the file?. And as

another point this would not really work when using the cloud with remote agents

Where in documentation do you see that ?
 

I am running local agents plus 2 computers in my network. When debugging I am running with optimization disabled so it seems to be my first local agent that is used.

MQL5 Reference opened with the "Help" button reading under FileOpen

---snip ---

The file is opened in the folder of the client terminal in the subfolder MQL5\files (or testing_agent_directory\MQL5\files in case of testing). If FILE_COMMON is specified among flags, the file is opened in a shared folder for all MetaTrader 5 client terminals.

--- snip ---

Documentation on MQL5: Standard Constants, Enumerations and Structures / Input/Output Constants / File Opening Flags
Documentation on MQL5: Standard Constants, Enumerations and Structures / Input/Output Constants / File Opening Flags
  • www.mql5.com
Standard Constants, Enumerations and Structures / Input/Output Constants / File Opening Flags - Documentation on MQL5
 
ingvar_e:

I am running local agents plus 2 computers in my network. When debugging I am running with optimization disabled so it seems to be my first local agent that is used.

MQL5 Reference opened with the "Help" button reading under FileOpen

---snip ---

The file is opened in the folder of the client terminal in the subfolder MQL5\files (or testing_agent_directory\MQL5\files in case of testing). If FILE_COMMON is specified among flags, the file is opened in a shared folder for all MetaTrader 5 client terminals.

--- snip ---

Isn't that where the file is put when it is sent to the other agents for testing ?  on your main machine the file should go in \MQL5\files  I think.
 
RaptorUK:
Isn't that where the file is put when it is sent to the other agents for testing ?  on your main machine the file should go in \MQL5\files  I think.

I cannot say. I have not run any optimization runs with the file. Just a straight runs with optimization disabled. In that case just one agent is used and it will be the first of

your local agent that are on the same computer you are running. No need for more than one agent. And the file has to be in the tester directory under the first agent like it says  above.

And it does got erased. If I place it in the "normal" MQL5\Files it is not found when running the tester. 

 
ingvar_e:

I am running local agents plus 2 computers in my network. When debugging I am running with optimization disabled so it seems to be my first local agent that is used.

MQL5 Reference opened with the "Help" button reading under FileOpen

---snip ---

The file is opened in the folder of the client terminal in the subfolder MQL5\files (or testing_agent_directory\MQL5\files in case of testing). If FILE_COMMON is specified among flags, the file is opened in a shared folder for all MetaTrader 5 client terminals.

--- snip ---

You misinterpreted what the documentation says. I don't think it's written somewhere that you have to "that files that shpuld be accessable when running the strategy tester should be in the "tester" directory under   Agent...  MQL5\Files".

You don't have to copy your file at all, you have to use the following directive in your code :

#property tester_file "testfile"

See documentation for tester_file, you can also read about how the tester works.

ingvar_e:

I cannot say. I have not run any optimization runs with the file. Just a straight runs with optimization disabled. In that case just one agent is used and it will be the first of

your local agent that are on the same computer you are running. No need for more than one agent. And the file has to be in the tester directory under the first agent like it says  above.

...

This also isn't true, you can select the agent that will be used.
 
angevoyageur:

You misinterpreted what the documentation says. I don't think it's written somewhere that you have to "that files that shpuld be accessable when running the strategy tester should be in the "tester" directory under   Agent...  MQL5\Files".

You don't have to copy your file at all, you have to use the following directive in your code :

See documentation for tester_file, you can also read about how the tester works.

This also isn't true, you can select the agent that will be used.

Learn something new every day :-)

Thanks

 
ingvar_e:

Learn something new every day :-)

Thanks

Me too

Unrelated topic, are you aware of the new Spanish section ?

Reason: