ChartFirst

Retourne l'identificateur du premier graphique du terminal client.

long  ChartFirst();

Valeur de Retour

L'identificateur du graphique.

Exemple :

//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//--- récupère l'ID du tout premier graphique ouvert dans le terminal client
   long            chart_idChartFirst();
   
//--- récupère aussi le symbole et la période du graphique en utilisant l'ID obtenu
   string          symbol  = ChartSymbol(chart_id);
   ENUM_TIMEFRAMES period  = ChartPeriod(chart_id);
   
//--- affiche la description du premier graphique du terminal client dans le journal
   PrintFormat("ID of the first chart of the client terminal: %I64d, chart symbol: %s, chart period: %s"chart_idsymbolStringSubstr(EnumToString(period), 7));
   /*
   résultat :
   ID of the first chart of the client terminal133246248352168440chart symbolEURUSDchart periodM1
   */
  }

Ce site web utilise des cookies. En savoir plus sur notre politique de cookies.