From 9afd30e463bf40e642bdb35067d5efcf0c3343b1 Mon Sep 17 00:00:00 2001 From: vdemydiuk Date: Tue, 13 Mar 2018 18:24:40 +0200 Subject: [PATCH] Implemented function Alert (MT5) --- MtApi5/Mt5CommandType.cs | 8 ++--- MtApi5/MtApi5Client.cs | 15 ++++++++-- TestClients/MtApi5TestClient/MainWindow.xaml | 16 ++++++---- TestClients/MtApi5TestClient/ViewModel.cs | 10 +++++++ mq5/MtApi5.ex5 | Bin 583190 -> 582642 bytes mq5/MtApi5.mq5 | 29 +++++++++++++++++-- 6 files changed, 63 insertions(+), 15 deletions(-) diff --git a/MtApi5/Mt5CommandType.cs b/MtApi5/Mt5CommandType.cs index 522a6d8c..9d1282c1 100755 --- a/MtApi5/Mt5CommandType.cs +++ b/MtApi5/Mt5CommandType.cs @@ -238,12 +238,12 @@ namespace MtApi5 //Checkup GetLastError = 132, - TerminalInfoString = 153, //TODO - TerminalInfoInteger = 204, //TODO - TerminalInfoDouble = 205, //TODO + TerminalInfoString = 153, + TerminalInfoInteger = 204, + TerminalInfoDouble = 205, //Common Functions - Alert = 136, //TODO + Alert = 136, Comment = 137, //TODO GetTickCount = 138, //TODO GetMicrosecondCount = 139, //TODO diff --git a/MtApi5/MtApi5Client.cs b/MtApi5/MtApi5Client.cs index cdf43c96..12682b71 100755 --- a/MtApi5/MtApi5Client.cs +++ b/MtApi5/MtApi5Client.cs @@ -2152,16 +2152,27 @@ namespace MtApi5 #region Common Functions + /// ///It enters a message in the Expert Advisor log. /// - ///Symbol name. + ///Message public bool Print(string message) { var commandParameters = new ArrayList { message }; - return SendCommand(Mt5CommandType.Print, commandParameters); } + + /// + ///Displays a message in a separate window. + /// + ///Message + public void Alert(string message) + { + var commandParameters = new ArrayList { message }; + SendCommand(Mt5CommandType.Alert, commandParameters); + } + #endregion // Common Functions #region Object Functions diff --git a/TestClients/MtApi5TestClient/MainWindow.xaml b/TestClients/MtApi5TestClient/MainWindow.xaml index 9b5cb2d4..8e3c9a73 100755 --- a/TestClients/MtApi5TestClient/MainWindow.xaml +++ b/TestClients/MtApi5TestClient/MainWindow.xaml @@ -526,12 +526,16 @@ - - - - - -