- 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] チャート識別子。( 0 は現在のチャート)
sub_window
[in] チャートサブウィンドウの番号。( 0 はメインチャートウィンドウ)
const indicator_shortname
[in] IndicatorSetString() 関数で INDICATOR_SHORTNAMEプロパティに設定した指標の短縮名指標の短縮名を取得するには ChartIndicatorName() 関数が呼ばれます。
戻り値
指標の削除が成功した場合は true、その他の場合は false。エラーの詳細を取得するにはGetLastError() 関数を使用します。
注意事項
同一の短縮名を持つ指標がチャートサブウィンドウに 2 つ存在する場合、行の最初のものは削除されます。
このチャート上の他の指標が削除される指標の値に基づいている場合は、そのような指標も削除されます。
iCustom() 及び IndicatorCreate() 関数を使用して指標を作成する際、指標の短縮名とファイル名を混同しないでください。指標の短縮名が明示的に設定されていない場合、指標のソースコードを含むファイルの名称は、コンパイル時に指定されます。
指標のチャートからの削除は、その演算部が端末のメモリから削除されることを意味するものではありません。指標ハンドルを解除するには IndicatorRelease() 関数が使用されます。
指標の短縮名は正しく形成されなければなりません。短縮名は IndicatorSetString() 関数を使用してINDICATOR_SHORTNAMEプロパティに書かれます。ChartIndicatorDelete() 関数によってチャートから削除される指標は短縮名によって識別されるので、短縮名に指標の全ての入力パラメータの値を含むようお勧めします。
初期化の失敗後に指標を削除する例:
//+------------------------------------------------------------------+
|
参照
ChartIndicatorAdd(), ChartIndicatorName(), ChartIndicatorsTotal(), iCustom(), IndicatorCreate(), IndicatorSetString()