mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-07-28 02:57:56 +00:00
Implemented function ChartPeriod (MT5)
This commit is contained in:
Binary file not shown.
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user