跳至内容

ChartIndicatorName

ChartIndicatorName

根据指定图表窗口中指标列表中的编号,返回该指标的简称。

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
   );

参数

chart_id

[in] 图表ID。0表示当前图表。

sub_window

[in] 图表子窗口的编号。0表示主图表子窗口。

index

[in] 指标在指标列表中的索引。指标的编号从零开始,即列表中的第一个指标索引为0。要获取列表中的指标数量,请使用ChartIndicatorsTotal()函数。

返回值

通过IndicatorSetString()函数设置到INDICATOR_SHORTNAME属性中的指标简称。要获取错误详情,请使用GetLastError()函数。

注意

如果指标的简称未明确设置,则在编译时将指定包含指标源代码的文件名称。

指标的简称应正确形成。它将通过IndicatorSetString()函数设置到INDICATOR_SHORTNAME属性中。建议简称包含指标所有输入参数的值,因为要通过ChartIndicatorDelete()函数从图表中删除的指标,是通过简称来识别的。

另请参阅

ChartIndicatorDelete(), ChartIndicatorsTotal(), IndicatorSetString()

最后更新于