Removes an indicator with a specified name from the specified chart window.
[in] Chart ID. 0 denotes the current chart.
[in] Number of the chart subwindow. 0 denotes the main chart subwindow.
[in] The short name of the indicator which is set in the INDICATOR_SHORTNAME property with the IndicatorSetString() function. To get the short name of an indicator use the ChartIndicatorName() function.
Returns true in case of successful deletion of the indicator. Otherwise it returns false. To get error details use the GetLastError() function.
If two indicators with identical short names exist in the chart subwindow, the first one in a row will be deleted.
If other indicators on this chart are based on the values of the indicator that is being deleted, such indicators will also be deleted.
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.
Deletion of an indicator from a chart doesn't mean that its calculation part will be deleted from the terminal memory. To release the indicator handle use the IndicatorRelease() function.
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.
Example of deleting an indicator after initialization has failed:
ChartIndicatorAdd(), ChartIndicatorName(), ChartIndicatorsTotal(), iCustom(), IndicatorCreate(), IndicatorSetString()