{"id":13653808,"url":"https://github.com/sergeylukin/mql4-auth","last_synced_at":"2026-01-11T05:40:53.511Z","repository":{"id":142416182,"uuid":"43094961","full_name":"sergeylukin/mql4-auth","owner":"sergeylukin","description":"MQL4 library that allows authenticating into an MT4 account programmatically","archived":false,"fork":false,"pushed_at":"2015-09-24T22:48:34.000Z","size":128,"stargazers_count":29,"open_issues_count":0,"forks_count":22,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-07T01:25:38.853Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sergeylukin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-24T21:51:19.000Z","updated_at":"2024-09-18T18:27:00.000Z","dependencies_parsed_at":"2023-03-13T15:32:01.783Z","dependency_job_id":null,"html_url":"https://github.com/sergeylukin/mql4-auth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergeylukin%2Fmql4-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergeylukin%2Fmql4-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergeylukin%2Fmql4-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergeylukin%2Fmql4-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sergeylukin","download_url":"https://codeload.github.com/sergeylukin/mql4-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246552975,"owners_count":20795835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T02:01:18.232Z","updated_at":"2026-01-11T05:40:53.485Z","avatar_url":"https://github.com/sergeylukin.png","language":null,"funding_links":[],"categories":["Libraries"],"sub_categories":[],"readme":"Overview\n--------\n\nSince MT4 build 880 was released, it's no longer easy to programmatically fill\nvalues in Login dialog.\n\nThis library hides the complicated stuff and provides\neasy to use API to login to any MT4 account from within MQL4 script/expert.\n\n\nHow to use\n----------\n\n```c\n//+------------------------------------------------------------------+\n//|                                                      ProjectName |\n//|                                      Copyright 2012, CompanyName |\n//|                                       http://www.companyname.net |\n//+------------------------------------------------------------------+\n#include \u003cmql4-auth.mqh\u003e\n//+------------------------------------------------------------------+\n//|                                                                  |\n//+------------------------------------------------------------------+\nvoid OnStart()\n  {\n// Just in case...\n   if(loginDialogIsOpen()) closeLoginDialog();\n\n// Let's do it!\n   if(auth(\"ACCOUNT_NUMBER\",\"PASSWORD\",\"SERVER IP/HOSTNAME\")) \n     {\n\n      Print(\"Hooray, I found the login dialog, inserted credentials, now wait until MT4 connects :)\");\n\n        } else {\n\n      Print(\"Sorry, I could not even find the Login dialog... Is your MT4 older than v880 or something?\");\n\n     }\n  }\n//+------------------------------------------------------------------+\n```\n\nCredits\n-------\n\nI think I scrapped half of the Internet while researching the topic related to\nWinAPI and sending keyboard input messages programmatically and I was\ntrying everything I stumbled upon and was closing browser tabs here and there\nto keep it clean so I lost some helpful resources but the ones that helped me\nsignificantly and that I could remember are:\n\n- [List of VK_ constants with their human readable meaning which I used in the beginning and it helped me finding the right track](https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx)\n\n- [Forum topic with someone suggesting sending WM_CHAR instead of WM_KEYDOWN](https://facepunch.com/showthread.php?t=781744)\n\nNotes\n-----\n\nMT4 release 880 made it extremely hard to programmatically authenticate from MQL4.\nIt was hard before release 880 too, but this time it was even harder.\nMetatrader team, please don't make our lives so hard, we have more creative stuff to\nconcentrate on. Let's build beautiful solutions, not hackish workarounds.\n\nLicense\n-------\n\nThis is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, compile, sell, or\ndistribute this software, either in source code form or as a compiled\nbinary, for any purpose, commercial or non-commercial, and by any\nmeans.\n\nIn jurisdictions that recognize copyright laws, the author or authors\nof this software dedicate any and all copyright interest in the\nsoftware to the public domain. We make this dedication for the benefit\nof the public at large and to the detriment of our heirs and\nsuccessors. We intend this dedication to be an overt act of\nrelinquishment in perpetuity of all present and future rights to this\nsoftware under copyright law.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nFor more information, please refer to [\u003chttp://unlicense.org/\u003e](http://unlicense.org)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergeylukin%2Fmql4-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergeylukin%2Fmql4-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergeylukin%2Fmql4-auth/lists"}