Automating and updating EA from python.

 
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
 
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.

 
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

 
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?

 
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.
 
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.

 

@ Fernando Carreiro

Thanks for your contribution to this if you please.

I have a similar issue and i really need help in that 

I use python to trigger an order to MT5.

I want the EA attached to the chart to function but it doesn't 

I've tried all sorts of solutions but didnt work

Would you please help Thanks

 
Emad Ahmad #: I have a similar issue and i really need help in that. I use python to trigger an order to MT5. I want the EA attached to the chart to function but it doesn't. I've tried all sorts of solutions but didnt work. Would you please help.

My apologies, but I am having difficulty understanding your query.

Reason: