mql4mql5

How to check if Account Trading is Allowed in MQL5?


What is the equivalent of MQL4's AccountInfoInteger(ACCOUNT_TRADE_ALLOWED) in MQL5?

Also what about the equivalent of? TerminalInfoInteger(TERMINAL_TRADE_ALLOWED)

they are not listed here: https://www.mql5.com/en/articles/81


Solution

  • In MQL5, the equivalent to AccountInfoInteger(ACCOUNT_TRADE_ALLOWED) is the same function AccountInfoInteger.

    It's also the same for TerminalInfoInteger(TERMINAL_TRADE_ALLOWED) - TerminalInfoInteger