mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-08-15 19:58:10 +00:00
Issue #100: implemented functions GetLastError, ResetLastError() in MtApi (MT5)
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user