SymbolName

Sembol ismine dönüş yapar.

string  SymbolName(
   int   pos,          // listedeki numara
   bool  selected      // true - sadece Piyasa Gözlemindeki semboller için
   );

Parametreler

pos

[in] Sembolün listedeki sıra numarası.

selected

[in] İstek modu. Değer 'true' ise, sembol, Piyasa Gözleminde yer alan semboller listesinden alınır. Eğer değer 'false' ise, sembol genel listeden alınır.

Dönüş değeri

Sembol isminin string tipli değeri.

Örnek:

#define SYMBOL_NAME "GBPHKD"
 
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//--- sunucuda sembol arama sonucunun bayrağını ayarla
   bool found = false;
   
//--- sunucudaki tüm sembollerin listesinden 'SYMBOL_NAME' sembolünü bul
   int total = SymbolsTotal(false);
   for(int i=0i<totali++)
     {
      //--- döngü indeksine göre listeden sembol adını al
      string name = SymbolName(ifalse);
      
      //--- eğer bu istenen sembelse, sembolün adını ve listedeki konumunu günlüğe gönder ve döngüden çık
      if(name == SYMBOL_NAME)
        {
         PrintFormat("The '%s' symbol was found in the list of server symbols at index %d"namei);
         found = true;
         break;
        }
     }
     
//--- sembol sunucuda bulunamazsa, kapatmadan önce bunu raporla
   if(!found)
      PrintFormat("The '%s' symbol was not found on the server."SYMBOL_NAME);
  }