pythonmetatrader5

How to set allow_trade to True in MetaTrader5 Python API?


When I print terminal_info(), I have the following output:

TerminalInfo(community_account=False, community_connection=False, connected=True, dlls_allowed=False, trade_allowed=False, tradeapi_disabled=False, email_enabled=False, ftp_enabled=False, notifications_enabled=False, mqid=False, build=4311, maxbars=100000000, codepage=0, ping_last=18159, community_balance=0.0, retransmission=0.0, company='MetaQuotes Software Corp.', name='MetaTrader 5', language='English', path='C:\\Program Files\\MetaTrader 5', data_path='C:\\Users\\samue\\AppData\\Roaming\\MetaQuotes\\Terminal\\D0E8209F77C8CF37AD8BF550E51FF075', commondata_path='C:\\Users\\samue\\AppData\\Roaming\\MetaQuotes\\Terminal\\Common')

I noticed trade_allowed=False but I don't know how to change it. I think it's due to a recent update by MetaQuotes because it appeared suddenly (I used to be able to trade without problem).


Solution

  • Click this button to toggle it True/False:

    algo trading button