Forum
Market
Signals
Freelance
VPS
Quotes
MetaTrader
Articles
CodeBase
Algo Forge
Documentation
AlgoBook
NeuroBook
Calendar
WebTerminal
Tools
About
Start VPS Trial
Home
Type
/
to search: @user, $symbol, ...
Log in
Create an account
English
Русский
中文
Español
Português
日本語
Deutsch
한국어
Français
Italiano
Türkçe
Grey_Adam
/ Profile
Grey_Adam
South Africa
8
Friends
Requests
Add friends via their profile or user search and you will be able to see if they are online
Outgoing
Grey_Adam
2021.09.29
Added topic
error code: (-2, 'Terminal: Invalid params')
Good day, can someone please help me. I login into my account, it keeps showing me this ( error code : (-2, 'Terminal: Invalid params')) in the console when I run the code. Here is what I've got. (Still new) import MetaTrader5 as mt5 import
Share on social networks
2
Grey_Adam
2021.09.29
import MetaTrader5 as mt5
import pandas as pd '''
mt5.login( login=140744, password="naohds2b", server="Quicktrade-Live", timeout=60000 )
''' print("MetaTrader5 package author: ",mt5.__author__)
print("MetaTrader5 package version: ",mt5.__version__) if not mt5.initialize(): print("initialize() failed, error code =",mt5.last_error()) quit() account=140744
authorized=mt5.login(account, password="naohds2b")
if authorized: print(mt5.account_info()) print("Show account_info()._asdict():") account_info_dict = mt5.account_info()._asdict() for prop in account_info_dict: print(" {}={}".format(prop, account_info_dict[prop]))
else: print("failed to connect at account #{}, error code: {}".format(account, mt5.last_error())) mt5.shutdown()
Grey_Adam
2021.09.29
Registered at MQL5.community
Share on social networks
January
February
March
April
May
June
July
August
September
October
November
December
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
:
import pandas as pd '''
mt5.login( login=140744, password="naohds2b", server="Quicktrade-Live", timeout=60000 )
''' print("MetaTrader5 package author: ",mt5.__author__)
print("MetaTrader5 package version: ",mt5.__version__) if not mt5.initialize(): print("initialize() failed, error code =",mt5.last_error()) quit() account=140744
authorized=mt5.login(account, password="naohds2b")
if authorized: print(mt5.account_info()) print("Show account_info()._asdict():") account_info_dict = mt5.account_info()._asdict() for prop in account_info_dict: print(" {}={}".format(prop, account_info_dict[prop]))
else: print("failed to connect at account #{}, error code: {}".format(account, mt5.last_error())) mt5.shutdown()