Merge branch 'mt5_1_0_18' into master

This commit is contained in:
Janderson FFerreira
2018-03-12 11:34:00 -03:00
committed by GitHub
10 changed files with 201 additions and 55 deletions
+33 -2
View File
@@ -280,6 +280,17 @@ namespace MtApi5
return SendCommand<string>(Mt5CommandType.PositionGetString, commandParameters);
}
///<summary>
///The function returns the ticket of a position with the specified index in the list of open positions and automatically selects the position to work with using functions PositionGetDouble, PositionGetInteger, PositionGetString.
///</summary>
///<param name="index">Identifier of a position property.</param>
public ulong PositionGetTicket(int index)
{
var commandParameters = new ArrayList { index };
return SendCommand<ulong>(Mt5CommandType.PositionGetTicket, commandParameters);
}
///<summary>
///Returns the number of current orders.
///</summary>
@@ -611,11 +622,11 @@ namespace MtApi5
///<param name="symbolName">Symbol name.</param>
///<param name="timeframe"> Period.</param>
///<param name="propId">Identifier of the requested property, value of the ENUM_SERIES_INFO_INTEGER enumeration.</param>
public int SeriesInfoInteger(string symbolName, ENUM_TIMEFRAMES timeframe, ENUM_SERIES_INFO_INTEGER propId)
public long SeriesInfoInteger(string symbolName, ENUM_TIMEFRAMES timeframe, ENUM_SERIES_INFO_INTEGER propId)
{
var commandParameters = new ArrayList { symbolName, (int)timeframe, (int)propId };
return SendCommand<int>(Mt5CommandType.SeriesInfoInteger, commandParameters);
return SendCommand<long>(Mt5CommandType.SeriesInfoInteger, commandParameters);
}
///<summary>
@@ -3006,6 +3017,26 @@ namespace MtApi5
#endregion //Date and Time
#region Checkup
///<summary>
///Returns the value of the last error that occurred during the execution of an mql5 program.
///</summary>
public int GetLastError()
{
return SendCommand<int>(Mt5CommandType.GetLastError, null);
}
///<summary>
///Sets the value of the predefined variable _LastError into zero.
///</summary>
public void ResetLastError()
{
SendCommand<object>(Mt5CommandType.ResetLastError, null);
}
#endregion
#endregion // Public Methods
#region Properties