Is there any function to enable/disable AutoTrading?

 

I was wonder if there is any Function to put in my  EA to enable AutoTrading when it accidentally disabled.

Is there any function to do it in MQL4 ???

 

It make no sense to change a safety functionallity for the platform from an EA.

Your EA can check if trading is enabled ( IsTradeAllowed ) and show an alert.

 

IsTradeAllow()  is for chekcing Allow Live Trading in input of each Experts.


IsExpertEnabled() is for checking the button on Toolbar


Imagine if AutoTrading was disabled on my VPS when I was sleeping at midnight. Is there any function to Enable it?
I know IsExpertEnabled()  is just for checking not for Enable this button.

 
masoud0455_a: Is there any function to Enable it?
No
 
What if disabled it if certain time reach
Reason: