Download MetaTrader 5
To add comments, please log in or register
All Code Base apps are available from MetaTrader 5. You can publish your own one!
Rafael Rodriguez
49
Rafael Rodriguez 2016.06.28 04:31 

Hi all

Including IsTradeAllowed() makes EA able to verify if the Expert Advisor is allowed to trade and trading context is not busy.

I am trying to find if there is any similar way to make EA able to verify if 'Disable experts when the profile has been changed' (MetaTrader 4 Tools >Options >Expert Advisors) is enabled or not.


I want to include that checking (and eventual warning to user) because although IsTradeAllowed() gave TRUE value as a result, when my EA tried to modify stop loss of open order, I got error 4109.

Thank you

Drazen Penic
2403
Drazen Penic 2016.06.28 08:10  

I don't think there is a mql4 function that can read those particular settings, but you can detect if an expert is allowed to run.

Check  IsExpertEnabled() function.

/
To add comments, please log in or register