Download MetaTrader 5


Returns the short name of the indicator by the index in the indicators list on the specified chart window.

string  IndicatorName(
   int   sub_win     // number of the subwindow
   int   index       // index of the indicator in the list of indicators added to the chat subwindow



[in]  Number of the chart subwindow. 0 denotes the main chart window.


[in]  Index of the indicator in the list of indicators. The numeration of indicators start with zero, i.e. the first indicator in the list has the 0 index. To obtain the number of indicators in the list, use the IndicatorsTotal() function.

Return Value

The short name of the indicator which is set in the INDICATOR_SHORTNAME property with the IndicatorSetString() function. To get error details, use the GetLastError() function.


Do not confuse the indicator short name and the file name that is specified when creating an indicator using functions iCustom() and IndicatorCreate(). If the short name of an indicator is not set explicitly, then the name of the file containing the source code of the indicator will be specified during compilation.

The indicator's short name should be formed correctly. It will be written to the INDICATOR_SHORTNAME property using the IndicatorSetString() function. It is recommended that the short name should contain values of all the input parameters of the indicator, because the indicator to be deleted from the chart by the IndicatorDelete() function is identified by the short name.

See also

IndicatorAdd(), IndicatorDelete, IndicatorsTotal, iCustom(), IndicatorCreate(), IndicatorSetString().

Updated: 2016.04.11