MQL4参考 图表操作 ChartIndicatorName
|
ChartIndicatorNameReturns the short name of the indicator by the number in the indicators list on the specified chart window.
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 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 ChartIndicatorDelete(), ChartIndicatorsTotal(), IndicatorSetString() |