diff --git a/MtApi/EnumTerminalInfoDouble.cs b/MtApi/EnumTerminalInfoDouble.cs
new file mode 100755
index 00000000..57a4154a
--- /dev/null
+++ b/MtApi/EnumTerminalInfoDouble.cs
@@ -0,0 +1,8 @@
+namespace MtApi
+{
+ // https://docs.mql4.com/constants/environment_state/terminalstatus#enum_terminal_info_double
+ public enum EnumTerminalInfoDouble
+ {
+ TERMINAL_COMMUNITY_BALANCE = 25 // Balance in MQL5.community
+ }
+}
\ No newline at end of file
diff --git a/MtApi/MtApi.csproj b/MtApi/MtApi.csproj
index 62fb4e60..fb8ff55c 100755
--- a/MtApi/MtApi.csproj
+++ b/MtApi/MtApi.csproj
@@ -62,6 +62,7 @@
+
diff --git a/MtApi/MtApiClient.cs b/MtApi/MtApiClient.cs
index 8164a7ce..06e39417 100755
--- a/MtApi/MtApiClient.cs
+++ b/MtApi/MtApiClient.cs
@@ -683,7 +683,18 @@ namespace MtApi
return SendCommand(MtCommandType.TerminalInfoInteger, commandParameters);
}
- //TODO: TerminalInfoDouble
+ ///
+ ///Returns the value of a corresponding property of the mql4 program environment.
+ ///
+ ///Identifier of a property. Can be one of the values of the ENUM_TERMINAL_INFO_DOUBLE enumeration.
+ ///
+ ///Value of double type.
+ ///
+ public double TerminalInfoDouble(EnumTerminalInfoDouble propertyId)
+ {
+ var commandParameters = new ArrayList { (int)propertyId };
+ return SendCommand(MtCommandType.TerminalInfoDouble, commandParameters);
+ }
///
///Returns the name of company owning the client terminal.
diff --git a/MtApi/MtCommandType.cs b/MtApi/MtCommandType.cs
index 16ca1315..34370772 100755
--- a/MtApi/MtCommandType.cs
+++ b/MtApi/MtCommandType.cs
@@ -63,7 +63,7 @@ namespace MtApi
TerminalPath = 70,
TerminalInfoString = 153,
TerminalInfoInteger = 204,
- //TerminalInfoDouble = 205,
+ TerminalInfoDouble = 205,
//Account Information
AccountBalance = 40,
diff --git a/TestClients/TestApiClientUI/Form1.Designer.cs b/TestClients/TestApiClientUI/Form1.Designer.cs
index 36f217b6..f634d873 100644
--- a/TestClients/TestApiClientUI/Form1.Designer.cs
+++ b/TestClients/TestApiClientUI/Form1.Designer.cs
@@ -164,6 +164,8 @@
this.button34 = new System.Windows.Forms.Button();
this.button35 = new System.Windows.Forms.Button();
this.comboBox9 = new System.Windows.Forms.ComboBox();
+ this.comboBox10 = new System.Windows.Forms.ComboBox();
+ this.button36 = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.statusStrip1.SuspendLayout();
this.groupBox2.SuspendLayout();
@@ -1046,6 +1048,8 @@
//
// tabPage4
//
+ this.tabPage4.Controls.Add(this.button36);
+ this.tabPage4.Controls.Add(this.comboBox10);
this.tabPage4.Controls.Add(this.comboBox9);
this.tabPage4.Controls.Add(this.button35);
this.tabPage4.Controls.Add(this.button34);
@@ -1631,6 +1635,25 @@
this.comboBox9.Size = new System.Drawing.Size(186, 21);
this.comboBox9.TabIndex = 34;
//
+ // comboBox10
+ //
+ this.comboBox10.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBox10.FormattingEnabled = true;
+ this.comboBox10.Location = new System.Drawing.Point(13, 157);
+ this.comboBox10.Name = "comboBox10";
+ this.comboBox10.Size = new System.Drawing.Size(186, 21);
+ this.comboBox10.TabIndex = 35;
+ //
+ // button36
+ //
+ this.button36.Location = new System.Drawing.Point(208, 157);
+ this.button36.Name = "button36";
+ this.button36.Size = new System.Drawing.Size(111, 23);
+ this.button36.TabIndex = 36;
+ this.button36.Text = "TerminalInfoDouble";
+ this.button36.UseVisualStyleBackColor = true;
+ this.button36.Click += new System.EventHandler(this.button36_Click);
+ //
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -1813,6 +1836,8 @@
private System.Windows.Forms.Button button34;
private System.Windows.Forms.Button button35;
private System.Windows.Forms.ComboBox comboBox9;
+ private System.Windows.Forms.Button button36;
+ private System.Windows.Forms.ComboBox comboBox10;
}
}
diff --git a/TestClients/TestApiClientUI/Form1.cs b/TestClients/TestApiClientUI/Form1.cs
index db7c03e1..ffae6639 100644
--- a/TestClients/TestApiClientUI/Form1.cs
+++ b/TestClients/TestApiClientUI/Form1.cs
@@ -32,6 +32,7 @@ namespace TestApiClientUI
comboBox7.DataSource = Enum.GetNames(typeof(EnumSymbolInfoDouble));
comboBox8.DataSource = Enum.GetNames(typeof(MarketInfoModeType));
comboBox9.DataSource = Enum.GetNames(typeof(EnumTerminalInfoInteger));
+ comboBox10.DataSource = Enum.GetNames(typeof(EnumTerminalInfoDouble));
_apiClient.QuoteUpdated += apiClient_QuoteUpdated;
_apiClient.QuoteAdded += apiClient_QuoteAdded;
@@ -1275,5 +1276,15 @@ namespace TestApiClientUI
var result = await Execute(() => _apiClient.TerminalInfoInteger(propId));
PrintLog($"TerminalInfoInteger: result = {result}");
}
+
+ //TerminalInfoDouble
+ private async void button36_Click(object sender, EventArgs e)
+ {
+ EnumTerminalInfoDouble propId;
+ Enum.TryParse(comboBox10.Text, out propId);
+
+ var result = await Execute(() => _apiClient.TerminalInfoDouble(propId));
+ PrintLog($"TerminalInfoDouble: result = {result}");
+ }
}
}
diff --git a/mq4/MtApi.ex4 b/mq4/MtApi.ex4
index 77f5fc1a..b70a001e 100755
Binary files a/mq4/MtApi.ex4 and b/mq4/MtApi.ex4 differ
diff --git a/mq4/MtApi.mq4 b/mq4/MtApi.mq4
index dc8128f2..5603cfa8 100755
Binary files a/mq4/MtApi.mq4 and b/mq4/MtApi.mq4 differ