mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-08-18 05:08:11 +00:00
Issue #209: [MT5] Added function ChartId to get chart id by expert handle.
This commit is contained in:
+14
-2
@@ -1717,6 +1717,18 @@ namespace MtApi5
|
||||
return SendCommand<long>(Mt5CommandType.ChartId, null);
|
||||
}
|
||||
|
||||
///<summary>
|
||||
///Returns the ID of the chart.
|
||||
///</summary>
|
||||
///<param name="expertHandle">Handle of expert linked to the chart.</param>
|
||||
///<returns>
|
||||
/// Value of long type.
|
||||
///</returns>
|
||||
public long ChartId(int expertHandle)
|
||||
{
|
||||
return SendCommand<long>(Mt5CommandType.ChartId, null, null, expertHandle);
|
||||
}
|
||||
|
||||
///<summary>
|
||||
///This function calls a forced redrawing of a specified chart.
|
||||
///</summary>
|
||||
@@ -3468,7 +3480,7 @@ namespace MtApi5
|
||||
ConnectionStateChanged?.Invoke(this, new Mt5ConnectionEventArgs(state, message));
|
||||
}
|
||||
|
||||
private T SendCommand<T>(Mt5CommandType commandType, ArrayList commandParameters, Dictionary<string, object> namedParams = null)
|
||||
private T SendCommand<T>(Mt5CommandType commandType, ArrayList commandParameters, Dictionary<string, object> namedParams = null, int? executor = null)
|
||||
{
|
||||
MtResponse response;
|
||||
|
||||
@@ -3480,7 +3492,7 @@ namespace MtApi5
|
||||
|
||||
try
|
||||
{
|
||||
response = client.SendCommand((int)commandType, commandParameters, namedParams, ExecutorHandle);
|
||||
response = client.SendCommand((int)commandType, commandParameters, namedParams, executor ?? ExecutorHandle);
|
||||
}
|
||||
catch (CommunicationException ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user