diff --git a/MtApi/EnumAlignMode.cs b/MtApi/EnumAlignMode.cs
new file mode 100644
index 00000000..45a0ca84
--- /dev/null
+++ b/MtApi/EnumAlignMode.cs
@@ -0,0 +1,9 @@
+namespace MtApi
+{
+ public enum EnumAlignMode
+ {
+ ALIGN_LEFT = 1,
+ ALIGN_CENTER = 2,
+ ALIGN_RIGHT = 0
+ }
+}
\ No newline at end of file
diff --git a/MtApi/MtApiClient.cs b/MtApi/MtApiClient.cs
index 9eaa1dc0..5c931611 100755
--- a/MtApi/MtApiClient.cs
+++ b/MtApi/MtApiClient.cs
@@ -2113,10 +2113,10 @@ namespace MtApi
///
///The number of indicators in the specified chart window.
///
- public string ChartIndicatorsTotal(long chartId, int subWindow)
+ public int ChartIndicatorsTotal(long chartId, int subWindow)
{
var commandParameters = new ArrayList { chartId, subWindow };
- return SendCommand(MtCommandType.ChartIndicatorsTotal, commandParameters);
+ return SendCommand(MtCommandType.ChartIndicatorsTotal, commandParameters);
}
///
@@ -2176,17 +2176,19 @@ namespace MtApi
}
///
- ///Changes the symbol and period of the specified chart. The function is asynchronous, i.e. it sends the command and does not wait for its execution completion.
+ ///Saves current chart screen shot as a GIF, PNG or BMP file depending on specified extension.
///
///Chart ID. 0 means the current chart.
- ///Chart symbol. NULL value means the current chart symbol (Expert Advisor is attached to)
- ///Chart period (timeframe). Can be one of the ENUM_TIMEFRAMES values. 0 means the current chart period.
+ ///Screenshot file name. Cannot exceed 63 characters. Screenshot files are placed in the \Files directory.
+ ///Screenshot width in pixels.
+ ///Screenshot height in pixels.
+ ///Output mode of a narrow screenshot.
///
///Returns true if the command has been added to chart queue, otherwise false.
///
- public bool ChartScreenShot(long chartId, string symbol, ENUM_TIMEFRAMES period)
+ public bool ChartScreenShot(long chartId, string filename, int width, int height, EnumAlignMode alignMode = EnumAlignMode.ALIGN_RIGHT)
{
- var commandParameters = new ArrayList { chartId, symbol, (int)period };
+ var commandParameters = new ArrayList { chartId, filename, width, height, (int)alignMode };
return SendCommand(MtCommandType.ChartScreenShot, commandParameters);
}
@@ -2302,9 +2304,9 @@ namespace MtApi
///
///The price of the chart point where Expert Advisor or script was dropped. This value is only valid if the expert or script was dropped by mouse.
///
- public int WindowPriceOnDropped()
+ public double WindowPriceOnDropped()
{
- return SendCommand(MtCommandType.WindowPriceOnDropped, null);
+ return SendCommand(MtCommandType.WindowPriceOnDropped, null);
}
///
diff --git a/mq4/MtApi.ex4 b/mq4/MtApi.ex4
index a351cdda..0e7c8105 100755
Binary files a/mq4/MtApi.ex4 and b/mq4/MtApi.ex4 differ
diff --git a/mq4/MtApi.mq4 b/mq4/MtApi.mq4
index 023aded9..421fd64a 100755
Binary files a/mq4/MtApi.mq4 and b/mq4/MtApi.mq4 differ