//+------------------------------------------------------------------+ //| SymbolInfoStringChecker.mq5 | //| Copyright 2025, MetaQuotes Ltd. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2025, MetaQuotes Ltd." #property link "https://www.mql5.com" #property version "1.00" //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { string symbol = _Symbol; if(!SymbolSelect(symbol, true)) { PrintFormat("Error: Failed to select symbol '%s'. Error: %d", symbol, GetLastError()); return; } Print("--- Symbol Property Checker Started ---"); PrintFormat("Checking symbol: %s", symbol); Print("--- String Properties (ENUM_SYMBOL_INFO_STRING) ---"); ENUM_SYMBOL_INFO_STRING string_properties[] = { SYMBOL_BASIS, SYMBOL_CATEGORY, SYMBOL_COUNTRY, SYMBOL_SECTOR_NAME, SYMBOL_INDUSTRY_NAME, SYMBOL_CURRENCY_BASE, SYMBOL_CURRENCY_PROFIT, SYMBOL_CURRENCY_MARGIN, SYMBOL_BANK, SYMBOL_DESCRIPTION, SYMBOL_EXCHANGE, SYMBOL_FORMULA, SYMBOL_ISIN, SYMBOL_PAGE, SYMBOL_PATH }; string value; string result_str; for(int i = 0; i < ArraySize(string_properties); i++) { ResetLastError(); bool success = SymbolInfoString(symbol, string_properties[i], value); int error = GetLastError(); if(success) { if(value == "") { result_str = StringFormat("Property: %s, Status: SUPPORTED, Value: Empty", EnumToString(string_properties[i])); } else { result_str = StringFormat("Property: %s, Status: SUPPORTED, Value: '%s'", EnumToString(string_properties[i]), value); } Print(result_str); } else { result_str = StringFormat("Property: %s, Status: QUERY FAILED (Error: %d)", EnumToString(string_properties[i]), error); Print(result_str); } } Print("--- Check Completed ---"); } //+------------------------------------------------------------------+ //+------------------------------------------------------------------+