ChartIndicatorName

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

string  ChartIndicatorName(
   long  chart_id,      // chart id
   int   sub_window     // number of the subwindow
   int   index          // index of the indicator in the list of indicators added to the chart subwindow
   );

Parameters

chart_id

[in]  Chart ID. 0 denotes the current chart.

sub_window

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

index

[in]  the 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 ChartIndicatorsTotal() 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.

Note

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 ChartIndicatorDelete() function is identified by the short name.

See also

ChartIndicatorAdd(), ChartIndicatorDelete(), ChartIndicatorsTotal(), iCustom(), IndicatorCreate(), IndicatorSetString()