From 05452e3b9072808bda424e4271dd9c7e8c655ce8 Mon Sep 17 00:00:00 2001 From: vdemydiuk Date: Fri, 21 Oct 2016 17:52:54 +0300 Subject: [PATCH] Issue #21: Added function Print to MtApi (MT5) --- MtApi5/Mt5CommandType.cs | 4 +- MtApi5/MtApi5Client.cs | 13 +++++++ TestClients/MtApi5TestClient/MainWindow.xaml | 38 +++++++++++++------ TestClients/MtApi5TestClient/ViewModel.cs | 23 +++++++++++ mq5/MtApi5.ex5 | Bin 107560 -> 109060 bytes mq5/MtApi5.mq5 | 12 ++++++ 6 files changed, 78 insertions(+), 12 deletions(-) diff --git a/MtApi5/Mt5CommandType.cs b/MtApi5/Mt5CommandType.cs index 980e0b07..91a8a252 100755 --- a/MtApi5/Mt5CommandType.cs +++ b/MtApi5/Mt5CommandType.cs @@ -108,6 +108,8 @@ namespace MtApi5 //Backtesting BacktestingReady = 66, - IsTesting = 67 + IsTesting = 67, + + Print = 68 } } diff --git a/MtApi5/MtApi5Client.cs b/MtApi5/MtApi5Client.cs index d9717047..a06a679e 100755 --- a/MtApi5/MtApi5Client.cs +++ b/MtApi5/MtApi5Client.cs @@ -1392,6 +1392,19 @@ namespace MtApi5 #endregion + #region Common Functions + /// + ///It enters a message in the Expert Advisor log. + /// + ///Symbol name. + public bool Print(string message) + { + var commandParameters = new ArrayList { message }; + + return SendCommand(Mt5CommandType.Print, commandParameters); + } + #endregion + #endregion #region Properties diff --git a/TestClients/MtApi5TestClient/MainWindow.xaml b/TestClients/MtApi5TestClient/MainWindow.xaml index a07eaaf6..4fcfe520 100755 --- a/TestClients/MtApi5TestClient/MainWindow.xaml +++ b/TestClients/MtApi5TestClient/MainWindow.xaml @@ -263,36 +263,52 @@ - - - - - + + + + + + + + + + + - -