Issue #35: Implemented function TerminalInfoDouble in MtApi MT4

This commit is contained in:
vdemydiuk
2016-11-15 11:06:43 +02:00
parent 8e5dcbd2ee
commit 8e3f206c76
8 changed files with 58 additions and 2 deletions
+8
View File
@@ -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
}
}
+1
View File
@@ -62,6 +62,7 @@
<Compile Include="EnumSeriesInfoInteger.cs" />
<Compile Include="EnumSymbolInfoDouble.cs" />
<Compile Include="EnumSymbolInfoInteger.cs" />
<Compile Include="EnumTerminalInfoDouble.cs" />
<Compile Include="EnumTerminalInfoInteger.cs" />
<Compile Include="ExtensionMethods.cs" />
<Compile Include="Monitors\AvailabilityOrdersEventArgs.cs" />
+12 -1
View File
@@ -683,7 +683,18 @@ namespace MtApi
return SendCommand<int>(MtCommandType.TerminalInfoInteger, commandParameters);
}
//TODO: TerminalInfoDouble
///<summary>
///Returns the value of a corresponding property of the mql4 program environment.
///</summary>
///<param name="propertyId">Identifier of a property. Can be one of the values of the ENUM_TERMINAL_INFO_DOUBLE enumeration.</param>
///<returns>
///Value of double type.
///</returns>
public double TerminalInfoDouble(EnumTerminalInfoDouble propertyId)
{
var commandParameters = new ArrayList { (int)propertyId };
return SendCommand<double>(MtCommandType.TerminalInfoDouble, commandParameters);
}
///<summary>
///Returns the name of company owning the client terminal.
+1 -1
View File
@@ -63,7 +63,7 @@ namespace MtApi
TerminalPath = 70,
TerminalInfoString = 153,
TerminalInfoInteger = 204,
//TerminalInfoDouble = 205,
TerminalInfoDouble = 205,
//Account Information
AccountBalance = 40,