Download MetaTrader 5

How to make EA to check MT4 Expert Advisors option 'Disable experts when the profile has been changed"

To add comments, please log in or register
Rafael Rodriguez
49
Rafael Rodriguez  

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
2682
Drazen Penic  

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