#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=0; i<total; i++) { //--- döngü indeksine göre listeden sembol adını al string name = SymbolName(i, false); //--- 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", name, i); found = true; break; } } //--- sembol sunucuda bulunamazsa, kapatmadan önce bunu raporla if(!found) PrintFormat("The '%s' symbol was not found on the server.", SYMBOL_NAME); } |