How to disable 'algo trading' via EA level (MQL5) (not the 'global' button)

 

Hi everybody :)

I would like to invoke the 'common' tab of an EA via MQL5 code and change the state of an individual EA's algorithmic trading ability, i.o.w set it to enabled or disabled. I have seen someone posted a solution for MQL4 in the past but I was hoping that someone could guide me to do this via MQL5 for MT5.

Please note that I am capable of calling the win API function to enable or disable the 'algo button' but this is global to the platform, and I don't want to disable all EA's from trading only specific EA's. Perhaps one could use the ChartID() function to identify the EA to invoke, or by magic number I am not sure?

Your advice or solution would be very highly appreciated! 

Regards,

Paul 

Files:
 
To toggle the algorithmic trading ability of a specific EA in MetaTrader 5:

Determine the chart where the EA is running using ChartID().
Use ExpertRemove() to remove the EA from the chart.
Modify the EA's settings (enable or disable algorithmic trading).
Use ExpertCreate() to reattach the EA to the chart with the updated settings.
Ensure you have the required permissions and account settings to perform these actions within your Meta Trader 5 platform.
 
h_aslani #:
To toggle the algorithmic trading ability of a specific EA in MetaTrader 5:

Determine the chart where the EA is running using ChartID().
Use ExpertRemove() to remove the EA from the chart.
Modify the EA's settings (enable or disable algorithmic trading).
Use ExpertCreate() to reattach the EA to the chart with the updated settings.
Ensure you have the required permissions and account settings to perform these actions within your Meta Trader 5 platform.
It do not exists any ExpertCreate command.
Stop using AI asking to solve problems of other users. Your replies do not give any additional value to forum, but only noise and wrong informations.
Thanks.
 
Fabio Cavalloni #:
It do not exists any ExpertCreate command.
Stop using AI asking to solve problems of other users. Your replies do not give any additional value to forum, but only noise and wrong informations.
Thanks.

Yes thank you for that Fabio! I need to invoke that 'common' tab screen and set the checkbox state via a WIN API method, that's it but I am not very familiar with all the API calls and syntax therefore I asked if someone can please assist me.. 

Please note that I am trying to control 3rd party EA's and therefore I do not have direct access to their code, I need to be able to enable or disable them via a custom script.