isTradeAllowed() and Investor-Pwd-Acces

 

Hi,

I run my EA on my home pc and login to my account by my Investor-Password: so no trades were possible!

Is it correct that isTradeAllowed() still returns true (instead of false), and only if I set one of the two options "Allow live trading" to false it returns false?

Thanks in advance,

Gooly

 
When you log-in using Investor's password you cannot influence isTradeAlowed.
 

IsTradeAllowed() function is not depend on investor password or not. It's depend on whether we allow live trading for EA (Tools > Option > Expert Advisor tab > Allow live trading). So if you using investor password and you allow live trading, IsTradeAllowed() will still return true. But if you try to open position, it will give an error 133 : Trade is disable.

Reason: