Automating and updating EA from python.

laclance
13
If I have an EA (MyEa.ex5) and a set file (Params.set). Can I use a python script to automatically start the EA, read the results when done, update the .set file and repeat the process?  
Documentation on MQL5: Constants, Enumerations and Structures / Data Structures / Trade Request Structure
Documentation on MQL5: Constants, Enumerations and Structures / Data Structures / Trade Request Structure
  • www.mql5.com
Trade Request Structure - Data Structures - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Fernando Carreiro
11039
laclance: If I have an EA (MyEa.ex5) and a set file (Params.set). Can I use a python script to automatically start the EA, read the results when done, update the .set file and repeat the process?  

You could, but you would effectively just be "shelling" out the process of starting MetaTrader from the command-line with the required configuration, so you might as well use a command batch file instead which then calls a python script to process the set file. Read the documentation on how to start MetaTrader from the command line.

laclance
13
laclance  
Fernando Carreiro #:

You could, but you would effectively just be "shelling" out the process of starting MetaTrader from the command-line with the required configuration, so you might as well use a command batch file instead which then calls a python script to process the set file. Read the documentation on how to start MetaTrader from the command line.

Thank you very much, but once the EA has finished and python has finished analyzing the results and updating the .set file then I wouldn't I need python to start the EA again? 

n't

Fernando Carreiro
11039
laclance #: Thank you very much, but once the EA has finished and python has finished analyzing the results and updating the .set file then I wouldn't I need python to start the EA again?

Your question makes no sense. As I have already explained, a pure python script, cannot directly start an EA on MetaTrader. You can only do it via the command-line (or by "shelling" from python) as described in the documentation I linked for you. Did you read it?

laclance
13
laclance  
Fernando Carreiro #:

Your question makes no sense. As I have already explained, a pure python script, cannot directly start an EA on MetaTrader. You can only do it via the command-line (or by "shelling" from python) as described in the documentation I linked for you. Did you read it?

 sorry my English is just not that good but i did just don't see how i can do it without shelling.
Fernando Carreiro
11039
laclance #sorry my English is just not that good but i did just don't see how i can do it without shelling.

Without "shelling" you can't do it! That is why I stated that it will be easier to do it from a command batch file instead.