ChartFirst

Devuelve el indicador del primer gráfico del terminal de cliente.

long  ChartFirst();

Valor devuelto

Identificador del gráfico.

Ejemplo:

//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//--- obtenemos el identificador del primer gráfico abierto en el terminal de cliente
   long            chart_idChartFirst();
   
//--- según el identificador recibido, obtenemos adicionalmente el símbolo y el periodo del gráfico
   string          symbol  = ChartSymbol(chart_id);
   ENUM_TIMEFRAMES period  = ChartPeriod(chart_id);
   
//--- mostramos la descripción del primer gráfico del terminal del cliente
   PrintFormat("ID of the first chart of the client terminal: %I64d, chart symbol: %s, chart period: %s"chart_idsymbolStringSubstr(EnumToString(period), 7));
   /*
   resultado:
   ID of the first chart of the client terminal133246248352168440chart symbolEURUSDchart periodM1
   */
  }