Download MetaTrader 5
To add comments, please log in or register
Download MQL5 library codes via MetaTrader. It is convenient!
MetaQuotes Software Corp.
Moderator
177301
MetaQuotes Software Corp. 2014.02.17 14:58 

New article Working with GSM Modem from an MQL5 Expert Advisor has been published at mql5.com:

There is currently a fair number of means for a comfortable remote monitoring of a trading account: mobile terminals, push notifications, working with ICQ. But it all requires Internet connection. This article describes the process of creating an Expert Advisor that will allow you to stay in touch with your trading terminal even when mobile Internet is not available, through calls and text messaging. In addition, this Expert Advisor will be able to notify you of the lost or reestablished connection with the trade server.

For this purpose, virtually any GSM modem, as well as most phones with the modem function would do. For illustration, I have chosen Huawei E1550, as this modem is one of the most widely used devices of its kind. Further, at the end of the article, we will try to replace the modem with an old cellphone Siemens M55 (released in 2003) and see what happens.

But first, a few words on how to send a byte of data from an Expert Advisor to a modem.

Upon connecting the modem to your computer and installing all the necessary drivers, you will be able to see a virtual COM port in the system. All future operations with the modem are performed via this port. Consequently, in order to exchange data with the modem, you should first get access to the COM port.


Fig. 1. Huawei modem is connected to the COM3 port

Here, we will need a DLL library TrComPort.dll which is freely distributed in the Internet together with the source files. It will be used to configure the COM port, query its state, as well as to receive and send data. In order to get that done, we will use the following functions:

Author: Sergey Shevchuk

/
To add comments, please log in or register