diff --git a/MtApi5/MtApi5Client.cs b/MtApi5/MtApi5Client.cs index 3a95a846..fa690dfa 100755 --- a/MtApi5/MtApi5Client.cs +++ b/MtApi5/MtApi5Client.cs @@ -1717,6 +1717,18 @@ namespace MtApi5 return SendCommand(Mt5CommandType.ChartId, null); } + /// + ///Returns the ID of the chart. + /// + ///Handle of expert linked to the chart. + /// + /// Value of long type. + /// + public long ChartId(int expertHandle) + { + return SendCommand(Mt5CommandType.ChartId, null, null, expertHandle); + } + /// ///This function calls a forced redrawing of a specified chart. /// @@ -3468,7 +3480,7 @@ namespace MtApi5 ConnectionStateChanged?.Invoke(this, new Mt5ConnectionEventArgs(state, message)); } - private T SendCommand(Mt5CommandType commandType, ArrayList commandParameters, Dictionary namedParams = null) + private T SendCommand(Mt5CommandType commandType, ArrayList commandParameters, Dictionary namedParams = null, int? executor = null) { MtResponse response; @@ -3480,7 +3492,7 @@ namespace MtApi5 try { - response = client.SendCommand((int)commandType, commandParameters, namedParams, ExecutorHandle); + response = client.SendCommand((int)commandType, commandParameters, namedParams, executor ?? ExecutorHandle); } catch (CommunicationException ex) { diff --git a/TestClients/MtApi5TestClient/MainWindow.xaml b/TestClients/MtApi5TestClient/MainWindow.xaml index f9a59336..0a7cdbb4 100755 --- a/TestClients/MtApi5TestClient/MainWindow.xaml +++ b/TestClients/MtApi5TestClient/MainWindow.xaml @@ -542,6 +542,7 @@