Getting the ChartID is easy. You'd think there would be a corresponding human-readable name or description or at least that little readout at the top left corner of every chart:
Anything would be better than nothing.
How can I get that info out of a function or the terminal given the ChartID?
for timeframe: https://www.mql5.com/en/docs/chart_operations/chartperiod
for symbol: https://www.mql5.com/en/docs/chart_operations/chartsymbol
for symbol description: https://www.mql5.com/en/docs/marketinformation/symbolinfostring and https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants#enum_symbol_info_string

- www.mql5.com
for timeframe: https://www.mql5.com/en/docs/chart_operations/chartperiod
for symbol: https://www.mql5.com/en/docs/chart_operations/chartsymbol
for symbol description: https://www.mql5.com/en/docs/marketinformation/symbolinfostring and https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants#enum_symbol_info_string
Roll your own, eh? 😆
Thanks for the links, man.
Getting the ChartID is easy. You'd think there would be a corresponding human-readable name or description or at least that little readout at the top left corner of every chart:
Anything would be better than nothing.
How can I get that info out of a function or the terminal given the ChartID?
In MetaTrader, there isn't a built-in function to directly retrieve the human-readable name or description of a chart given its ChartID. However, you can achieve this by using a combination of functions to gather information about the chart.
One way to approach this is to use the ChartGetSymbol() function to get the symbol name associated with the chart, and then you can use SymbolInfoString() function to retrieve additional information about the symbol, such as its description.
Use it like this...
void GetChartInfo(int chartID) { string symbol = ChartGetSymbol(chartID); string description = SymbolInfoString(symbol, SYMBOL_DESCRIPTION); Print("Chart ID: ", chartID); Print("Symbol: ", symbol); Print("Description: ", description); }
You can call this function with the ChartID of the chart you're interested in, and it will print out the ChartID, symbol name, and description associated with that chart.
The description may not always be available or may not be set for all symbols, as it depends on the broker's data feed and configuration. Additionally, if you need additional information about the chart, such as its timeframe or template name, you can explore other functions like ChartPeriod() and ChartGetInteger() to retrieve that information that works as well. I hope it helps
In MetaTrader, there isn't a built-in function to directly retrieve the human-readable name or description of a chart given its ChartID. However, you can achieve this by using a combination of functions to gather information about the chart.
One way to approach this is to use the ChartGetSymbol() function to get the symbol name associated with the chart, and then you can use SymbolInfoString() function to retrieve additional information about the symbol, such as its description.
Use it like this...
You can call this function with the ChartID of the chart you're interested in, and it will print out the ChartID, symbol name, and description associated with that chart.
The description may not always be available or may not be set for all symbols, as it depends on the broker's data feed and configuration. Additionally, if you need additional information about the chart, such as its timeframe or template name, you can explore other functions like ChartPeriod() and ChartGetInteger() to retrieve that information that works as well. I hope it helps
Thanks man, I'll look into that.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Getting the ChartID is easy. You'd think there would be a corresponding human-readable name or description or at least that little readout at the top left corner of every chart:
Anything would be better than nothing.
How can I get that info out of a function or the terminal given the ChartID?