mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-08-13 02:38:07 +00:00
Issue #32: Added function ChartRedraw
This commit is contained in:
@@ -1722,6 +1722,15 @@ namespace MtApi
|
||||
{
|
||||
return SendCommand<long>(MtCommandType.ChartId, null);
|
||||
}
|
||||
|
||||
///<summary>
|
||||
///This function calls a forced redrawing of a specified chart.
|
||||
///</summary>
|
||||
public void ChartRedraw(long chartId = 0)
|
||||
{
|
||||
var commandParameters = new ArrayList { chartId };
|
||||
SendCommand<object>(MtCommandType.ChartRedraw, commandParameters);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
@@ -1872,6 +1881,11 @@ namespace MtApi
|
||||
throw new MtExecutionException(MtErrorCode.MtApiCustomError, "Response from MetaTrader is null");
|
||||
}
|
||||
|
||||
if (response.ErrorCode != 0)
|
||||
{
|
||||
throw new MtExecutionException((MtErrorCode)response.ErrorCode, response.ToString());
|
||||
}
|
||||
|
||||
var responseValue = response.GetValue();
|
||||
return responseValue != null ? (T)responseValue : default(T);
|
||||
}
|
||||
|
||||
@@ -197,6 +197,7 @@
|
||||
SymbolName = 201,
|
||||
SymbolSelect = 202,
|
||||
SymbolInfoInteger = 203,
|
||||
ChartId = 206
|
||||
ChartId = 206,
|
||||
ChartRedraw = 207
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user