Issue #100: implemented functions GetLastError, ResetLastError() in MtApi (MT5)

This commit is contained in:
vdemydiuk
2018-03-09 19:18:54 +02:00
parent ec6c71607b
commit cab2de6d24
7 changed files with 113 additions and 13 deletions
+20 -3
View File
@@ -107,8 +107,6 @@ namespace MtApi5
BacktestingReady = 66,
IsTesting = 67,
Print = 68,
//Requests
MtRequest = 155,
@@ -179,6 +177,25 @@ namespace MtApi5
TimeLocal = 129,
TimeGMT = 130,
IndicatorRelease = 131
IndicatorRelease = 131,
//Checkup
GetLastError = 132,
TerminalInfoInteger = 133, //TODO
TerminalInfoDouble = 134, //TODO
TerminalInfoString = 135, //TODO
//Common Functions
Alert = 136, //TODO
Comment = 137, //TODO
GetTickCount = 138, //TODO
GetMicrosecondCount = 139, //TODO
MessageBox = 140, //TODO
PeriodSeconds = 141, //TODO
PlaySound = 142, //TODO
Print = 68,
ResetLastError = 143,
SendNotification = 144, //TODO
SendMail = 145 //TODO
}
}
+20
View File
@@ -2352,6 +2352,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