diff --git a/MtApi/EnumTerminalInfoInteger.cs b/MtApi/EnumTerminalInfoInteger.cs
new file mode 100755
index 00000000..fdff8c22
--- /dev/null
+++ b/MtApi/EnumTerminalInfoInteger.cs
@@ -0,0 +1,27 @@
+namespace MtApi
+{
+ // https://docs.mql4.com/constants/environment_state/terminalstatus#enum_terminal_info_integer
+ public enum EnumTerminalInfoInteger
+ {
+ TERMINAL_BUILD = 5, // The client terminal build number
+ TERMINAL_COMMUNITY_ACCOUNT = 23, // The flag indicates the presence of MQL5.community authorization data in the terminal
+ TERMINAL_COMMUNITY_CONNECTION = 24, // Connection to MQL5.community
+ TERMINAL_CONNECTED = 6, // Connection to a trade server
+ TERMINAL_DLLS_ALLOWED = 7, // Permission to use DLL
+ TERMINAL_TRADE_ALLOWED = 8, // Permission to trade
+ TERMINAL_EMAIL_ENABLED = 9, // Permission to send e-mails using SMTP-server and login, specified in the terminal settings
+ TERMINAL_FTP_ENABLED = 10, // Permission to send reports using FTP-server and login, specified in the terminal settings
+ TERMINAL_NOTIFICATIONS_ENABLED = 26, // Permission to send notifications to smartphone
+ TERMINAL_MAXBARS = 11, // The maximal bars count on the chart
+ TERMINAL_MQID = 22, // The flag indicates the presence of MetaQuotes ID data to send Push notifications
+ TERMINAL_CODEPAGE = 12, // Number of the code page of the language installed in the client terminal
+ TERMINAL_CPU_CORES = 21, // The number of CPU cores in the system
+ TERMINAL_DISK_SPACE = 20, // Free disk space for the MQL4\Files folder of the terminal, Mb
+ TERMINAL_MEMORY_PHYSICAL = 14, // Physical memory in the system, Mb
+ TERMINAL_MEMORY_TOTAL = 15, // Memory available to the process of the terminal , Mb
+ TERMINAL_MEMORY_AVAILABLE = 16, // Free memory of the terminal process, Mb
+ TERMINAL_MEMORY_USED = 17, // Memory used by the terminal , Mb
+ TERMINAL_SCREEN_DPI = 27, // The resolution of information display on the screen is measured as number of Dots in a line per Inch (DPI). Knowing the parameter value, you can set the size of graphical objects so that they look the same on monitors with different resolution characteristics.
+ TERMINAL_PING_LAST = 28 // The last known value of a ping to a trade server in microseconds. One second comprises of one million microseconds
+ }
+}
\ No newline at end of file
diff --git a/MtApi/MtApi.csproj b/MtApi/MtApi.csproj
index 1d995095..62fb4e60 100755
--- a/MtApi/MtApi.csproj
+++ b/MtApi/MtApi.csproj
@@ -62,6 +62,7 @@
+
diff --git a/MtApi/MtApiClient.cs b/MtApi/MtApiClient.cs
index 296077d0..8164a7ce 100755
--- a/MtApi/MtApiClient.cs
+++ b/MtApi/MtApiClient.cs
@@ -498,83 +498,230 @@ namespace MtApi
}
#endregion
- #region Check Status
+ #region Checkup
+ ///
+ ///Returns the contents of the system variable _LastError.
+ ///After the function call, the contents of _LastError are reset.
+ ///
+ ///
+ ///Returns the value of the last error that occurred during the execution of an mql4 program.
+ ///
public int GetLastError()
{
return SendCommand(MtCommandType.GetLastError, null);
}
+ ///
+ ///Checks connection between client terminal and server.
+ ///
+ ///
+ ///It returns true if connection to the server was successfully established, otherwise, it returns false.
+ ///
public bool IsConnected()
{
return SendCommand(MtCommandType.IsConnected, null);
}
+ ///
+ ///Checks if the Expert Advisor runs on a demo account.
+ ///
+ ///
+ ///Returns true if the Expert Advisor runs on a demo account, otherwise returns false.
+ ///
public bool IsDemo()
{
return SendCommand(MtCommandType.IsDemo, null);
}
+ ///
+ ///Checks if the DLL function call is allowed for the Expert Advisor.
+ ///
+ ///
+ ///Returns true if the DLL function call is allowed for the Expert Advisor, otherwise returns false.
+ ///
public bool IsDllsAllowed()
{
return SendCommand(MtCommandType.IsDllsAllowed, null);
}
+ ///
+ ///Checks if Expert Advisors are enabled for running.
+ ///
+ ///
+ ///Returns true if Expert Advisors are enabled for running, otherwise returns false.
+ ///
public bool IsExpertEnabled()
{
return SendCommand(MtCommandType.IsExpertEnabled, null);
}
+ ///
+ ///Checks if the Expert Advisor can call library function.
+ ///
+ ///
+ ///Returns true if the Expert Advisor can call library function, otherwise returns false.
+ ///
public bool IsLibrariesAllowed()
{
return SendCommand(MtCommandType.IsLibrariesAllowed, null);
}
+ ///
+ ///Checks if Expert Advisor runs in the Strategy Tester optimization mode.
+ ///
+ ///
+ ///Returns true if Expert Advisor runs in the Strategy Tester optimization mode, otherwise returns false.
+ ///
public bool IsOptimization()
{
return SendCommand(MtCommandType.IsOptimization, null);
}
+ ///
+ ///Checks the forced shutdown of an mql4 program.
+ ///
+ ///
+ ///Returns true, if the _StopFlag system variable contains a value other than 0.
+ ///A nonzero value is written into _StopFlag, if a mql4 program has been commanded to complete its operation.
+ ///In this case, you must immediately terminate the program, otherwise the program will be completed
+ ///forcibly from the outside after 3 seconds.
+ ///
public bool IsStopped()
{
return SendCommand(MtCommandType.IsStopped, null);
}
+ ///
+ ///Checks if the Expert Advisor runs in the testing mode.
+ ///
+ ///
+ ///Returns true if the Expert Advisor runs in the testing mode, otherwise returns false.
+ ///
public bool IsTesting()
{
return SendCommand(MtCommandType.IsTesting, null);
}
+ ///
+ ///Checks if the Expert Advisor is allowed to trade and trading context is not busy.
+ ///
+ ///
+ ///Returns true if the Expert Advisor is allowed to trade and trading context is not busy, otherwise returns false.
+ ///
public bool IsTradeAllowed()
{
return SendCommand(MtCommandType.IsTradeAllowed, null);
}
+ ///
+ ///Returns the information about trade context.
+ ///
+ ///
+ ///Returns true if a thread for trading is occupied by another Expert Advisor, otherwise returns false.
+ ///
public bool IsTradeContextBusy()
{
return SendCommand(MtCommandType.IsTradeContextBusy, null);
}
+ ///
+ ///Checks if the Expert Advisor is tested in visual mode.
+ ///
+ ///
+ ///Returns true if the Expert Advisor is tested with checked "Visual Mode" button, otherwise returns false.
+ ///
public bool IsVisualMode()
{
return SendCommand(MtCommandType.IsVisualMode, null);
}
+ ///
+ ///Returns the code of a reason for deinitialization.
+ ///
+ ///
+ ///Returns the value of _UninitReason which is formed before OnDeinit() is called.
+ ///Value depends on the reasons that led to deinitialization.
+ ///
public int UninitializeReason()
{
return SendCommand(MtCommandType.UninitializeReason, null);
}
+ ///
+ ///Print the error description.
+ ///
public string ErrorDescription(int errorCode)
{
var commandParameters = new ArrayList { errorCode };
return SendCommand(MtCommandType.ErrorDescription, commandParameters);
}
+ ///
+ ///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_STRING enumeration.
+ ///
+ ///Value of string type.
+ ///
+ public string TerminalInfoString(ENUM_TERMINAL_INFO_STRING propertyId)
+ {
+ var commandParameters = new ArrayList { (int)propertyId };
+ return SendCommand(MtCommandType.TerminalInfoString, commandParameters);
+ }
+
+ ///
+ ///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_INTEGER enumeration.
+ ///
+ ///Value of int type.
+ ///
+ public int TerminalInfoInteger(EnumTerminalInfoInteger propertyId)
+ {
+ var commandParameters = new ArrayList { (int)propertyId };
+ return SendCommand(MtCommandType.TerminalInfoInteger, commandParameters);
+ }
+
+ //TODO: TerminalInfoDouble
+
+ ///
+ ///Returns the name of company owning the client terminal.
+ ///
+ ///
+ ///The name of company owning the client terminal.
+ ///
+ public string TerminalCompany()
+ {
+ return SendCommand(MtCommandType.TerminalCompany, null);
+ }
+
+ ///
+ ///Returns client terminal name.
+ ///
+ ///
+ ///Client terminal name.
+ ///
+ public string TerminalName()
+ {
+ return SendCommand(MtCommandType.TerminalName, null);
+ }
+
+ ///
+ ///Returns the directory, from which the client terminal was launched.
+ ///
+ ///
+ ///The directory, from which the client terminal was launched.
+ ///
+ public string TerminalPath()
+ {
+ return SendCommand(MtCommandType.TerminalPath, null);
+ }
+
#endregion
#region Account Information
-
+
public double AccountBalance()
{
return SendCommand(MtCommandType.AccountBalance, null);
@@ -732,25 +879,6 @@ namespace MtApi
#endregion
- #region Client Terminal Functions
-
- public string TerminalCompany()
- {
- return SendCommand(MtCommandType.TerminalCompany, null);
- }
-
- public string TerminalName()
- {
- return SendCommand(MtCommandType.TerminalName, null);
- }
-
- public string TerminalPath()
- {
- return SendCommand(MtCommandType.TerminalPath, null);
- }
-
- #endregion
-
#region Date and Time Functions
public int Day()
@@ -1403,6 +1531,15 @@ namespace MtApi
return response?.Rates;
}
+ ///
+ ///Returns information about the state of historical data.
+ ///
+ ///Symbol name.
+ ///Period.
+ ///Identifier of the requested property, value of the ENUM_SERIES_INFO_INTEGER enumeration.
+ ///
+ ///Returns value of the long type.
+ ///
public long SeriesInfoInteger(string symbolName, ENUM_TIMEFRAMES timeframe, EnumSeriesInfoInteger propId)
{
var response = SendRequest(new SeriesInfoIntegerRequest
@@ -1417,15 +1554,6 @@ namespace MtApi
#endregion
- #region Checkup
- public string TerminalInfoString(ENUM_TERMINAL_INFO_STRING propertyId)
- {
- var commandParameters = new ArrayList { (int)propertyId };
- return SendCommand(MtCommandType.TerminalInfoString, commandParameters);
- }
-
- #endregion
-
#region Market Info
///
diff --git a/MtApi/MtCommandType.cs b/MtApi/MtCommandType.cs
index 5d554be7..16ca1315 100755
--- a/MtApi/MtCommandType.cs
+++ b/MtApi/MtCommandType.cs
@@ -58,9 +58,15 @@ namespace MtApi
IsVisualMode = 37,
UninitializeReason = 38,
ErrorDescription = 39,
+ TerminalCompany = 68,
+ TerminalName = 69,
+ TerminalPath = 70,
+ TerminalInfoString = 153,
+ TerminalInfoInteger = 204,
+ //TerminalInfoDouble = 205,
//Account Information
- AccountBalance = 40,
+ AccountBalance = 40,
AccountCredit = 41,
AccountCompany = 42,
AccountCurrency = 43,
@@ -91,11 +97,6 @@ namespace MtApi
SendMail = 66,
Sleep = 67,
- //Client Terminal
- TerminalCompany = 68,
- TerminalName = 69,
- TerminalPath = 70,
-
//Date and Time
Day = 71,
DayOfWeek = 72,
@@ -188,8 +189,6 @@ namespace MtApi
//
RefreshRates = 150,
//
- TerminalInfoString = 153,
- SymbolInfoString = 154,
//Requests
MtRequest = 155,
@@ -197,7 +196,8 @@ namespace MtApi
//Backtesting
BacktestingReady = 156,
- //Symbols
+ //Market Info
+ SymbolInfoString = 154,
SymbolsTotal = 200,
SymbolName = 201,
SymbolSelect = 202,
diff --git a/MtApi/MtErrorCode.cs b/MtApi/MtErrorCode.cs
old mode 100644
new mode 100755
index 07546598..8abd61ef
--- a/MtApi/MtErrorCode.cs
+++ b/MtApi/MtErrorCode.cs
@@ -1,5 +1,6 @@
namespace MtApi
{
+ // https://docs.mql4.com/constants/errorswarnings/errorcodes
public enum MtErrorCode
{
MtApiCustomError = -1, // Error occurred in MtApi.
@@ -10,91 +11,91 @@
ServerBusy = 4, // Trade server is busy.
OldVersion = 5, // Old version of the client terminal.
NoConnection = 6, // No connection with trade server.
- NotEnoughRights = 7, // Not enough rights.
- TooFrequentRequests = 8, // Too frequent requests.
- MalfunctionalTrade = 9, // Malfunctional trade operation.
+ NotEnoughRights = 7, // Not enough rights.
+ TooFrequentRequests = 8, // Too frequent requests.
+ MalfunctionalTrade = 9, // Malfunctional trade operation.
AccountDisabled = 64, // Account disabled.
- InvalidAccount = 65, // Invalid account.
- TradeTimeout = 128, // Trade timeout.
- InvalidPrice = 129, // Invalid price.
- InvalidStops = 130, // Invalid stops.
- InvalidTradeVolume = 131, // Invalid trade volume.
- MarketClosed = 132, // Market is closed.
- TradeDisabled = 133, // Trade is disabled.
- NotEnoughMoney = 134, // Not enough money.
- PriceChanged = 135, // Price changed.
- OffQuotes = 136, // Off quotes.
- BrokerBusy = 137, // Broker is busy.
- Requote = 138, // Requote.
- OrderLocked = 139, // Order is locked.
- LongPositionsOnlyAllowed = 140, // Long positions only allowed.
- TooManyRequests = 141, // Too many requests.
- TradeModifyDenied = 145, // Modification denied because an order is too close to market.
- TradeContextBusy = 146, // Trade context is busy.
- TradeExpirationDenied = 147, // Expirations are denied by broker.
- TradeTooManyOrders = 148, // The amount of opened and pending orders has reached the limit set by a broker.
+ InvalidAccount = 65, // Invalid account.
+ TradeTimeout = 128, // Trade timeout.
+ InvalidPrice = 129, // Invalid price.
+ InvalidStops = 130, // Invalid stops.
+ InvalidTradeVolume = 131, // Invalid trade volume.
+ MarketClosed = 132, // Market is closed.
+ TradeDisabled = 133, // Trade is disabled.
+ NotEnoughMoney = 134, // Not enough money.
+ PriceChanged = 135, // Price changed.
+ OffQuotes = 136, // Off quotes.
+ BrokerBusy = 137, // Broker is busy.
+ Requote = 138, // Requote.
+ OrderLocked = 139, // Order is locked.
+ LongPositionsOnlyAllowed = 140, // Long positions only allowed.
+ TooManyRequests = 141, // Too many requests.
+ TradeModifyDenied = 145, // Modification denied because an order is too close to market.
+ TradeContextBusy = 146, // Trade context is busy.
+ TradeExpirationDenied = 147, // Expirations are denied by broker.
+ TradeTooManyOrders = 148, // The amount of opened and pending orders has reached the limit set by a broker.
- NoMqlerror = 4000, // No error.
- WrongFunctionPointer = 4001, // Wrong function pointer.
- ArrayIndexOutOfRange = 4002, // Array index is out of range.
- NoMemoryForFunctionCallStack = 4003, // No memory for function call stack.
- RecursiveStackOverflow = 4004, // Recursive stack overflow.
- NotEnoughStackForParameter = 4005, // Not enough stack for parameter.
- NoMemoryForParameterString = 4006, // No memory for parameter string.
- NoMemoryForTempString = 4007, // No memory for temp string.
- NotInitializedString = 4008, // Not initialized string.
- NotInitializedArraystring = 4009, // Not initialized string in an array.
- NoMemoryForArraystring = 4010, // No memory for an array string.
- TooLongString = 4011, // Too long string.
- RemainderFromZeroDivide = 4012, // Remainder from zero divide.
- ZeroDivide = 4013, // Zero divide.
- UnknownCommand = 4014, // Unknown command.
- WrongJump = 4015, // Wrong jump.
- NotInitializedArray = 4016, // Not initialized array.
- DllCallsNotAllowed = 4017, // DLL calls are not allowed.
- CannotLoadLibrary = 4018, // Cannot load library.
- CannotCallFunction = 4019, // Cannot call function.
- ExternalExpertCallsNotAllowed = 4020, // EA function calls are not allowed.
- NotEnoughMemoryForReturnedString = 4021, // Not enough memory for a string returned from a function.
- SystemBusy = 4022, // System is busy.
- InvalidFunctionParametersCount = 4050, // Invalid function parameters count.
- InvalidFunctionParameterValue = 4051, // Invalid function parameter value.
- StringFunctionInternalError = 4052, // String function internal error.
- SomeArrayError = 4053, // Some array error.
- IncorrectSeriesArrayUsing = 4054, // Incorrect series array using.
- CustomIndicatorError = 4055, // Custom indicator error.
- IncompatibleArrays = 4056, // Arrays are incompatible.
- GlobalVariablesProcessingError = 4057, // Global variables processing error.
- GlobalVariableNotFound = 4058, // Global variable not found.
- FunctionNotAllowedInTestingMode = 4059, // Function is not allowed in testing mode.
- FunctionNotConfirmed = 4060, // Function is not confirmed.
- SendMailError = 4061, // Mail sending error.
- StringParameterExpected = 4062, // String parameter expected.
- IntegerParameterExpected = 4063, // Integer parameter expected.
- DoubleParameterExpected = 4064, // Double parameter expected.
- ArrayAsParameterExpected = 4065, // Array as parameter expected.
- HistoryWillUpdated = 4066, // Requested history data in updating state.
- TradeError = 4067, // Some error in trade operation execution.
- EndOfFile = 4099, // End of a file.
- SomeFileError = 4100, // Some file error.
- WrongFileName = 4101, // Wrong file name.
- TooManyOpenedFiles = 4102, // Too many opened files.
- CannotOpenFile = 4103, // Cannot open file.
- IncompatibleAccessToFile = 4104, // Incompatible access to a file.
- NoOrderSelected = 4105, // No order selected.
- UnknownSymbol = 4106, // Unknown symbol.
- InvalidPriceParam = 4107, // Invalid price.
- InvalidTicket = 4108, // Invalid ticket.
- TradeNotAllowed = 4109, // Trade is not allowed.
- LongsNotAllowed = 4110, // Longs are not allowed.
- ShortsNotAllowed = 4111, // Shorts are not allowed.
- ObjectAlreadyExists = 4200, // Object already exists.
- UnknownObjectProperty = 4201, // Unknown object property.
- ObjectDoesNotExist = 4202, // Object does not exist.
- UnknownObjectType = 4203, // Unknown object type.
- NoObjectName = 4204, // No object name.
- ObjectCoordinatesError = 4205, // Object coordinates error.
- NoSpecifiedSubwindow = 4206, // No specified subwindow.
- SomeObjectError = 4207 // Some error in object operation.
+ NoMqlerror = 4000, // No error.
+ WrongFunctionPointer = 4001, // Wrong function pointer.
+ ArrayIndexOutOfRange = 4002, // Array index is out of range.
+ NoMemoryForFunctionCallStack = 4003, // No memory for function call stack.
+ RecursiveStackOverflow = 4004, // Recursive stack overflow.
+ NotEnoughStackForParameter = 4005, // Not enough stack for parameter.
+ NoMemoryForParameterString = 4006, // No memory for parameter string.
+ NoMemoryForTempString = 4007, // No memory for temp string.
+ NotInitializedString = 4008, // Not initialized string.
+ NotInitializedArraystring = 4009, // Not initialized string in an array.
+ NoMemoryForArraystring = 4010, // No memory for an array string.
+ TooLongString = 4011, // Too long string.
+ RemainderFromZeroDivide = 4012, // Remainder from zero divide.
+ ZeroDivide = 4013, // Zero divide.
+ UnknownCommand = 4014, // Unknown command.
+ WrongJump = 4015, // Wrong jump.
+ NotInitializedArray = 4016, // Not initialized array.
+ DllCallsNotAllowed = 4017, // DLL calls are not allowed.
+ CannotLoadLibrary = 4018, // Cannot load library.
+ CannotCallFunction = 4019, // Cannot call function.
+ ExternalExpertCallsNotAllowed = 4020, // EA function calls are not allowed.
+ NotEnoughMemoryForReturnedString = 4021, // Not enough memory for a string returned from a function.
+ SystemBusy = 4022, // System is busy.
+ InvalidFunctionParametersCount = 4050, // Invalid function parameters count.
+ InvalidFunctionParameterValue = 4051, // Invalid function parameter value.
+ StringFunctionInternalError = 4052, // String function internal error.
+ SomeArrayError = 4053, // Some array error.
+ IncorrectSeriesArrayUsing = 4054, // Incorrect series array using.
+ CustomIndicatorError = 4055, // Custom indicator error.
+ IncompatibleArrays = 4056, // Arrays are incompatible.
+ GlobalVariablesProcessingError = 4057, // Global variables processing error.
+ GlobalVariableNotFound = 4058, // Global variable not found.
+ FunctionNotAllowedInTestingMode = 4059, // Function is not allowed in testing mode.
+ FunctionNotConfirmed = 4060, // Function is not confirmed.
+ SendMailError = 4061, // Mail sending error.
+ StringParameterExpected = 4062, // String parameter expected.
+ IntegerParameterExpected = 4063, // Integer parameter expected.
+ DoubleParameterExpected = 4064, // Double parameter expected.
+ ArrayAsParameterExpected = 4065, // Array as parameter expected.
+ HistoryWillUpdated = 4066, // Requested history data in updating state.
+ TradeError = 4067, // Some error in trade operation execution.
+ EndOfFile = 4099, // End of a file.
+ SomeFileError = 4100, // Some file error.
+ WrongFileName = 4101, // Wrong file name.
+ TooManyOpenedFiles = 4102, // Too many opened files.
+ CannotOpenFile = 4103, // Cannot open file.
+ IncompatibleAccessToFile = 4104, // Incompatible access to a file.
+ NoOrderSelected = 4105, // No order selected.
+ UnknownSymbol = 4106, // Unknown symbol.
+ InvalidPriceParam = 4107, // Invalid price.
+ InvalidTicket = 4108, // Invalid ticket.
+ TradeNotAllowed = 4109, // Trade is not allowed.
+ LongsNotAllowed = 4110, // Longs are not allowed.
+ ShortsNotAllowed = 4111, // Shorts are not allowed.
+ ObjectAlreadyExists = 4200, // Object already exists.
+ UnknownObjectProperty = 4201, // Unknown object property.
+ ObjectDoesNotExist = 4202, // Object does not exist.
+ UnknownObjectType = 4203, // Unknown object type.
+ NoObjectName = 4204, // No object name.
+ ObjectCoordinatesError = 4205, // Object coordinates error.
+ NoSpecifiedSubwindow = 4206, // No specified subwindow.
+ SomeObjectError = 4207 // Some error in object operation.
}
}
\ No newline at end of file
diff --git a/TestClients/TestApiClientUI/Form1.Designer.cs b/TestClients/TestApiClientUI/Form1.Designer.cs
index 8c9b2b14..36f217b6 100644
--- a/TestClients/TestApiClientUI/Form1.Designer.cs
+++ b/TestClients/TestApiClientUI/Form1.Designer.cs
@@ -162,6 +162,8 @@
this.label30 = new System.Windows.Forms.Label();
this.comboBox8 = new System.Windows.Forms.ComboBox();
this.button34 = new System.Windows.Forms.Button();
+ this.button35 = new System.Windows.Forms.Button();
+ this.comboBox9 = new System.Windows.Forms.ComboBox();
this.groupBox1.SuspendLayout();
this.statusStrip1.SuspendLayout();
this.groupBox2.SuspendLayout();
@@ -1044,6 +1046,8 @@
//
// tabPage4
//
+ this.tabPage4.Controls.Add(this.comboBox9);
+ this.tabPage4.Controls.Add(this.button35);
this.tabPage4.Controls.Add(this.button34);
this.tabPage4.Controls.Add(this.comboBox8);
this.tabPage4.Controls.Add(this.label30);
@@ -1608,6 +1612,25 @@
this.button34.UseVisualStyleBackColor = true;
this.button34.Click += new System.EventHandler(this.button34_Click);
//
+ // button35
+ //
+ this.button35.Location = new System.Drawing.Point(208, 128);
+ this.button35.Name = "button35";
+ this.button35.Size = new System.Drawing.Size(111, 23);
+ this.button35.TabIndex = 33;
+ this.button35.Text = "TerminalInfoInteger";
+ this.button35.UseVisualStyleBackColor = true;
+ this.button35.Click += new System.EventHandler(this.button35_Click);
+ //
+ // comboBox9
+ //
+ this.comboBox9.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBox9.FormattingEnabled = true;
+ this.comboBox9.Location = new System.Drawing.Point(13, 130);
+ this.comboBox9.Name = "comboBox9";
+ this.comboBox9.Size = new System.Drawing.Size(186, 21);
+ this.comboBox9.TabIndex = 34;
+ //
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -1788,6 +1811,8 @@
private System.Windows.Forms.Label label30;
private System.Windows.Forms.ComboBox comboBox8;
private System.Windows.Forms.Button button34;
+ private System.Windows.Forms.Button button35;
+ private System.Windows.Forms.ComboBox comboBox9;
}
}
diff --git a/TestClients/TestApiClientUI/Form1.cs b/TestClients/TestApiClientUI/Form1.cs
index fc37ee5b..db7c03e1 100644
--- a/TestClients/TestApiClientUI/Form1.cs
+++ b/TestClients/TestApiClientUI/Form1.cs
@@ -31,6 +31,7 @@ namespace TestApiClientUI
comboBox6.DataSource = Enum.GetNames(typeof(ENUM_TIMEFRAMES));
comboBox7.DataSource = Enum.GetNames(typeof(EnumSymbolInfoDouble));
comboBox8.DataSource = Enum.GetNames(typeof(MarketInfoModeType));
+ comboBox9.DataSource = Enum.GetNames(typeof(EnumTerminalInfoInteger));
_apiClient.QuoteUpdated += apiClient_QuoteUpdated;
_apiClient.QuoteAdded += apiClient_QuoteAdded;
@@ -1264,5 +1265,15 @@ namespace TestApiClientUI
PrintLog($"SymbolInfoTick: Tick - time = {result.Time}, Bid = {result.Bid}, Ask = {result.Ask}, Last = {result.Last}, Volume = {result.Volume}");
}
}
+
+ //TerminalInfoInteger
+ private async void button35_Click(object sender, EventArgs e)
+ {
+ EnumTerminalInfoInteger propId;
+ Enum.TryParse(comboBox9.Text, out propId);
+
+ var result = await Execute(() => _apiClient.TerminalInfoInteger(propId));
+ PrintLog($"TerminalInfoInteger: result = {result}");
+ }
}
}
diff --git a/mq4/MtApi.ex4 b/mq4/MtApi.ex4
index 3f0aca61..77f5fc1a 100755
Binary files a/mq4/MtApi.ex4 and b/mq4/MtApi.ex4 differ
diff --git a/mq4/MtApi.mq4 b/mq4/MtApi.mq4
index 1e744d48..dc8128f2 100755
Binary files a/mq4/MtApi.mq4 and b/mq4/MtApi.mq4 differ