diff --git a/MtApi5/MtApi5Client.cs b/MtApi5/MtApi5Client.cs
index c49ac754..e76eeb20 100755
--- a/MtApi5/MtApi5Client.cs
+++ b/MtApi5/MtApi5Client.cs
@@ -2108,7 +2108,7 @@ namespace MtApi5
#region Commands of Terminal
///
- ///Returns the value of a corresponding property of the mql4 program environment.
+ ///Returns the value of a corresponding property of the mql5 program environment.
///
///Identifier of a property. Can be one of the values of the ENUM_TERMINAL_INFO_STRING enumeration.
///
@@ -2121,7 +2121,7 @@ namespace MtApi5
}
///
- ///Returns the value of a corresponding property of the mql4 program environment.
+ ///Returns the value of a corresponding property of the mql5 program environment.
///
///Identifier of a property. Can be one of the values of the ENUM_TERMINAL_INFO_INTEGER enumeration.
///
@@ -2134,7 +2134,7 @@ namespace MtApi5
}
///
- ///Returns the value of a corresponding property of the mql4 program environment.
+ ///Returns the value of a corresponding property of the mql5 program environment.
///
///Identifier of a property. Can be one of the values of the ENUM_TERMINAL_INFO_DOUBLE enumeration.
///
diff --git a/TestClients/MtApi5TestClient/MainWindow.xaml b/TestClients/MtApi5TestClient/MainWindow.xaml
index 8420e45c..e390ddf7 100755
--- a/TestClients/MtApi5TestClient/MainWindow.xaml
+++ b/TestClients/MtApi5TestClient/MainWindow.xaml
@@ -78,6 +78,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -297,6 +319,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TestClients/MtApi5TestClient/ViewModel.cs b/TestClients/MtApi5TestClient/ViewModel.cs
index 7560ea90..3bad1934 100755
--- a/TestClients/MtApi5TestClient/ViewModel.cs
+++ b/TestClients/MtApi5TestClient/ViewModel.cs
@@ -32,6 +32,10 @@ namespace MtApi5TestClient
public DelegateCommand AccountInfoIntegerCommand { get; private set; }
public DelegateCommand AccountInfoStringCommand { get; private set; }
+ public DelegateCommand TerminalInfoDoubleCommand { get; private set; }
+ public DelegateCommand TerminalInfoIntegerCommand { get; private set; }
+ public DelegateCommand TerminalInfoStringCommand { get; private set; }
+
public DelegateCommand CopyRatesCommand { get; private set; }
public DelegateCommand CopyTimesCommand { get; private set; }
public DelegateCommand CopyOpenCommand { get; private set; }
@@ -219,6 +223,11 @@ namespace MtApi5TestClient
public ENUM_ACCOUNT_INFO_INTEGER AccountInfoIntegerPropertyId { get; set; }
public ENUM_ACCOUNT_INFO_STRING AccountInfoStringPropertyId { get; set; }
+ public ENUM_TERMINAL_INFO_DOUBLE TerminalInfoDoublePropertyId { get; set; }
+ public ENUM_TERMINAL_INFO_INTEGER TerminalInfoIntegerPropertyId { get; set; }
+ public ENUM_TERMINAL_INFO_STRING TerminalInfoStringPropertyId { get; set; }
+
+
public TimeSeriesValueViewModel TimeSeriesValues { get; set; }
public ObservableCollection TimeSeriesResults { get; } = new ObservableCollection();
@@ -297,6 +306,10 @@ namespace MtApi5TestClient
AccountInfoIntegerCommand = new DelegateCommand(ExecuteAccountInfoInteger);
AccountInfoStringCommand = new DelegateCommand(ExecuteAccountInfoString);
+ TerminalInfoDoubleCommand = new DelegateCommand(ExecuteTerminalInfoDouble);
+ TerminalInfoIntegerCommand = new DelegateCommand(ExecuteTerminalInfoInteger);
+ TerminalInfoStringCommand = new DelegateCommand(ExecuteTerminalInfoString);
+
CopyRatesCommand = new DelegateCommand(ExecuteCopyRates);
CopyTimesCommand = new DelegateCommand(ExecuteCopyTime);
CopyOpenCommand = new DelegateCommand(ExecuteCopyOpen);
@@ -483,7 +496,7 @@ namespace MtApi5TestClient
{
var result = await Execute(() => _mtApiClient.AccountInfoInteger(AccountInfoIntegerPropertyId));
- var message = $"AccountInfoInteger: property_id = {AccountInfoDoublePropertyId}; result = {result}";
+ var message = $"AccountInfoInteger: property_id = {AccountInfoIntegerPropertyId}; result = {result}";
AddLog(message);
}
@@ -491,10 +504,35 @@ namespace MtApi5TestClient
{
var result = await Execute(() => _mtApiClient.AccountInfoString(AccountInfoStringPropertyId));
- var message = $"AccountInfoString: property_id = {AccountInfoDoublePropertyId}; result = {result}";
+ var message = $"AccountInfoString: property_id = {AccountInfoStringPropertyId}; result = {result}";
AddLog(message);
}
+ private async void ExecuteTerminalInfoDouble(object o)
+ {
+ var result = await Execute(() => _mtApiClient.TerminalInfoDouble(TerminalInfoDoublePropertyId));
+
+ var message = $"TerminalInfoDouble: property_id = {TerminalInfoDoublePropertyId}; result = {result}";
+ AddLog(message);
+ }
+
+ private async void ExecuteTerminalInfoInteger(object o)
+ {
+ var result = await Execute(() => _mtApiClient.TerminalInfoInteger(TerminalInfoIntegerPropertyId));
+
+ var message = $"TerminalInfoInteger: property_id = {TerminalInfoIntegerPropertyId}; result = {result}";
+ AddLog(message);
+ }
+
+ private async void ExecuteTerminalInfoString(object o)
+ {
+ var result = await Execute(() => _mtApiClient.TerminalInfoString(TerminalInfoStringPropertyId));
+
+ var message = $"TerminalInfoString: property_id = {TerminalInfoStringPropertyId}; result = {result}";
+ AddLog(message);
+ }
+
+
private async void ExecuteCopyTime(object o)
{
if (string.IsNullOrEmpty(TimeSeriesValues?.SymbolValue)) return;
diff --git a/mq5/MtApi5.mq5 b/mq5/MtApi5.mq5
index 9b553193..8434451e 100755
--- a/mq5/MtApi5.mq5
+++ b/mq5/MtApi5.mq5
@@ -706,33 +706,37 @@ int executeCommand()
Execute_IndicatorRelease();
break;
+
case 241: //ChartOpen
Execute_ChartOpen();
break;
-
case 242: //ChartFirst
Execute_ChartFirst();
break;
-
case 243: //ChartFirst
Execute_ChartNext();
break;
-
case 245: //ChartFirst
Execute_ChartSymbol();
break;
-
case 236: //ChartApplyTemplate
Execute_ChartApplyTemplate();
break;
-
case 252: //ChartGetString
Execute_ChartGetString();
break;
+
case 153: //TerminalInfoString
Execute_TerminalInfoString();
break;
+ case 204: //TerminalInfoInteger
+ Execute_TerminalInfoInteger();
+ break;
+ case 205: //TerminalInfoDouble
+ Execute_TerminalInfoDouble();
+ break;
+
case 132: //GetLastError
@@ -6202,6 +6206,43 @@ void Execute_TerminalInfoString()
}
}
+
+void Execute_TerminalInfoInteger()
+{
+ int propertyId;
+
+ if (!getIntValue(ExpertHandle, 0, propertyId, _error))
+ {
+ PrintParamError("TerminalInfoInteger", "propertyId", _error);
+ sendErrorResponse(ExpertHandle, -1, _error, _response_error);
+ return;
+ }
+
+ if (!sendIntResponse(ExpertHandle, TerminalInfoInteger((ENUM_TERMINAL_INFO_INTEGER)propertyId), _response_error))
+ {
+ PrintResponseError("TerminalInfoInteger", _response_error);
+ }
+}
+
+void Execute_TerminalInfoDouble()
+{
+ int propertyId;
+
+ if (!getIntValue(ExpertHandle, 0, propertyId, _error))
+ {
+ PrintParamError("TerminalInfoDouble", "propertyId", _error);
+ sendErrorResponse(ExpertHandle, -1, _error, _response_error);
+ return;
+ }
+
+ if (!sendDoubleResponse(ExpertHandle, TerminalInfoDouble((ENUM_TERMINAL_INFO_DOUBLE)propertyId), _response_error))
+ {
+ PrintResponseError("TerminalInfoDouble", _response_error);
+ }
+}
+
+
+
string ExecuteRequest_IndicatorCreate(JSONObject *jo)
{
//Symbol