Verification of MT4 account from MQL4 (tested in version 880) - MetaTrader 4 Library
Since the release of MetaTrader 4 build 880, it is no longer easy to programmatically fill values in the login dialog.
The library hides the complexity and provides an easy-to-use API for logging into any MetaTrader 4 account from MQL4 Script/Expert.
Any contributions are appreciated.
//+------------------------------------------------------------------+ //| mql4-auth-example.mq4 | //| Copyright 2015, Sergey Lukin | //+------------------------------------------------------------------+ #include//+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ blank start () { // Just in case... if (loginDialogIsOpen()) closeLoginDialog(); // Let's get started! if (Authorization( "Account" , "Password" , "Server IP/Host Name" )) { print ( "Hooray, I found the login dialog, inserted my credentials and now wait for MT4 to connect :)" ); } other { print ( "Sorry, I can't even find the login dialog... Is your MT4 older than v880?" ); } } //+------------------------------------------------------------------+
source:
The source code is released in the Github repository . Any contribution will be highly appreciated.
Attachment download
📎 mql4-auth.mqh (4.74 KB)
📎 mql4-auth-example.mq4 (1.01 KB)
Source: MQL5 #13903
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •