ChartPeriod - Chart Operations - MQL4 Reference

MQL4 Reference Chart Operations ChartPeriod

ChartPeriod

Returns the timeframe period of specified chart.

ENUM_TIMEFRAMES  ChartPeriod(
   long  chart_id=0      // Chart ID
   );

Parameters

chart_id=0

[in]  Chart ID. 0 means the current chart.

Return Value

The function returns one of the ENUM_TIMEFRAMES values. If chart does not exist, it returns 0.