Implemented function ChartPeriod (MT5)

This commit is contained in:
vdemydiuk
2018-03-14 19:16:29 +02:00
parent 07dd83f890
commit 24b881d8a0
2 changed files with 21 additions and 0 deletions
BIN
View File
Binary file not shown.
+21
View File
@@ -753,6 +753,9 @@ int executeCommand()
case 245: //ChartFirst
Execute_ChartSymbol();
break;
case 246: //ChartPeriod
Execute_ChartPeriod();
break;
case 252: //ChartGetString
Execute_ChartGetString();
break;
@@ -5692,6 +5695,24 @@ void Execute_ChartSymbol()
}
}
void Execute_ChartPeriod()
{
long chart_id;
GET_LONG_VALUE(0, chart_id, "chart_id");
#ifdef __DEBUG_LOG__
PrintFormat("%s: chart_id = %d", __FUNCTION__, chart_id);
#endif
ENUM_TIMEFRAMES period = ChartPeriod(chart_id);
#ifdef __DEBUG_LOG__
PrintFormat("%s: period = %s", __FUNCTION__, EnumToString(period));
#endif
SEND_INT_RESPONSE((int)period)
}
void Execute_ChartApplyTemplate()
{
long ChartId;