Download MetaTrader 5
To add comments, please log in or register
Code Base will help you in mastering your theoretical skills. Come and learn!
Rafael Rodriguez
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
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