diff --git a/MtApi5/MtApi5Client.cs b/MtApi5/MtApi5Client.cs
index ddb0ded8..2ce0d9a2 100755
--- a/MtApi5/MtApi5Client.cs
+++ b/MtApi5/MtApi5Client.cs
@@ -1739,7 +1739,7 @@ namespace MtApi5
}
///
- ///Sets a value for a corresponding property of the specified chart. Chart property must be of the string type.
+ ///Returns the value of a corresponding property of the specified chart. Chart property must be of double type.
///
///Chart ID. 0 means the current chart.
///Chart property ID. This value can be one of the ENUM_CHART_PROPERTY_DOUBLE values.
diff --git a/mq5/MtApi5.ex5 b/mq5/MtApi5.ex5
index 0f00365e..b0beed94 100755
Binary files a/mq5/MtApi5.ex5 and b/mq5/MtApi5.ex5 differ
diff --git a/mq5/MtApi5.mq5 b/mq5/MtApi5.mq5
index cd0a9251..2096c1eb 100644
--- a/mq5/MtApi5.mq5
+++ b/mq5/MtApi5.mq5
@@ -765,6 +765,12 @@ int executeCommand()
case 249: //ChartSetString
Execute_ChartSetString();
break;
+ case 250: //ChartGetDouble
+ Execute_ChartGetDouble();
+ break;
+ case 251: //ChartGetInteger
+ Execute_ChartGetInteger();
+ break;
case 252: //ChartGetString
Execute_ChartGetString();
break;
@@ -805,6 +811,7 @@ int executeCommand()
#define SEND_LONG_RESPONSE(response) SEND_RESPONSE_OR_PRINT_ERROR(sendLongResponse, response, __FUNCTION__)
#define SEND_ULONG_RESPONSE(response) SEND_RESPONSE_OR_PRINT_ERROR(sendULongResponse, response, __FUNCTION__)
#define SEND_BOOL_RESPONSE(response) SEND_RESPONSE_OR_PRINT_ERROR(sendBooleanResponse, response, __FUNCTION__)
+#define SEND_DOUBLE_RESPONSE(response) SEND_RESPONSE_OR_PRINT_ERROR(sendDoubleResponse, response, __FUNCTION__)
//-------------------------------------------------------------
@@ -5792,6 +5799,52 @@ void Execute_ChartSetString()
SEND_BOOL_RESPONSE(result)
}
+void Execute_ChartGetDouble()
+{
+ long chart_id;
+ int prop_id;
+ int sub_window;
+
+ GET_LONG_VALUE(0, chart_id, "chart_id")
+ GET_INT_VALUE(1, prop_id, "prop_id")
+ GET_INT_VALUE(2, sub_window, "sub_window")
+
+#ifdef __DEBUG_LOG__
+ PrintFormat("%s: chart_id = %d, prop_id = %d, sub_window = %d", __FUNCTION__, chart_id, prop_id, sub_window);
+#endif
+
+ double result = ChartGetDouble(chart_id, (ENUM_CHART_PROPERTY_DOUBLE)prop_id, sub_window);
+
+#ifdef __DEBUG_LOG__
+ PrintFormat("%s: result = %f", __FUNCTION__, result);
+#endif
+
+ SEND_DOUBLE_RESPONSE(result)
+}
+
+void Execute_ChartGetInteger()
+{
+ long chart_id;
+ int prop_id;
+ int sub_window;
+
+ GET_LONG_VALUE(0, chart_id, "chart_id")
+ GET_INT_VALUE(1, prop_id, "prop_id")
+ GET_INT_VALUE(2, sub_window, "sub_window")
+
+#ifdef __DEBUG_LOG__
+ PrintFormat("%s: chart_id = %d, prop_id = %d, sub_window = %d", __FUNCTION__, chart_id, prop_id, sub_window);
+#endif
+
+ long result = ChartGetInteger(chart_id, (ENUM_CHART_PROPERTY_INTEGER)prop_id, sub_window);
+
+#ifdef __DEBUG_LOG__
+ PrintFormat("%s: result = %d", __FUNCTION__, result);
+#endif
+
+ SEND_LONG_RESPONSE(result)
+}
+
void Execute_ChartApplyTemplate()
{
long ChartId;