The telegram4mql.dll file is an external software library written in C++ or C#. It acts as a bridge between MetaTrader (MT4 or MT5) and the Telegram Bot API.
To use telegram4mql.dll , you must place the file in the correct directory and configure MetaTrader to allow external library calls. 1. File Placement Open your MetaTrader terminal. Click on in the top menu and select Open Data Folder . telegram4mql.dll
| Feature | Legitimate Telegram4Mql.dll | Malicious "Telegram" DLL | | :--- | :--- | :--- | | | Bridge between MetaTrader (MQL) and Telegram Bot API. | Steal data, provide remote access, act as a backdoor. | | Origin | Developed by a single author (Steven England) for the MQL5 community. | Created by unknown threat actors, distributed via phishing sites. | | Distribution | Downloaded from a specific developer's website (now offline) or from MQL5 forums/direct developer links. | Distributed via fake ads, torrents, unofficial download sites, or bundled with repacked installers. | | Digital Signature | It was originally a .NET DLL with no specific widespread signature. | Often uses "White + Black" technique to bypass security software. May be packed/obfuscated to evade antivirus. | | Behavior | Makes network calls only to api.telegram.org. Runs only when MetaTrader is active. | May communicate with a hardcoded C2 server. Attempts to persist across reboots and steal credentials from browsers. | | VirusTotal Detections | Likely would be clean or have very few false positives. | Typically has multiple detections by various antivirus engines. | | Community Feedback | Discussed in trading forums (MQL5), developers seek help on it. | Discussed on security blogs and forums as a threat. | The telegram4mql
Check the box labeled and add https://telegram.org . Click OK . Implementation in MQL Code | Feature | Legitimate Telegram4Mql
#property strict // Import the function from the DLL #import "telegram4mql.dll" int SendTelegramMessage(string token, string chatId, string text); #import // Input parameters input string BotToken = "123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ"; // Your Telegram Bot Token input string ChatID = "-100123456789"; // Your Channel or Group Chat ID //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() string message = "🚀 EA Started successfully on " + Symbol() + " (" + EnumToString((ENUM_TIMEFRAMES)_Period) + ")"; // Call the DLL function int result = SendTelegramMessage(BotToken, ChatID, message); if(result < 0) Print("Failed to send Telegram alert. Error code: ", result); else Print("Telegram alert sent successfully."); return(INIT_SUCCEEDED); Use code with caution. Security Best Practices
: There is often debate regarding its use in Indicators versus Expert Advisors. While some community members suggest it is more stable within EAs, others seek workarounds to enable Telegram alerts directly from Indicators.
Allows your MetaTrader terminal to "listen" for commands sent from your phone to remote-control your Expert Advisor. Sample Implementation