Issue #32: Added function ChartRedraw

This commit is contained in:
vdemydiuk
2016-12-12 17:29:52 +02:00
parent 9ef970cf1e
commit f5f13a13cc
11 changed files with 405 additions and 445 deletions
+14
View File
@@ -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);
}
+2 -1
View File
@@ -197,6 +197,7 @@
SymbolName = 201,
SymbolSelect = 202,
SymbolInfoInteger = 203,
ChartId = 206
ChartId = 206,
ChartRedraw = 207
}
}