Skip to main content
Glama
emerzon

MetaTrader5 MCP Server

by emerzon
symbol.py601 B
def _extract_group_path(sym) -> str: """Extract pure group path from a symbol, stripping the symbol name if present. MT5 sometimes reports `symbol.path` including the symbol at the tail. This trims the last component when it equals the symbol name (case-insensitive). """ raw = getattr(sym, 'path', '') or '' name = getattr(sym, 'name', '') or '' if not raw: return 'Unknown' parts = raw.split('\\') if parts and name and parts[-1].lower() == name.lower(): parts = parts[:-1] group = '\\'.join(parts).strip('\\') return group or 'Unknown'

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/emerzon/mt-data-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server