Is It Possible To Read Data From A File Once When Run Slow Complete Optimization?

 
Hello, I am currently building an EA and it uses data from an external file, the problem is that when running a single test each time it has to re-read that data file.
The question is, is it possible to retrieve data once and save it somewhere to use for running slow complete optimization test?


 
The only thing that comes into my mind is to convert your external information to a .mqh code and include it
 
Fabio Cavalloni #:
The only thing that comes into my mind is to convert your external information to a .mqh code and include it

That's a good idea, will it take up too much ram memory?

 
Le Minh Duc #:

That's a good idea, will it take up too much ram memory?

The biggest problem I had in a similar approach is the size of the .ex5, that of course, if you include files with too much rows, can increase significantly...

 
Fabio Cavalloni #:

The biggest problem I had in a similar approach is the size of the .ex5, that of course, if you include files with too much rows, can increase significantly...

That version is only used for testing, so it'll be fine

 
Le Minh Duc:
Hello, I am currently building an EA and it uses data from an external file, the problem is that when running a single test each time it has to re-read that data file.
The question is, is it possible to retrieve data once and save it somewhere to use for running slow complete optimization test?


Why is it a problem ? Did you measure the impact ?

Data read from a file are cached by the OS, I doubt you will have any real benefit trying to do better.

 
Alain Verleyen #:

Why is it a problem ? Did you measure the impact ?

Data read from a file are cached by the OS, I doubt you will have any real benefit trying to do better.

The problem is that I'm wondering if my EA when running the Optimization test has to read the file again for each input set before testing. If so, it will take a very long time to test because each time I run a single test it takes about 10 minutes to read data from external file.

 
Le Minh Duc #:

The problem is that I'm wondering if my EA when running the Optimization test has to read the file again for each input set before testing. If so, it will take a very long time to test because each time I run a single test it takes about 10 minutes to read data from external file.

10 minutes ? What size is that file ?
 
Alain Verleyen #:
10 minutes ? What size is that file ?

I read historical indicator data from M1 or M5 TF in 2-3 years, It's usually over millions rows

Reason: