Building an MQL5 Trading Monitor with GSM Modem Calls and SMS
Summary
This article explains how to connect an MQL5 Expert Advisor to a GSM modem or modem-capable phone for remote account monitoring when mobile internet is unavailable. The EA communicates through a virtual COM port using a DLL, configures serial settings, and exchanges bytes with the device. It uses modem AT commands to check network and device status, manage calls and text messages, and retrieve information such as signal quality and SIM state.
The described system supports notifications about trading-server connectivity and SMS requests for account information and basic position management. A timer-based handler processes modem events, incoming calls, and messages; the article also discusses reading and deleting stored SMS messages to avoid filling modem memory. It demonstrates initialization and communication patterns and reports that an older phone worked for most functions, with USSD requests unsupported. This is an integration and monitoring guide, not a trading strategy or performance study. It depends on compatible hardware, drivers, a COM-port library, and device-specific AT command support.
Key ideas
- An MQL5 Expert Advisor can communicate with a GSM device through its virtual COM port and a DLL interface.
- Serial port setup includes selecting the port and baud rate and configuring common byte and parity settings.
- AT commands provide the interface for checking modem status and handling calls, SMS, and network information.
- A timer-driven event handler can process incoming messages and support remote account monitoring and basic position management.
- Device compatibility varies, as shown by an older phone that lacked support for USSD requests.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.