- ChartApplyTemplate
- ChartSaveTemplate
- ChartWindowFind
- ChartTimePriceToXY
- ChartXYToTimePrice
- ChartOpen
- ChartFirst
- ChartNext
- ChartClose
- ChartSymbol
- ChartPeriod
- ChartRedraw
- ChartSetDouble
- ChartSetInteger
- ChartSetString
- ChartGetDouble
- ChartGetInteger
- ChartGetString
- ChartNavigate
- ChartID
- ChartIndicatorAdd
- ChartIndicatorDelete
- ChartIndicatorGet
- ChartIndicatorName
- ChartIndicatorsTotal
- ChartWindowOnDropped
- ChartPriceOnDropped
- ChartTimeOnDropped
- ChartXOnDropped
- ChartYOnDropped
- ChartSetSymbolPeriod
- ChartScreenShot
ChartIndicatorDelete
从指定图表窗口删除指定名称的指标。
bool ChartIndicatorDelete(
|
参数
chart_id
[in] 图表 ID。0 表示当前图表。
sub_window
[in] 图表子窗口的数量。0代表主图表的子窗口。
const indicator_shortname
[in] 通过IndicatorSetString()函数在INDICATOR_SHORTNAME属性设置的指标的缩略名。若要获得指标的缩略名,请使用ChartIndicatorName()函数。
返回值
如果指标成功删除,返回true。否则返回false。若要获得错误信息,请使用GetLastError()函数。
注意
如果相同缩略名的两个指标都在图表子窗口,这行的第一个将被删除。
如果该图表上的另一个指标基于正被删除的指标值,这种指标也将被删除。
不要混淆指标缩略名和使用函数iCustom()和IndicatorCreate()创建指标时指定的文件名。如果指标缩略名没有明确设置,那么包含指标源代码的文件名将在编译期被指明。
删除来自图表的指标不表示其计算部分将被从程序端内存删除。若要释放指标句柄,请使用IndicatorRelease()函数。
指标缩略名应该正确设置。它将使用IndicatorSetString()函数被写入INDICATOR_SHORTNAME属性。建议缩略名应该包含指标所有输入参数的值,因为通过ChartIndicatorDelete()函数从图表删除的指标通过缩略名识别。
初始化失败后删除指标的示例:
//+------------------------------------------------------------------+ |
另见
ChartIndicatorAdd(), ChartIndicatorName(), ChartIndicatorsTotal(), iCustom(), IndicatorCreate(), IndicatorSetString()